@microsoft/typespec-msgraph 0.0.1-Preview.1 → 0.0.1-Preview.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/dist/src/components/acceptable-media-types-annotation.d.ts +3 -4
  2. package/dist/src/components/acceptable-media-types-annotation.d.ts.map +1 -1
  3. package/dist/src/components/acceptable-media-types-annotation.js +2 -6
  4. package/dist/src/components/acceptable-media-types-annotation.js.map +1 -1
  5. package/dist/src/components/alternate-keys-annotation.d.ts +4 -4
  6. package/dist/src/components/alternate-keys-annotation.d.ts.map +1 -1
  7. package/dist/src/components/alternate-keys-annotation.js +5 -13
  8. package/dist/src/components/alternate-keys-annotation.js.map +1 -1
  9. package/dist/src/components/common-elements.d.ts +0 -71
  10. package/dist/src/components/common-elements.d.ts.map +1 -1
  11. package/dist/src/components/common-elements.js +10 -24
  12. package/dist/src/components/common-elements.js.map +1 -1
  13. package/dist/src/components/computed-annotation.d.ts +3 -4
  14. package/dist/src/components/computed-annotation.d.ts.map +1 -1
  15. package/dist/src/components/computed-annotation.js +4 -10
  16. package/dist/src/components/computed-annotation.js.map +1 -1
  17. package/dist/src/components/count-restrictions-annotation.d.ts +3 -4
  18. package/dist/src/components/count-restrictions-annotation.d.ts.map +1 -1
  19. package/dist/src/components/count-restrictions-annotation.js +2 -6
  20. package/dist/src/components/count-restrictions-annotation.js.map +1 -1
  21. package/dist/src/components/description-annotation.d.ts +3 -4
  22. package/dist/src/components/description-annotation.d.ts.map +1 -1
  23. package/dist/src/components/description-annotation.js +4 -11
  24. package/dist/src/components/description-annotation.js.map +1 -1
  25. package/dist/src/components/entity-container-element.d.ts +6 -0
  26. package/dist/src/components/entity-container-element.d.ts.map +1 -0
  27. package/dist/src/components/entity-container-element.js +58 -0
  28. package/dist/src/components/entity-container-element.js.map +1 -0
  29. package/dist/src/components/enum-type-element.d.ts +6 -0
  30. package/dist/src/components/enum-type-element.d.ts.map +1 -0
  31. package/dist/src/components/enum-type-element.js +17 -0
  32. package/dist/src/components/enum-type-element.js.map +1 -0
  33. package/dist/src/components/expand-restrictions-annotation.d.ts +4 -5
  34. package/dist/src/components/expand-restrictions-annotation.d.ts.map +1 -1
  35. package/dist/src/components/expand-restrictions-annotation.js +5 -20
  36. package/dist/src/components/expand-restrictions-annotation.js.map +1 -1
  37. package/dist/src/components/index.d.ts +2 -14
  38. package/dist/src/components/index.d.ts.map +1 -1
  39. package/dist/src/components/index.js +9 -14
  40. package/dist/src/components/index.js.map +1 -1
  41. package/dist/src/components/operation-element.d.ts +6 -0
  42. package/dist/src/components/operation-element.d.ts.map +1 -0
  43. package/dist/src/components/operation-element.js +70 -0
  44. package/dist/src/components/operation-element.js.map +1 -0
  45. package/dist/src/components/permissions-annotation.d.ts +3 -4
  46. package/dist/src/components/permissions-annotation.d.ts.map +1 -1
  47. package/dist/src/components/permissions-annotation.js +2 -10
  48. package/dist/src/components/permissions-annotation.js.map +1 -1
  49. package/dist/src/components/property-element.d.ts +4 -4
  50. package/dist/src/components/property-element.d.ts.map +1 -1
  51. package/dist/src/components/property-element.js +14 -32
  52. package/dist/src/components/property-element.js.map +1 -1
  53. package/dist/src/components/revisions-annotation.d.ts +4 -5
  54. package/dist/src/components/revisions-annotation.d.ts.map +1 -1
  55. package/dist/src/components/revisions-annotation.js +7 -51
  56. package/dist/src/components/revisions-annotation.js.map +1 -1
  57. package/dist/src/components/schema-element.d.ts +6 -0
  58. package/dist/src/components/schema-element.d.ts.map +1 -0
  59. package/dist/src/components/schema-element.js +38 -0
  60. package/dist/src/components/schema-element.js.map +1 -0
  61. package/dist/src/components/search-restrictions-annotation.d.ts +3 -4
  62. package/dist/src/components/search-restrictions-annotation.d.ts.map +1 -1
  63. package/dist/src/components/search-restrictions-annotation.js +2 -6
  64. package/dist/src/components/search-restrictions-annotation.js.map +1 -1
  65. package/dist/src/components/skip-supported-annotation.d.ts +3 -4
  66. package/dist/src/components/skip-supported-annotation.d.ts.map +1 -1
  67. package/dist/src/components/skip-supported-annotation.js +2 -6
  68. package/dist/src/components/skip-supported-annotation.js.map +1 -1
  69. package/dist/src/components/sort-restrictions-annotation.d.ts +4 -5
  70. package/dist/src/components/sort-restrictions-annotation.d.ts.map +1 -1
  71. package/dist/src/components/sort-restrictions-annotation.js +5 -20
  72. package/dist/src/components/sort-restrictions-annotation.js.map +1 -1
  73. package/dist/src/components/structured-type-element.d.ts +10 -4
  74. package/dist/src/components/structured-type-element.d.ts.map +1 -1
  75. package/dist/src/components/structured-type-element.js +18 -58
  76. package/dist/src/components/structured-type-element.js.map +1 -1
  77. package/dist/src/components/top-supported-annotation.d.ts +3 -4
  78. package/dist/src/components/top-supported-annotation.d.ts.map +1 -1
  79. package/dist/src/components/top-supported-annotation.js +2 -6
  80. package/dist/src/components/top-supported-annotation.js.map +1 -1
  81. package/dist/src/decorators/abstract.d.ts.map +1 -1
  82. package/dist/src/decorators/abstract.js +0 -6
  83. package/dist/src/decorators/abstract.js.map +1 -1
  84. package/dist/src/decorators/complex.d.ts.map +1 -1
  85. package/dist/src/decorators/complex.js +0 -6
  86. package/dist/src/decorators/complex.js.map +1 -1
  87. package/dist/src/decorators/decorator-parameter.d.ts +4 -0
  88. package/dist/src/decorators/decorator-parameter.d.ts.map +1 -0
  89. package/dist/src/decorators/decorator-parameter.js +2 -0
  90. package/dist/src/decorators/decorator-parameter.js.map +1 -0
  91. package/dist/src/decorators/deprecated-definition.d.ts +4 -3
  92. package/dist/src/decorators/deprecated-definition.d.ts.map +1 -1
  93. package/dist/src/decorators/deprecated-definition.js +7 -1
  94. package/dist/src/decorators/deprecated-definition.js.map +1 -1
  95. package/dist/src/decorators/entity.d.ts.map +1 -1
  96. package/dist/src/decorators/entity.js +0 -6
  97. package/dist/src/decorators/entity.js.map +1 -1
  98. package/dist/src/decorators/expand.d.ts +2 -1
  99. package/dist/src/decorators/expand.d.ts.map +1 -1
  100. package/dist/src/decorators/expand.js +1 -1
  101. package/dist/src/decorators/expand.js.map +1 -1
  102. package/dist/src/decorators/function.d.ts +11 -0
  103. package/dist/src/decorators/function.d.ts.map +1 -0
  104. package/dist/src/decorators/function.js +16 -0
  105. package/dist/src/decorators/function.js.map +1 -0
  106. package/dist/src/decorators/handlers/custom/additional-query-parameters.d.ts +2 -1
  107. package/dist/src/decorators/handlers/custom/additional-query-parameters.d.ts.map +1 -1
  108. package/dist/src/decorators/handlers/custom/additional-query-parameters.js +3 -1
  109. package/dist/src/decorators/handlers/custom/additional-query-parameters.js.map +1 -1
  110. package/dist/src/decorators/handlers/custom/ags-attribute.d.ts +2 -1
  111. package/dist/src/decorators/handlers/custom/ags-attribute.d.ts.map +1 -1
  112. package/dist/src/decorators/handlers/custom/ags-attribute.js +3 -3
  113. package/dist/src/decorators/handlers/custom/ags-attribute.js.map +1 -1
  114. package/dist/src/decorators/handlers/index.d.ts +4 -3
  115. package/dist/src/decorators/handlers/index.d.ts.map +1 -1
  116. package/dist/src/decorators/handlers/index.js +4 -4
  117. package/dist/src/decorators/handlers/index.js.map +1 -1
  118. package/dist/src/decorators/has-stream.d.ts +3 -3
  119. package/dist/src/decorators/has-stream.d.ts.map +1 -1
  120. package/dist/src/decorators/has-stream.js +2 -15
  121. package/dist/src/decorators/has-stream.js.map +1 -1
  122. package/dist/src/decorators/index.d.ts +5 -1
  123. package/dist/src/decorators/index.d.ts.map +1 -1
  124. package/dist/src/decorators/index.js +5 -1
  125. package/dist/src/decorators/index.js.map +1 -1
  126. package/dist/src/decorators/open.d.ts.map +1 -1
  127. package/dist/src/decorators/open.js +0 -6
  128. package/dist/src/decorators/open.js.map +1 -1
  129. package/dist/src/decorators/{routed-interfaces.d.ts → operation-parameters.d.ts} +3 -11
  130. package/dist/src/decorators/operation-parameters.d.ts.map +1 -0
  131. package/dist/src/decorators/operation-parameters.js +15 -0
  132. package/dist/src/decorators/operation-parameters.js.map +1 -0
  133. package/dist/src/decorators/order-by.d.ts +2 -1
  134. package/dist/src/decorators/order-by.d.ts.map +1 -1
  135. package/dist/src/decorators/order-by.js +1 -1
  136. package/dist/src/decorators/order-by.js.map +1 -1
  137. package/dist/src/decorators/private-preview-definition.d.ts +4 -3
  138. package/dist/src/decorators/private-preview-definition.d.ts.map +1 -1
  139. package/dist/src/decorators/private-preview-definition.js +6 -1
  140. package/dist/src/decorators/private-preview-definition.js.map +1 -1
  141. package/dist/src/decorators/private-preview.d.ts +2 -1
  142. package/dist/src/decorators/private-preview.d.ts.map +1 -1
  143. package/dist/src/decorators/private-preview.js +1 -11
  144. package/dist/src/decorators/private-preview.js.map +1 -1
  145. package/dist/src/emitter.d.ts.map +1 -1
  146. package/dist/src/emitter.js +4 -2
  147. package/dist/src/emitter.js.map +1 -1
  148. package/dist/src/entities/entity-container.d.ts +35 -0
  149. package/dist/src/entities/entity-container.d.ts.map +1 -0
  150. package/dist/src/entities/entity-container.js +132 -0
  151. package/dist/src/entities/entity-container.js.map +1 -0
  152. package/dist/src/entities/enum.d.ts +16 -0
  153. package/dist/src/entities/enum.d.ts.map +1 -0
  154. package/dist/src/entities/enum.js +22 -0
  155. package/dist/src/entities/enum.js.map +1 -0
  156. package/dist/src/entities/model.d.ts +50 -0
  157. package/dist/src/entities/model.d.ts.map +1 -0
  158. package/dist/src/entities/model.js +119 -0
  159. package/dist/src/entities/model.js.map +1 -0
  160. package/dist/src/entities/namespace.d.ts +14 -0
  161. package/dist/src/entities/namespace.d.ts.map +1 -0
  162. package/dist/src/entities/namespace.js +41 -0
  163. package/dist/src/entities/namespace.js.map +1 -0
  164. package/dist/src/entities/operation.d.ts +28 -0
  165. package/dist/src/entities/operation.d.ts.map +1 -0
  166. package/dist/src/entities/operation.js +88 -0
  167. package/dist/src/entities/operation.js.map +1 -0
  168. package/dist/src/entities/property.d.ts +3 -0
  169. package/dist/src/entities/property.d.ts.map +1 -0
  170. package/dist/src/entities/property.js +54 -0
  171. package/dist/src/entities/property.js.map +1 -0
  172. package/dist/src/entities/revision-definition.d.ts +9 -0
  173. package/dist/src/entities/revision-definition.d.ts.map +1 -0
  174. package/dist/src/entities/revision-definition.js +42 -0
  175. package/dist/src/entities/revision-definition.js.map +1 -0
  176. package/dist/src/index.d.ts +0 -3
  177. package/dist/src/index.d.ts.map +1 -1
  178. package/dist/src/index.js +0 -3
  179. package/dist/src/index.js.map +1 -1
  180. package/dist/src/rules/entity.d.ts +1 -0
  181. package/dist/src/rules/entity.d.ts.map +1 -1
  182. package/dist/src/rules/entity.js +36 -0
  183. package/dist/src/rules/entity.js.map +1 -1
  184. package/dist/src/rules/enum.d.ts +2 -0
  185. package/dist/src/rules/enum.d.ts.map +1 -0
  186. package/dist/src/rules/enum.js +26 -0
  187. package/dist/src/rules/enum.js.map +1 -0
  188. package/dist/src/rules/function.d.ts +2 -0
  189. package/dist/src/rules/function.d.ts.map +1 -0
  190. package/dist/src/rules/function.js +26 -0
  191. package/dist/src/rules/function.js.map +1 -0
  192. package/dist/src/rules/index.d.ts +3 -4
  193. package/dist/src/rules/index.d.ts.map +1 -1
  194. package/dist/src/rules/index.js +40 -111
  195. package/dist/src/rules/index.js.map +1 -1
  196. package/lib/decorators.tsp +29 -22
  197. package/package.json +29 -13
  198. package/dist/src/components/program-context.d.ts +0 -4
  199. package/dist/src/components/program-context.d.ts.map +0 -1
  200. package/dist/src/components/program-context.js +0 -3
  201. package/dist/src/components/program-context.js.map +0 -1
  202. package/dist/src/csdl.d.ts +0 -8
  203. package/dist/src/csdl.d.ts.map +0 -1
  204. package/dist/src/csdl.js +0 -298
  205. package/dist/src/csdl.js.map +0 -1
  206. package/dist/src/decorators/routed-interfaces.d.ts.map +0 -1
  207. package/dist/src/decorators/routed-interfaces.js +0 -43
  208. package/dist/src/decorators/routed-interfaces.js.map +0 -1
@@ -1,77 +1,37 @@
1
- import { isKey } from "@typespec/compiler";
2
- import React, { useContext } from "react";
3
- import { buildAttributes, hasStream, isAbstract, isComplex, isEntity, isOpen } from "../index.js";
4
- import { getIdForType } from "../utils.js";
1
+ import React from "react";
5
2
  import { AcceptableMediaTypesAnnotation } from "./acceptable-media-types-annotation.js";
6
3
  import { AlternateKeysAnnotation } from "./alternate-keys-annotation.js";
7
- import { ItemList, PropertyRefElement } from "./common-elements.js";
4
+ import { ItemList } from "./common-elements.js";
8
5
  import { DescriptionAnnotation } from "./description-annotation.js";
9
- import { ProgramContext } from "./program-context.js";
10
6
  import { PropertyElement } from "./property-element.js";
11
7
  import { RevisionsAnnotation } from "./revisions-annotation.js";
12
8
  const EntityType = (props) => React.createElement("EntityType", props);
13
9
  const ComplexType = (props) => React.createElement("ComplexType", props);
14
10
  const Key = (props) => React.createElement("Key", props);
15
- export const StructuredTypeElement = ({ model }) => {
16
- const program = useContext(ProgramContext);
17
- const isEntityType = isEntity(program, model);
18
- const isComplexType = isComplex(program, model);
19
- if (isEntityType) {
20
- return React.createElement(EntityTypeElement, { model: model });
21
- }
22
- if (isComplexType) {
23
- return React.createElement(ComplexTypeElement, { model: model });
24
- }
25
- return React.createElement(React.Fragment, null);
11
+ const PropertyRef = (props) => React.createElement("PropertyRef", props);
12
+ export const EntityTypeElement = ({ props }) => {
13
+ return (React.createElement(EntityType, { ...props.StructuredType },
14
+ React.createElement(KeyPropertyElement, { keyProperty: props.KeyProperty }),
15
+ React.createElement(PropertyList, { properties: props.Properties }),
16
+ React.createElement(AlternateKeysAnnotation, { alternateKeys: props.AlternateKeys }),
17
+ React.createElement(AcceptableMediaTypesAnnotation, { streamTypes: props.StreamTypes }),
18
+ React.createElement(RevisionsAnnotation, { definition: props.RevisionDefinition }),
19
+ React.createElement(DescriptionAnnotation, { description: props.Description })));
26
20
  };
27
- const EntityTypeElement = ({ model }) => {
28
- const program = useContext(ProgramContext);
29
- const props = getStructuredTypeProps(program, model);
30
- return (React.createElement(EntityType, { ...props },
31
- React.createElement(KeyPropertyElement, { model: model }),
32
- React.createElement(PropertyList, { properties: model.properties }),
33
- React.createElement(AlternateKeysAnnotation, { model: model }),
34
- React.createElement(AcceptableMediaTypesAnnotation, { item: model }),
35
- React.createElement(RevisionsAnnotation, { item: model, namespace: model.namespace }),
36
- React.createElement(DescriptionAnnotation, { type: model })));
21
+ export const ComplexTypeElement = ({ props }) => {
22
+ return (React.createElement(ComplexType, { ...props.StructuredType },
23
+ React.createElement(PropertyList, { properties: props.Properties }),
24
+ React.createElement(RevisionsAnnotation, { definition: props.RevisionDefinition }),
25
+ React.createElement(DescriptionAnnotation, { description: props.Description })));
37
26
  };
38
- const ComplexTypeElement = ({ model }) => {
39
- const program = useContext(ProgramContext);
40
- const props = getStructuredTypeProps(program, model);
41
- return (React.createElement(ComplexType, { ...props },
42
- React.createElement(PropertyList, { properties: model.properties }),
43
- React.createElement(RevisionsAnnotation, { item: model, namespace: model.namespace }),
44
- React.createElement(DescriptionAnnotation, { type: model })));
45
- };
46
- const KeyPropertyElement = ({ model }) => {
47
- const program = useContext(ProgramContext);
48
- const keyProperty = [...model.properties.entries()].find(([k, property]) => isKey(program, property));
27
+ const KeyPropertyElement = ({ keyProperty }) => {
49
28
  if (!keyProperty) {
50
29
  return React.createElement(React.Fragment, null);
51
30
  }
52
31
  return (React.createElement(Key, null,
53
- React.createElement(PropertyRefElement, { Name: keyProperty[0] })));
32
+ React.createElement(PropertyRef, { Name: keyProperty[0] })));
54
33
  };
55
34
  const PropertyList = (props) => {
56
35
  return (React.createElement(ItemList, { items: props.properties, render: (property) => React.createElement(PropertyElement, { property: property }) }));
57
36
  };
58
- function getStructuredTypeProps(program, model) {
59
- const props = {
60
- Name: model.name,
61
- };
62
- if (isOpen(program, model)) {
63
- props.OpenType = "true";
64
- }
65
- if (hasStream(program, model)) {
66
- props.HasStream = "true";
67
- }
68
- if (model.baseModel) {
69
- props.BaseType = getIdForType(program, model.baseModel);
70
- }
71
- if (isAbstract(program, model)) {
72
- props.Abstract = "true";
73
- }
74
- const agsAttributes = buildAttributes(program, model);
75
- return Object.assign(props, agsAttributes);
76
- }
77
37
  //# sourceMappingURL=structured-type-element.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"structured-type-element.js","source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,MAAM,CAAC;KAC1B;IAED,IAAI,KAAK,CAAC,SAAS,EAAE;QACnB,KAAK,CAAC,QAAQ,GAAG,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;KACzD;IAED,IAAI,UAAU,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE;QAC9B,KAAK,CAAC,QAAQ,GAAG,MAAM,CAAC;KACzB;IAED,MAAM,aAAa,GAAG,eAAe,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAEtD,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;AAC7C,CAAC"}
1
+ {"version":3,"file":"structured-type-element.js","sourceRoot":"","sources":["../../../src/components/structured-type-element.tsx"],"names":[],"mappings":"AACA,OAAO,KAAa,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,8BAA8B,EAAE,MAAM,wCAAwC,CAAC;AACxF,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGhE,MAAM,UAAU,GAAG,CAAC,KAAqB,EAAE,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;AACvF,MAAM,WAAW,GAAG,CAAC,KAAqB,EAAE,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;AAEzF,MAAM,GAAG,GAAG,CAAC,KAAwB,EAAE,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAC5E,MAAM,WAAW,GAAG,CAAC,KAAuB,EAAE,EAAE,CAAC,KAAK,CAAC,aAAa,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AC,KAAK,EAAE,EAAE;IACzE,OAAO,CACL,oBAAC,QAAQ,IACP,KAAK,EAAE,KAAK,CAAC,UAAU,EACvB,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,oBAAC,eAAe,IAAC,QAAQ,EAAE,QAAQ,GAAI,GAC7D,CACH,CAAC;AACJ,CAAC,CAAC"}
@@ -1,6 +1,5 @@
1
- import { Interface } from "@typespec/compiler";
2
- import { FunctionComponent } from "react";
3
- export declare const TopSupportedAnnotation: FunctionComponent<{
4
- interface: Interface;
1
+ import { FC } from "react";
2
+ export declare const TopSupportedAnnotation: FC<{
3
+ hasTopOperation: boolean;
5
4
  }>;
6
5
  //# sourceMappingURL=top-supported-annotation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"top-supported-annotation.d.ts","sourceRoot":"","sources":["../../../src/components/top-supported-annotation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAc,EAAE,iBAAiB,EAAc,MAAM,OAAO,CAAC;AAK7D,eAAO,MAAM,sBAAsB,EAAE,iBAAiB,CAAC;IAAE,SAAS,EAAE,SAAS,CAAA;CAAE,CAW9E,CAAC"}
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,eAAe,EAAE,OAAO,CAAA;CAAE,CAMnE,CAAC"}
@@ -1,10 +1,6 @@
1
- import React, { useContext } from "react";
2
- import { isTop } from "../index.js";
1
+ import React from "react";
3
2
  import { AnnotationElement } from "./common-elements.js";
4
- import { ProgramContext } from "./program-context.js";
5
- export const TopSupportedAnnotation = (props) => {
6
- const program = useContext(ProgramContext);
7
- const hasTopOperation = [...props.interface.operations].some(([_, operation]) => isTop(program, operation));
3
+ export const TopSupportedAnnotation = ({ hasTopOperation }) => {
8
4
  if (hasTopOperation) {
9
5
  return React.createElement(React.Fragment, null);
10
6
  }
@@ -1 +1 @@
1
- {"version":3,"file":"top-supported-annotation.js","sourceRoot":"","sources":["../../../src/components/top-supported-annotation.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAqB,UAAU,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,MAAM,CAAC,MAAM,sBAAsB,GAAgD,CAAC,KAAK,EAAE,EAAE;IAC3F,MAAM,OAAO,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAC3C,MAAM,eAAe,GAAG,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,EAAE,CAC9E,KAAK,CAAC,OAAO,EAAE,SAAS,CAAC,CAC1B,CAAC;IAEF,IAAI,eAAe,EAAE;QACnB,OAAO,yCAAK,CAAC;KACd;IAED,OAAO,oBAAC,iBAAiB,IAAC,IAAI,EAAC,gCAAgC,EAAC,IAAI,EAAC,OAAO,GAAG,CAAC;AAClF,CAAC,CAAC"}
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,GAAqC,CAAC,EAAE,eAAe,EAAE,EAAE,EAAE;IAC9F,IAAI,eAAe,EAAE;QACnB,OAAO,yCAAK,CAAC;KACd;IAED,OAAO,oBAAC,iBAAiB,IAAC,IAAI,EAAC,gCAAgC,EAAC,IAAI,EAAC,OAAO,GAAG,CAAC;AAClF,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"abstract.d.ts","sourceRoot":"","sources":["../../../src/decorators/abstract.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,OAAO,EAA2B,MAAM,oBAAoB,CAAC;AAG/F;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,KAAK,QAOjE;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,WAE3D"}
1
+ {"version":3,"file":"abstract.d.ts","sourceRoot":"","sources":["../../../src/decorators/abstract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAGtE;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,KAAK,QAEjE;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,WAE3D"}
@@ -1,5 +1,3 @@
1
- // -- @open decorator
2
- import { validateDecoratorTarget } from "@typespec/compiler";
3
1
  const abstractKey = Symbol("abstract");
4
2
  /**
5
3
  * `@abstract` - mark a model type as abstract
@@ -7,10 +5,6 @@ const abstractKey = Symbol("abstract");
7
5
  * `@abstract` can only be applied to models.
8
6
  */
9
7
  export function $abstract(context, entity) {
10
- // TODO: Remove this and move to extern dec once Model type is defined in TypeSpec.Reflection https://github.com/microsoft/typespec/issues/1655
11
- if (!validateDecoratorTarget(context, entity, "@abstract", "Model")) {
12
- return;
13
- }
14
8
  context.program.stateSet(abstractKey).add(entity);
15
9
  }
16
10
  export function isAbstract(program, property) {
@@ -1 +1 @@
1
- {"version":3,"file":"abstract.js","sourceRoot":"","sources":["../../../src/decorators/abstract.ts"],"names":[],"mappings":"AAAA,qBAAqB;AAErB,OAAO,EAAoC,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAE/F,MAAM,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AACvC;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,OAAyB,EAAE,MAAa;IAChE,+IAA+I;IAC/I,IAAI,CAAC,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE;QACnE,OAAO;KACR;IAED,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,OAAgB,EAAE,QAAe;IAC1D,OAAO,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACrD,CAAC"}
1
+ {"version":3,"file":"abstract.js","sourceRoot":"","sources":["../../../src/decorators/abstract.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AACvC;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,OAAyB,EAAE,MAAa;IAChE,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,OAAgB,EAAE,QAAe;IAC1D,OAAO,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACrD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"complex.d.ts","sourceRoot":"","sources":["../../../src/decorators/complex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,OAAO,EAA2B,MAAM,oBAAoB,CAAC;AAI/F;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,KAAK,QAQjE;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,WAEzD"}
1
+ {"version":3,"file":"complex.d.ts","sourceRoot":"","sources":["../../../src/decorators/complex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAItE;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,KAAK,QAEjE;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,WAEzD"}
@@ -1,4 +1,3 @@
1
- import { validateDecoratorTarget } from "@typespec/compiler";
2
1
  const complexKey = Symbol("complex");
3
2
  /**
4
3
  * `@complex` - mark a model as a complex type
@@ -6,11 +5,6 @@ const complexKey = Symbol("complex");
6
5
  * `@complex` can only be applied to models.
7
6
  */
8
7
  export function $complex(context, complex) {
9
- // TODO: Remove this and move to extern dec once Model type is defined in TypeSpec.Reflection https://github.com/microsoft/typespec/issues/1655
10
- if (!validateDecoratorTarget(context, complex, "@complex", "Model")) {
11
- return;
12
- }
13
- // Register the complex property
14
8
  context.program.stateSet(complexKey).add(complex);
15
9
  }
16
10
  export function isComplex(program, complex) {
@@ -1 +1 @@
1
- {"version":3,"file":"complex.js","sourceRoot":"","sources":["../../../src/decorators/complex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAE/F,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;AAErC;;;;GAIG;AACH,MAAM,UAAU,QAAQ,CAAC,OAAyB,EAAE,OAAc;IAChE,+IAA+I;IAC/I,IAAI,CAAC,uBAAuB,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE;QACnE,OAAO;KACR;IAED,gCAAgC;IAChC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,OAAgB,EAAE,OAAc;IACxD,OAAO,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACnD,CAAC"}
1
+ {"version":3,"file":"complex.js","sourceRoot":"","sources":["../../../src/decorators/complex.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;AAErC;;;;GAIG;AACH,MAAM,UAAU,QAAQ,CAAC,OAAyB,EAAE,OAAc;IAChE,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,OAAgB,EAAE,OAAc;IACxD,OAAO,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACnD,CAAC"}
@@ -0,0 +1,4 @@
1
+ export interface DecoratorParameter {
2
+ value: string;
3
+ }
4
+ //# sourceMappingURL=decorator-parameter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decorator-parameter.d.ts","sourceRoot":"","sources":["../../../src/decorators/decorator-parameter.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAA;CACd"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=decorator-parameter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decorator-parameter.js","sourceRoot":"","sources":["../../../src/decorators/decorator-parameter.ts"],"names":[],"mappings":""}
@@ -1,10 +1,11 @@
1
1
  import { DecoratorContext, Namespace, Program } from "@typespec/compiler";
2
+ import { DecoratorParameter } from "./decorator-parameter.js";
2
3
  /**
3
4
  * `@deprecatedDefinition` - create a reusable deprecation definition.
4
5
  *
5
6
  * `@deprecatedDefinition` can only be applied to namespaces.
6
7
  */
7
- export interface DeprecatedDefinitionParameters {
8
+ export interface DeprecatedDecoratorParameters {
8
9
  name: string;
9
10
  category: string;
10
11
  announcementDate: string;
@@ -15,7 +16,7 @@ export interface DeprecatedDefinitionParameters {
15
16
  * `@deprecatedDefinition` - Allow us create a reusable deprecation definition.
16
17
  * `@deprecatedDefinition` - Applies only to namespaces.
17
18
  */
18
- export declare function $deprecatedDefinition(context: DecoratorContext, target: Namespace, name: string, category: string, announcementDate: string, removalDate: string, description: string): void;
19
+ export declare function $deprecatedDefinition(context: DecoratorContext, target: Namespace, name: DecoratorParameter, category: DecoratorParameter, announcementDate: DecoratorParameter, removalDate: DecoratorParameter, description: DecoratorParameter): void;
19
20
  export declare function hasDeprecatedDefinitions(program: Program, target: Namespace): boolean;
20
- export declare function getDeprecatedDefinitions(program: Program, target: Namespace): Map<string, DeprecatedDefinitionParameters>;
21
+ export declare function getDeprecatedDefinitions(program: Program, target: Namespace): Map<string, DeprecatedDecoratorParameters>;
21
22
  //# sourceMappingURL=deprecated-definition.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deprecated-definition.d.ts","sourceRoot":"","sources":["../../../src/decorators/deprecated-definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE1E;;;;GAIG;AACH,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB;AAID;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,gBAAgB,EAAE,MAAM,EACxB,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,QAMpB;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,GAAG,OAAO,CAErF;AAED,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,SAAS,GAChB,GAAG,CAAC,MAAM,EAAE,8BAA8B,CAAC,CAK7C"}
1
+ {"version":3,"file":"deprecated-definition.d.ts","sourceRoot":"","sources":["../../../src/decorators/deprecated-definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D;;;;GAIG;AACH,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB;AAID;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE,kBAAkB,EACxB,QAAQ,EAAE,kBAAkB,EAC5B,gBAAgB,EAAE,kBAAkB,EACpC,WAAW,EAAE,kBAAkB,EAC/B,WAAW,EAAE,kBAAkB,QAYhC;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,GAAG,OAAO,CAErF;AAED,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,SAAS,GAChB,GAAG,CAAC,MAAM,EAAE,6BAA6B,CAAC,CAK5C"}
@@ -5,7 +5,13 @@ const deprecatedDefinitionKey = Symbol("deprecatedDefinition");
5
5
  */
6
6
  export function $deprecatedDefinition(context, target, name, category, announcementDate, removalDate, description) {
7
7
  const definitions = getDeprecatedDefinitions(context.program, target);
8
- definitions.set(name, { name, category, announcementDate, removalDate, description });
8
+ definitions.set(name.value, {
9
+ name: name.value,
10
+ category: category.value,
11
+ announcementDate: announcementDate.value,
12
+ removalDate: removalDate.value,
13
+ description: description.value,
14
+ });
9
15
  context.program.stateMap(deprecatedDefinitionKey).set(target, definitions);
10
16
  }
11
17
  export function hasDeprecatedDefinitions(program, target) {
@@ -1 +1 @@
1
- {"version":3,"file":"deprecated-definition.js","sourceRoot":"","sources":["../../../src/decorators/deprecated-definition.ts"],"names":[],"mappings":"AAeA,MAAM,uBAAuB,GAAG,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAE/D;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CACnC,OAAyB,EACzB,MAAiB,EACjB,IAAY,EACZ,QAAgB,EAChB,gBAAwB,EACxB,WAAmB,EACnB,WAAmB;IAEnB,MAAM,WAAW,GAAG,wBAAwB,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACtE,WAAW,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC,CAAC;IAEtF,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;AAC7E,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,OAAgB,EAAE,MAAiB;IAC1E,OAAO,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,OAAgB,EAChB,MAAiB;IAEjB,OAAO,CACL,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC;QACrD,IAAI,GAAG,EAA0C,CAClD,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"deprecated-definition.js","sourceRoot":"","sources":["../../../src/decorators/deprecated-definition.ts"],"names":[],"mappings":"AAgBA,MAAM,uBAAuB,GAAG,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAE/D;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CACnC,OAAyB,EACzB,MAAiB,EACjB,IAAwB,EACxB,QAA4B,EAC5B,gBAAoC,EACpC,WAA+B,EAC/B,WAA+B;IAE/B,MAAM,WAAW,GAAG,wBAAwB,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACtE,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE;QAC1B,IAAI,EAAE,IAAI,CAAC,KAAK;QAChB,QAAQ,EAAE,QAAQ,CAAC,KAAK;QACxB,gBAAgB,EAAE,gBAAgB,CAAC,KAAK;QACxC,WAAW,EAAE,WAAW,CAAC,KAAK;QAC9B,WAAW,EAAE,WAAW,CAAC,KAAK;KAC/B,CAAC,CAAC;IAEH,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;AAC7E,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,OAAgB,EAAE,MAAiB;IAC1E,OAAO,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,OAAgB,EAChB,MAAiB;IAEjB,OAAO,CACL,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC;QACrD,IAAI,GAAG,EAAyC,CACjD,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../../src/decorators/entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,OAAO,EAA2B,MAAM,oBAAoB,CAAC;AAI/F;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,KAAK,QAQ/D;AAED,wBAAgB,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,WAEvD;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,CAM3E"}
1
+ {"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../../src/decorators/entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAItE;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,KAAK,QAE/D;AAED,wBAAgB,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,WAEvD;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,CAM3E"}
@@ -1,4 +1,3 @@
1
- import { validateDecoratorTarget } from "@typespec/compiler";
2
1
  const entityKey = Symbol("entity");
3
2
  /**
4
3
  * `@entity` - mark a model as an entity type
@@ -6,11 +5,6 @@ const entityKey = Symbol("entity");
6
5
  * `@entity` can only be applied to models.
7
6
  */
8
7
  export function $entity(context, entity) {
9
- // TODO: Remove this and move to extern dec once Model type is defined in TypeSpec.Reflection https://github.com/microsoft/typespec/issues/1655
10
- if (!validateDecoratorTarget(context, entity, "@entity", "Model")) {
11
- return;
12
- }
13
- // Register the entity property
14
8
  context.program.stateSet(entityKey).add(entity);
15
9
  }
16
10
  export function isEntity(program, entity) {
@@ -1 +1 @@
1
- {"version":3,"file":"entity.js","sourceRoot":"","sources":["../../../src/decorators/entity.ts"],"names":[],"mappings":"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,MAAM,UAAU,QAAQ,CAAC,OAAgB,EAAE,MAAa;IACtD,OAAO,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,OAAgB,EAAE,IAAY;IACtD,MAAM,OAAO,GAAG,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CACrD,CAAC,IAAI,EAAiB,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,CACrE,CAAC;IAEF,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACjD,CAAC"}
@@ -1,11 +1,12 @@
1
1
  import { DecoratorContext, Operation, Program } from "@typespec/compiler";
2
+ import { DecoratorParameter } from "./decorator-parameter.js";
2
3
  /**
3
4
  * `@expand` - Applies to: get operations that return collections or individual instances of models that contain @contains or @references properties.
4
5
  * Indicates that the get operation supports the OData $expand query parameter.
5
6
  *
6
7
  * `properties` - Property names in the model returned from the get operation that can be used in a $expand query parameter.
7
8
  */
8
- export declare function $expand(context: DecoratorContext, target: Operation, ...properties: string[]): void;
9
+ export declare function $expand(context: DecoratorContext, target: Operation, ...properties: DecoratorParameter[]): void;
9
10
  export declare function getExpand(program: Program, target: Operation): string[];
10
11
  export declare function isExpand(program: Program, target: Operation): boolean;
11
12
  //# sourceMappingURL=expand.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"expand.d.ts","sourceRoot":"","sources":["../../../src/decorators/expand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAI1E;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,UAAU,EAAE,MAAM,EAAE,QAE5F;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,GAAG,MAAM,EAAE,CAEvE;AAED,wBAAgB,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,GAAG,OAAO,CAErE"}
1
+ {"version":3,"file":"expand.d.ts","sourceRoot":"","sources":["../../../src/decorators/expand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAI9D;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,UAAU,EAAE,kBAAkB,EAAE,QAExG;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,GAAG,MAAM,EAAE,CAEvE;AAED,wBAAgB,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,GAAG,OAAO,CAErE"}
@@ -6,7 +6,7 @@ const expandKey = Symbol("expand");
6
6
  * `properties` - Property names in the model returned from the get operation that can be used in a $expand query parameter.
7
7
  */
8
8
  export function $expand(context, target, ...properties) {
9
- context.program.stateMap(expandKey).set(target, properties);
9
+ context.program.stateMap(expandKey).set(target, properties.map(p => p.value));
10
10
  }
11
11
  export function getExpand(program, target) {
12
12
  return program.stateMap(expandKey).get(target) || [];
@@ -1 +1 @@
1
- {"version":3,"file":"expand.js","sourceRoot":"","sources":["../../../src/decorators/expand.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;AAEnC;;;;;GAKG;AACH,MAAM,UAAU,OAAO,CAAC,OAAyB,EAAE,MAAiB,EAAE,GAAG,UAAoB;IAC3F,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,OAAgB,EAAE,MAAiB;IAC3D,OAAO,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;AACvD,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,OAAgB,EAAE,MAAiB;IAC1D,OAAO,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACjD,CAAC"}
1
+ {"version":3,"file":"expand.js","sourceRoot":"","sources":["../../../src/decorators/expand.ts"],"names":[],"mappings":"AAGA,MAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;AAEnC;;;;;GAKG;AACH,MAAM,UAAU,OAAO,CAAC,OAAyB,EAAE,MAAiB,EAAE,GAAG,UAAgC;IACvG,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;AAChF,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,OAAgB,EAAE,MAAiB;IAC3D,OAAO,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;AACvD,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,OAAgB,EAAE,MAAiB;IAC1D,OAAO,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACjD,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { DecoratorContext, Operation, Program } from "@typespec/compiler";
2
+ import { DecoratorParameter } from "./decorator-parameter.js";
3
+ /**
4
+ * `@function` - mark an operation as a function
5
+ *
6
+ * `@function` can only be applied to operations.
7
+ */
8
+ export declare function $function(context: DecoratorContext, target: Operation, name?: DecoratorParameter): void;
9
+ export declare function isFunction(program: Program, target: Operation): boolean;
10
+ export declare function getFunction(program: Program, target: Operation): string | undefined;
11
+ //# sourceMappingURL=function.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"function.d.ts","sourceRoot":"","sources":["../../../src/decorators/function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAI9D;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,kBAAkB,QAEhG;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,WAE7D;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAEnF"}
@@ -0,0 +1,16 @@
1
+ const functionKey = Symbol("function");
2
+ /**
3
+ * `@function` - mark an operation as a function
4
+ *
5
+ * `@function` can only be applied to operations.
6
+ */
7
+ export function $function(context, target, name) {
8
+ context.program.stateMap(functionKey).set(target, (name === null || name === void 0 ? void 0 : name.value) || target.name);
9
+ }
10
+ export function isFunction(program, target) {
11
+ return program.stateMap(functionKey).has(target);
12
+ }
13
+ export function getFunction(program, target) {
14
+ return program.stateMap(functionKey).get(target);
15
+ }
16
+ //# sourceMappingURL=function.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"function.js","sourceRoot":"","sources":["../../../src/decorators/function.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AAEvC;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,OAAyB,EAAE,MAAiB,EAAE,IAAyB;IAC/F,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,KAAI,MAAM,CAAC,IAAI,CAAC,CAAC;AAChF,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"}
@@ -1,4 +1,5 @@
1
1
  import { DecoratorContext, Namespace, Program, Type } from "@typespec/compiler";
2
+ import { DecoratorParameter } from "../../decorator-parameter.js";
2
3
  export interface QueryParameter {
3
4
  name: string;
4
5
  value: string;
@@ -6,7 +7,7 @@ export interface QueryParameter {
6
7
  /**
7
8
  * \`@additionalQueryParameters\` - Appends a key=value pair to the query string of the mapped internal URL for all models defined within the namespace..
8
9
  */
9
- export declare function $additionalQueryParameters(context: DecoratorContext, target: Namespace, name: string, value: string): void;
10
+ export declare function $additionalQueryParameters(context: DecoratorContext, target: Namespace, nameParam: DecoratorParameter | undefined, valueParam: DecoratorParameter | undefined): void;
10
11
  export declare function getAdditionalQueryParameters(program: Program, target: Namespace): QueryParameter[];
11
12
  export declare function unpackAdditionalQueryParameters(program: Program, target: Type): {
12
13
  [key: string]: string;
@@ -1 +1 @@
1
- {"version":3,"file":"additional-query-parameters.d.ts","sourceRoot":"","sources":["../../../../../src/decorators/handlers/custom/additional-query-parameters.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,EAChB,SAAS,EACT,OAAO,EACP,IAAI,EACL,MAAM,oBAAoB,CAAC;AAE5B,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AASD;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,QAkBd;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,SAAS,GAChB,cAAc,EAAE,CAElB;AAED,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,IAAI,GACX;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAM3B"}
1
+ {"version":3,"file":"additional-query-parameters.d.ts","sourceRoot":"","sources":["../../../../../src/decorators/handlers/custom/additional-query-parameters.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,EAChB,SAAS,EACT,OAAO,EACP,IAAI,EACL,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAElE,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AASD;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,EACjB,SAAS,EAAE,kBAAkB,GAAG,SAAS,EACzC,UAAU,EAAE,kBAAkB,GAAG,SAAS,QAqB3C;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,SAAS,GAChB,cAAc,EAAE,CAElB;AAED,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,IAAI,GACX;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAM3B"}
@@ -8,7 +8,9 @@ const additionalQueryParametersDecorator = createDecoratorDefinition({
8
8
  /**
9
9
  * \`@additionalQueryParameters\` - Appends a key=value pair to the query string of the mapped internal URL for all models defined within the namespace..
10
10
  */
11
- export function $additionalQueryParameters(context, target, name, value) {
11
+ export function $additionalQueryParameters(context, target, nameParam, valueParam) {
12
+ const name = nameParam === undefined ? "" : nameParam.value;
13
+ const value = valueParam === undefined ? "" : valueParam.value;
12
14
  if (!additionalQueryParametersDecorator.validate(context, target, [name, value])) {
13
15
  return;
14
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"additional-query-parameters.js","sourceRoot":"","sources":["../../../../../src/decorators/handlers/custom/additional-query-parameters.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,GAK1B,MAAM,oBAAoB,CAAC;AAM5B,MAAM,4BAA4B,GAAG,MAAM,CAAC,2BAA2B,CAAC,CAAC;AAEzE,MAAM,kCAAkC,GAAG,yBAAyB,CAAC;IACnE,IAAI,EAAE,4BAA4B;IAClC,MAAM,EAAE,WAAW;IACnB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;CACtC,CAAC,CAAC;AAEZ;;GAEG;AACH,MAAM,UAAU,0BAA0B,CACxC,OAAyB,EACzB,MAAiB,EACjB,IAAY,EACZ,KAAa;IAEb,IAAI,CAAC,kCAAkC,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,EAAE;QAChF,OAAO;KACR;IAED,IAAI,eAAe,GAAqB,OAAO,CAAC,OAAO;SACpD,QAAQ,CAAC,4BAA4B,CAAC;SACtC,GAAG,CAAC,MAAM,CAAC,CAAC;IACf,IAAI,eAAe,KAAK,SAAS,EAAE;QACjC,eAAe,GAAG,EAAE,CAAC;QACrB,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,4BAA4B,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;KACrF;IAED,eAAe,CAAC,IAAI,CAAC;QACnB,IAAI;QACJ,KAAK;KACN,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,4BAA4B,CAC1C,OAAgB,EAChB,MAAiB;IAEjB,OAAO,OAAO,CAAC,QAAQ,CAAC,4BAA4B,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;AAC1E,CAAC;AAED,MAAM,UAAU,+BAA+B,CAC7C,OAAgB,EAChB,MAAY;IAEZ,MAAM,yBAAyB,GAAG,4BAA4B,CAAC,OAAO,EAAE,MAAmB,CAAC,CAAC;IAC7F,MAAM,eAAe,GACnB,yBAAyB;QACzB,yBAAyB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACzE,OAAO,EAAE,+BAA+B,EAAE,eAAe,EAAE,CAAC;AAC9D,CAAC"}
1
+ {"version":3,"file":"additional-query-parameters.js","sourceRoot":"","sources":["../../../../../src/decorators/handlers/custom/additional-query-parameters.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,GAK1B,MAAM,oBAAoB,CAAC;AAO5B,MAAM,4BAA4B,GAAG,MAAM,CAAC,2BAA2B,CAAC,CAAC;AAEzE,MAAM,kCAAkC,GAAG,yBAAyB,CAAC;IACnE,IAAI,EAAE,4BAA4B;IAClC,MAAM,EAAE,WAAW;IACnB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;CACtC,CAAC,CAAC;AAEZ;;GAEG;AACH,MAAM,UAAU,0BAA0B,CACxC,OAAyB,EACzB,MAAiB,EACjB,SAAyC,EACzC,UAA0C;IAE1C,MAAM,IAAI,GAAG,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EA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{ DecoratorContext, Enum, EnumMember, Interface, Model, ModelProperty, Operation, Program, Type } from "@typespec/compiler";
2
- export declare function $agsAttribute(context: DecoratorContext, target: Model | ModelProperty | Enum | EnumMember | Operation | Interface, name: string, value: string): void;
2
+ import { DecoratorParameter } from "../../decorator-parameter.js";
3
+ export declare function $agsAttribute(context: DecoratorContext, target: Model | ModelProperty | Enum | EnumMember | Operation | Interface, name: DecoratorParameter, value: DecoratorParameter): void;
3
4
  export declare function getAgsAttributes(program: Program, target: Model | ModelProperty | Enum | EnumMember | Operation | Interface): Map<string, string> | undefined;
4
5
  export declare function unpackAgsAttributes(program: Program, target: Type): {
5
6
  [key: string]: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ags-attribute.d.ts","sourceRoot":"","sources":["../../../../../src/decorators/handlers/custom/ags-attribute.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,EAChB,IAAI,EACJ,UAAU,EACV,SAAS,EACT,KAAK,EACL,aAAa,EACb,SAAS,EACT,OAAO,EACP,IAAI,EACL,MAAM,oBAAoB,CAAC;AAe5B,wBAAgB,aAAa,CAC3B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,KAAK,GAAG,aAAa,GAAG,IAAI,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,EACzE,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,QAiBd;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,KAAK,GAAG,aAAa,GAAG,IAAI,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,GACxE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAEjC;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAK7F"}
1
+ {"version":3,"file":"ags-attribute.d.ts","sourceRoot":"","sources":["../../../../../src/decorators/handlers/custom/ags-attribute.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,EAChB,IAAI,EACJ,UAAU,EACV,SAAS,EACT,KAAK,EACL,aAAa,EACb,SAAS,EACT,OAAO,EACP,IAAI,EACL,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAelE,wBAAgB,aAAa,CAC3B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,KAAK,GAAG,aAAa,GAAG,IAAI,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,EACzE,IAAI,EAAE,kBAAkB,EACxB,KAAK,EAAE,kBAAkB,QAiB1B;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,KAAK,GAAG,aAAa,GAAG,IAAI,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,GACxE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAEjC;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAK7F"}
@@ -10,17 +10,17 @@ const agsAttributeDecorator = createDecoratorDefinition({
10
10
  args: [{ kind: "String" }, { kind: "String" }],
11
11
  });
12
12
  export function $agsAttribute(context, target, name, value) {
13
- if (!agsAttributeDecorator.validate(context, target, [name, value])) {
13
+ if (!agsAttributeDecorator.validate(context, target, [name.value, value.value])) {
14
14
  return;
15
15
  }
16
16
  let attributeParameters = context.program
17
17
  .stateMap(agsAttributeKey)
18
18
  .get(target);
19
19
  if (attributeParameters) {
20
- attributeParameters.set(name, value);
20
+ attributeParameters.set(name.value, value.value);
21
21
  }
22
22
  else {
23
- attributeParameters = new Map([[name, value]]);
23
+ attributeParameters = new Map([[name.value, value.value]]);
24
24
  }
25
25
  context.program.stateMap(agsAttributeKey).set(target, attributeParameters);
26
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ags-attribute.js","sourceRoot":"","sources":["../../../../../src/decorators/handlers/custom/ags-attribute.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,GAU1B,MAAM,oBAAoB,CAAC;AAE5B;;;GAGG;AAEH,MAAM,eAAe,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;AAE/C,MAAM,qBAAqB,GAAG,yBAAyB,CAAC;IACtD,IAAI,EAAE,eAAe;IACrB,MAAM,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,WAAW,CAAC;IAClF,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;CACtC,CAAC,CAAC;AAEZ,MAAM,UAAU,aAAa,CAC3B,OAAyB,EACzB,MAAyE,EACzE,IAAY,EACZ,KAAa;IAEb,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,EAAE;QACnE,OAAO;KACR;IAED,IAAI,mBAAmB,GAAwB,OAAO,CAAC,OAAO;SAC3D,QAAQ,CAAC,eAAe,CAAC;SACzB,GAAG,CAAC,MAAM,CAAC,CAAC;IAEf,IAAI,mBAAmB,EAAE;QACvB,mBAAmB,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;KACtC;SAAM;QACL,mBAAmB,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;KAChD;IAED,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;AAC7E,CAAC;AAED,MAAM,UAAU,gBAAgB,CAC9B,OAAgB,EAChB,MAAyE;IAEzE,OAAO,OAAO,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AO;KACR;IAED,IAAI,mBAAmB,GAAwB,OAAO,CAAC,OAAO;SAC3D,QAAQ,CAAC,eAAe,CAAC;SACzB,GAAG,CAAC,MAAM,CAAC,CAAC;IAEf,IAAI,mBAAmB,EAAE;QACvB,mBAAmB,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;KAClD;SAAM;QACL,mBAAmB,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KAC5D;IAED,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;AAC7E,CAAC;AAED,MAAM,UAAU,gBAAgB,CAC9B,OAAgB,EAChB,MAAyE;IAEzE,OAAO,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACvD,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,OAAgB,EAAE,MAAY;IAChE,MAAM,UAAU,GAAG,gBAAgB,CAAC,OAAO,EAAE,MAA2E,CAAC,CAAC;IAC1H,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,OAAO,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,MAAM,GAAG,EAAE,GAAG,MAAM,EAAE,GAAG,EAAE,CAAC,OAAO,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC;IAC9F,OAAO,MAAM,IAAI,EAAE,CAAC;AACtB,CAAC"}
@@ -2,6 +2,7 @@
2
2
  * NOTICE: This is an autogenerated file and should not be edited directly.
3
3
  */
4
4
  import { DecoratorContext, EnumMember, Enum, Interface, Model, ModelProperty, Namespace, Operation, Program, Type } from "@typespec/compiler";
5
+ import { DecoratorParameter } from "../decorator-parameter.js";
5
6
  /**
6
7
  * `@isOwner` - specify the name of the workload associated with the model
7
8
  * `@isOwner` can be applied to Model, ModelProperty, Enum, EnumMember.
@@ -18,13 +19,13 @@ export declare function isPrivileged(program: Program, target: Type): boolean;
18
19
  *
19
20
  * `@workloadName` can be applied to Model, ModelProperty, Enum, EnumMember.
20
21
  */
21
- export declare function $workloadName(context: DecoratorContext, target: Model | ModelProperty | Enum | EnumMember, workloadName: string): void;
22
+ export declare function $workloadName(context: DecoratorContext, target: Model | ModelProperty | Enum | EnumMember, workloadName: DecoratorParameter): void;
22
23
  export declare function getWorkloadName(program: Program, target: Type): string | undefined;
23
24
  /**
24
25
  *
25
26
  * `@workloadNameMsa` can be applied to Model, ModelProperty, Enum, EnumMember.
26
27
  */
27
- export declare function $workloadNameMsa(context: DecoratorContext, target: Model | ModelProperty | Enum | EnumMember, workloadNameMsa: string): void;
28
+ export declare function $workloadNameMsa(context: DecoratorContext, target: Model | ModelProperty | Enum | EnumMember, workloadNameMsa: DecoratorParameter): void;
28
29
  export declare function getWorkloadNameMsa(program: Program, target: Type): string | undefined;
29
- export declare function buildAttributes(program: Program, type: Model | ModelProperty | Namespace | Interface | Operation | Enum | EnumMember): {};
30
+ export declare function buildAttributes(program: Program, type: Model | ModelProperty | Namespace | Interface | Operation | Enum | EnumMember): Record<string, string>;
30
31
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/decorators/handlers/index.ts"],"names":[],"mappings":"AACE;;GAEG;AAEL,OAAO,EAEL,gBAAgB,EAChB,UAAU,EACV,IAAI,EACJ,SAAS,EACT,KAAK,EACL,aAAa,EACb,SAAS,EACT,SAAS,EACT,OAAO,EACP,IAAI,EACL,MAAM,oBAAoB,CAAC;AAY5B;;;EAGE;AACF,wBAAgB,QAAQ,CACtB,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,KAAK,GAAG,aAAa,GAAG,IAAI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@@ -55,10 +55,10 @@ const workloadNameDecorator = createDecoratorDefinition({
55
55
  * `@workloadName` can be applied to Model, ModelProperty, Enum, EnumMember.
56
56
  */
57
57
  export function $workloadName(context, target, workloadName) {
58
- if (!workloadNameDecorator.validate(context, target, [workloadName])) {
58
+ if (!workloadNameDecorator.validate(context, target, [workloadName.value])) {
59
59
  return;
60
60
  }
61
- context.program.stateMap(workloadNameKey).set(target, workloadName);
61
+ context.program.stateMap(workloadNameKey).set(target, workloadName.value);
62
62
  }
63
63
  export function getWorkloadName(program, target) {
64
64
  return program.stateMap(workloadNameKey).get(target);
@@ -75,10 +75,10 @@ const workloadNameMsaDecorator = createDecoratorDefinition({
75
75
  * `@workloadNameMsa` can be applied to Model, ModelProperty, Enum, EnumMember.
76
76
  */
77
77
  export function $workloadNameMsa(context, target, workloadNameMsa) {
78
- if (!workloadNameMsaDecorator.validate(context, target, [workloadNameMsa])) {
78
+ if (!workloadNameMsaDecorator.validate(context, target, [workloadNameMsa.value])) {
79
79
  return;
80
80
  }
81
- context.program.stateMap(workloadNameMsaKey).set(target, workloadNameMsa);
81
+ context.program.stateMap(workloadNameMsaKey).set(target, workloadNameMsa.value);
82
82
  }
83
83
  export function getWorkloadNameMsa(program, target) {
84
84
  return program.stateMap(workloadNameMsaKey).get(target);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/decorators/handlers/index.ts"],"names":[],"mappings":"AACE;;GAEG;AAEL,OAAO,EACL,yBAAyB,GAW1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,aAAa,MAAM,mBAAmB,CAAC;AAEnD,wBAAwB;AAExB,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;AACrC,MAAM,gBAAgB,GAAG,yBAAyB,CAAC;IACjD,IAAI,EAAE,UAAU;IAChB,MAAM,EAAE,CAAC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,YAAY,CAAC;IACxD,IAAI,EAAE,EAAE;C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
@@ -1,11 +1,11 @@
1
1
  import { DecoratorContext, Model, Program } from "@typespec/compiler";
2
+ import { DecoratorParameter } from "./decorator-parameter.js";
2
3
  /**
3
4
  * `@hasStream` - indicates that an `@entity` model has a stream.
4
5
  *
5
- * `mediaTypes` - list of media types supported by the stream.
6
- * If not specified, the stream supports any media type.
6
+ * `mediaTypes` - list of media types supported by the stream. If not specified, the stream supports any media type.
7
7
  */
8
- export declare function $hasStream(context: DecoratorContext, target: Model, args?: string, ...mediaTypes: string[]): void;
8
+ export declare function $hasStream(context: DecoratorContext, target: Model, args?: DecoratorParameter, ...mediaTypes: DecoratorParameter[]): void;
9
9
  export declare function hasStream(program: Program, target: Model): boolean;
10
10
  export declare function getStreamTypes(program: Program, target: Model): string[];
11
11
  //# sourceMappingURL=has-stream.d.ts.map