@typespec/http-client-js 0.7.0-dev.2 → 0.7.0-dev.4

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 (180) hide show
  1. package/.testignore +4 -0
  2. package/dist/src/components/client-context/client-context-declaration.d.ts +2 -3
  3. package/dist/src/components/client-context/client-context-declaration.d.ts.map +1 -1
  4. package/dist/src/components/client-context/client-context-declaration.js +2 -2
  5. package/dist/src/components/client-context/client-context-factory.d.ts +3 -3
  6. package/dist/src/components/client-context/client-context-factory.d.ts.map +1 -1
  7. package/dist/src/components/client-context/client-context-factory.js +10 -10
  8. package/dist/src/components/client-context/client-context-options.d.ts +3 -3
  9. package/dist/src/components/client-context/client-context-options.d.ts.map +1 -1
  10. package/dist/src/components/client-context/client-context-options.js +3 -3
  11. package/dist/src/components/client-context/client-context.d.ts +3 -3
  12. package/dist/src/components/client-context/client-context.d.ts.map +1 -1
  13. package/dist/src/components/client-context/parametrized-endpoint.d.ts +3 -3
  14. package/dist/src/components/client-context/parametrized-endpoint.d.ts.map +1 -1
  15. package/dist/src/components/client-context/parametrized-endpoint.js +5 -5
  16. package/dist/src/components/client-directory.d.ts +4 -4
  17. package/dist/src/components/client-directory.d.ts.map +1 -1
  18. package/dist/src/components/client-directory.js +5 -5
  19. package/dist/src/components/client-operation.d.ts +4 -4
  20. package/dist/src/components/client-operation.d.ts.map +1 -1
  21. package/dist/src/components/client-operation.js +6 -6
  22. package/dist/src/components/client.d.ts +5 -5
  23. package/dist/src/components/client.d.ts.map +1 -1
  24. package/dist/src/components/client.js +14 -14
  25. package/dist/src/components/encoding-provider.d.ts +1 -1
  26. package/dist/src/components/encoding-provider.d.ts.map +1 -1
  27. package/dist/src/components/http-request-parameters-expression.d.ts +4 -4
  28. package/dist/src/components/http-request-parameters-expression.d.ts.map +1 -1
  29. package/dist/src/components/http-request-parameters-expression.js +10 -10
  30. package/dist/src/components/models.d.ts +1 -2
  31. package/dist/src/components/models.d.ts.map +1 -1
  32. package/dist/src/components/models.js +2 -3
  33. package/dist/src/components/operation-handlers/operation-pipeline.d.ts +1 -2
  34. package/dist/src/components/operation-handlers/operation-pipeline.d.ts.map +1 -1
  35. package/dist/src/components/operation-handlers/operation-pipeline.js +2 -2
  36. package/dist/src/components/operation-handlers/paging/page-response.d.ts +2 -3
  37. package/dist/src/components/operation-handlers/paging/page-response.d.ts.map +1 -1
  38. package/dist/src/components/operation-handlers/paging/page-response.js +3 -3
  39. package/dist/src/components/operation-handlers/paging/page-settings.d.ts +2 -3
  40. package/dist/src/components/operation-handlers/paging/page-settings.d.ts.map +1 -1
  41. package/dist/src/components/operation-handlers/paging/page-settings.js +3 -3
  42. package/dist/src/components/operation-handlers/paging/paginated-operation-handler.d.ts.map +1 -1
  43. package/dist/src/components/operation-handlers/paging/paginated-operation-handler.js +16 -16
  44. package/dist/src/components/operation-handlers/paging/request-send.d.ts +2 -3
  45. package/dist/src/components/operation-handlers/paging/request-send.d.ts.map +1 -1
  46. package/dist/src/components/operation-handlers/paging/request-send.js +1 -2
  47. package/dist/src/components/operation-handlers/types.d.ts +1 -1
  48. package/dist/src/components/operation-handlers/types.d.ts.map +1 -1
  49. package/dist/src/components/operation-options.d.ts +2 -3
  50. package/dist/src/components/operation-options.d.ts.map +1 -1
  51. package/dist/src/components/operation-options.js +3 -3
  52. package/dist/src/components/operation-parameters.d.ts +2 -2
  53. package/dist/src/components/operation-parameters.d.ts.map +1 -1
  54. package/dist/src/components/operation-parameters.js +2 -2
  55. package/dist/src/components/output.d.ts +3 -3
  56. package/dist/src/components/output.d.ts.map +1 -1
  57. package/dist/src/components/static-helpers/bytes-encoding.d.ts +6 -5
  58. package/dist/src/components/static-helpers/bytes-encoding.d.ts.map +1 -1
  59. package/dist/src/components/static-helpers/bytes-encoding.js +15 -19
  60. package/dist/src/components/static-helpers/interfaces.d.ts +3 -4
  61. package/dist/src/components/static-helpers/interfaces.d.ts.map +1 -1
  62. package/dist/src/components/static-helpers/interfaces.js +3 -3
  63. package/dist/src/components/static-helpers/multipart-helpers.d.ts +4 -5
  64. package/dist/src/components/static-helpers/multipart-helpers.d.ts.map +1 -1
  65. package/dist/src/components/static-helpers/multipart-helpers.js +8 -10
  66. package/dist/src/components/static-helpers/paging-helper.d.ts +3 -4
  67. package/dist/src/components/static-helpers/paging-helper.d.ts.map +1 -1
  68. package/dist/src/components/static-helpers/paging-helper.js +17 -23
  69. package/dist/src/components/static-helpers/rest-error.d.ts +3 -4
  70. package/dist/src/components/static-helpers/rest-error.d.ts.map +1 -1
  71. package/dist/src/components/static-helpers/rest-error.js +19 -25
  72. package/dist/src/components/testing/client-options.d.ts +3 -3
  73. package/dist/src/components/testing/client-options.d.ts.map +1 -1
  74. package/dist/src/components/testing/client-options.js +2 -2
  75. package/dist/src/components/transforms/content-type-encoding-provider.d.ts +1 -1
  76. package/dist/src/components/transforms/content-type-encoding-provider.d.ts.map +1 -1
  77. package/dist/src/components/transforms/json/json-array-transform.d.ts +6 -6
  78. package/dist/src/components/transforms/json/json-array-transform.d.ts.map +1 -1
  79. package/dist/src/components/transforms/json/json-array-transform.js +5 -5
  80. package/dist/src/components/transforms/json/json-model-additional-properties-transform.d.ts +4 -4
  81. package/dist/src/components/transforms/json/json-model-additional-properties-transform.d.ts.map +1 -1
  82. package/dist/src/components/transforms/json/json-model-additional-properties-transform.js +4 -4
  83. package/dist/src/components/transforms/json/json-model-base-transform.d.ts +4 -4
  84. package/dist/src/components/transforms/json/json-model-base-transform.d.ts.map +1 -1
  85. package/dist/src/components/transforms/json/json-model-property-transform.d.ts +3 -3
  86. package/dist/src/components/transforms/json/json-model-property-transform.d.ts.map +1 -1
  87. package/dist/src/components/transforms/json/json-model-property-transform.js +3 -3
  88. package/dist/src/components/transforms/json/json-model-transform.d.ts +6 -6
  89. package/dist/src/components/transforms/json/json-model-transform.d.ts.map +1 -1
  90. package/dist/src/components/transforms/json/json-model-transform.js +8 -8
  91. package/dist/src/components/transforms/json/json-record-transform.d.ts +6 -6
  92. package/dist/src/components/transforms/json/json-record-transform.d.ts.map +1 -1
  93. package/dist/src/components/transforms/json/json-record-transform.js +5 -5
  94. package/dist/src/components/transforms/json/json-transform-discriminator.d.ts +5 -5
  95. package/dist/src/components/transforms/json/json-transform-discriminator.d.ts.map +1 -1
  96. package/dist/src/components/transforms/json/json-transform-discriminator.js +13 -13
  97. package/dist/src/components/transforms/json/json-transform.d.ts +6 -5
  98. package/dist/src/components/transforms/json/json-transform.d.ts.map +1 -1
  99. package/dist/src/components/transforms/json/json-transform.js +2 -2
  100. package/dist/src/components/transforms/json/union-transform.d.ts +6 -6
  101. package/dist/src/components/transforms/json/union-transform.d.ts.map +1 -1
  102. package/dist/src/components/transforms/json/union-transform.js +6 -6
  103. package/dist/src/components/transforms/json/utils/transport-namer.d.ts +1 -1
  104. package/dist/src/components/transforms/json/utils/transport-namer.d.ts.map +1 -1
  105. package/dist/src/components/transforms/multipart/array-part-transform.d.ts +3 -3
  106. package/dist/src/components/transforms/multipart/array-part-transform.d.ts.map +1 -1
  107. package/dist/src/components/transforms/multipart/array-part-transform.js +5 -5
  108. package/dist/src/components/transforms/multipart/file-part-transform.d.ts +3 -3
  109. package/dist/src/components/transforms/multipart/file-part-transform.d.ts.map +1 -1
  110. package/dist/src/components/transforms/multipart/file-part-transform.js +2 -2
  111. package/dist/src/components/transforms/multipart/multipart-transform.d.ts +1 -2
  112. package/dist/src/components/transforms/multipart/multipart-transform.d.ts.map +1 -1
  113. package/dist/src/components/transforms/multipart/multipart-transform.js +2 -2
  114. package/dist/src/components/transforms/multipart/part-transform.d.ts +3 -3
  115. package/dist/src/components/transforms/multipart/part-transform.d.ts.map +1 -1
  116. package/dist/src/components/transforms/multipart/simple-part-transform.d.ts +3 -3
  117. package/dist/src/components/transforms/multipart/simple-part-transform.d.ts.map +1 -1
  118. package/dist/src/components/transforms/multipart/simple-part-transform.js +5 -5
  119. package/dist/src/components/transforms/operation-transform-declaration.d.ts +6 -6
  120. package/dist/src/components/transforms/operation-transform-declaration.d.ts.map +1 -1
  121. package/dist/src/components/transforms/operation-transform-declaration.js +3 -3
  122. package/dist/src/components/transforms/transform-name-policy.d.ts +1 -1
  123. package/dist/src/components/transforms/transform-name-policy.d.ts.map +1 -1
  124. package/dist/src/emitter.js +6 -6
  125. package/dist/src/utils/multipart.d.ts +1 -1
  126. package/dist/src/utils/multipart.d.ts.map +1 -1
  127. package/dist/src/utils/parameters.d.ts +2 -2
  128. package/dist/src/utils/parameters.d.ts.map +1 -1
  129. package/dist/src/utils/parameters.js +6 -6
  130. package/dist/tsconfig.tsbuildinfo +1 -1
  131. package/package.json +1 -1
  132. package/src/components/client-context/client-context-declaration.tsx +2 -2
  133. package/src/components/client-context/client-context-factory.tsx +19 -19
  134. package/src/components/client-context/client-context-options.tsx +5 -5
  135. package/src/components/client-context/client-context.tsx +2 -2
  136. package/src/components/client-context/parametrized-endpoint.tsx +8 -8
  137. package/src/components/client-directory.tsx +10 -10
  138. package/src/components/client-operation.tsx +11 -11
  139. package/src/components/client.tsx +21 -21
  140. package/src/components/encoding-provider.tsx +1 -1
  141. package/src/components/http-request-parameters-expression.tsx +19 -19
  142. package/src/components/models.tsx +2 -3
  143. package/src/components/operation-handlers/operation-pipeline.tsx +2 -2
  144. package/src/components/operation-handlers/paging/page-response.tsx +4 -4
  145. package/src/components/operation-handlers/paging/page-settings.tsx +4 -4
  146. package/src/components/operation-handlers/paging/paginated-operation-handler.tsx +18 -19
  147. package/src/components/operation-handlers/paging/request-send.tsx +1 -2
  148. package/src/components/operation-handlers/types.tsx +1 -1
  149. package/src/components/operation-options.tsx +4 -4
  150. package/src/components/operation-parameters.tsx +3 -3
  151. package/src/components/output.tsx +2 -2
  152. package/src/components/serializers.tsx +1 -1
  153. package/src/components/static-helpers/bytes-encoding.tsx +17 -16
  154. package/src/components/static-helpers/interfaces.tsx +3 -3
  155. package/src/components/static-helpers/multipart-helpers.tsx +7 -7
  156. package/src/components/static-helpers/paging-helper.tsx +17 -20
  157. package/src/components/static-helpers/rest-error.tsx +17 -17
  158. package/src/components/testing/client-options.tsx +3 -3
  159. package/src/components/transforms/content-type-encoding-provider.tsx +1 -1
  160. package/src/components/transforms/json/json-array-transform.tsx +8 -8
  161. package/src/components/transforms/json/json-model-additional-properties-transform.tsx +6 -6
  162. package/src/components/transforms/json/json-model-base-transform.tsx +3 -3
  163. package/src/components/transforms/json/json-model-property-transform.tsx +6 -6
  164. package/src/components/transforms/json/json-model-transform.tsx +12 -14
  165. package/src/components/transforms/json/json-record-transform.tsx +8 -8
  166. package/src/components/transforms/json/json-transform-discriminator.tsx +12 -12
  167. package/src/components/transforms/json/json-transform.tsx +6 -5
  168. package/src/components/transforms/json/union-transform.tsx +8 -8
  169. package/src/components/transforms/json/utils/transport-namer.ts +1 -1
  170. package/src/components/transforms/multipart/array-part-transform.tsx +6 -5
  171. package/src/components/transforms/multipart/file-part-transform.tsx +5 -5
  172. package/src/components/transforms/multipart/multipart-transform.tsx +3 -3
  173. package/src/components/transforms/multipart/part-transform.tsx +2 -2
  174. package/src/components/transforms/multipart/simple-part-transform.tsx +8 -8
  175. package/src/components/transforms/operation-transform-declaration.tsx +7 -6
  176. package/src/components/transforms/operation-transform-expression.tsx +1 -1
  177. package/src/components/transforms/transform-name-policy.ts +1 -1
  178. package/src/emitter.tsx +11 -11
  179. package/src/utils/multipart.ts +1 -1
  180. package/src/utils/parameters.tsx +9 -9
package/.testignore CHANGED
@@ -5,3 +5,7 @@ type/model/usage
5
5
  # Streams
6
6
 
7
7
  streaming
8
+
9
+ # discriminated union issue - https://github.com/microsoft/typespec/issues/7134
10
+
11
+ type/union/discriminated
@@ -1,8 +1,7 @@
1
- import * as ay from "@alloy-js/core";
2
1
  import * as cl from "@typespec/http-client";
3
2
  export interface ClientContextDeclarationProps {
4
3
  client: cl.Client;
5
4
  }
6
- export declare function getClientcontextDeclarationRef(client: cl.Client): ay.Refkey;
7
- export declare function ClientContextDeclaration(props: ClientContextDeclarationProps): ay.Children;
5
+ export declare function getClientcontextDeclarationRef(client: cl.Client): import("@alloy-js/core").Refkey;
6
+ export declare function ClientContextDeclaration(props: ClientContextDeclarationProps): import("@alloy-js/core").Children;
8
7
  //# sourceMappingURL=client-context-declaration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client-context-declaration.d.ts","sourceRoot":"","sources":["../../../../src/components/client-context/client-context-declaration.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAErC,OAAO,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAG5C,MAAM,WAAW,6BAA6B;IAC5C,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC;CACnB;AAED,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,aAE/D;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,eAY5E"}
1
+ {"version":3,"file":"client-context-declaration.d.ts","sourceRoot":"","sources":["../../../../src/components/client-context/client-context-declaration.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAG5C,MAAM,WAAW,6BAA6B;IAC5C,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC;CACnB;AAED,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,mCAE/D;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,qCAY5E"}
@@ -1,9 +1,9 @@
1
1
  import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
2
- import * as ay from "@alloy-js/core";
2
+ import { refkey } from "@alloy-js/core";
3
3
  import * as ts from "@alloy-js/typescript";
4
4
  import { httpRuntimeTemplateLib } from "../external-packages/ts-http-runtime.js";
5
5
  export function getClientcontextDeclarationRef(client) {
6
- return ay.refkey(client, "declaration");
6
+ return refkey(client, "declaration");
7
7
  }
8
8
  export function ClientContextDeclaration(props) {
9
9
  const ref = getClientcontextDeclarationRef(props.client);
@@ -1,8 +1,8 @@
1
- import * as ay from "@alloy-js/core";
1
+ import { Children, Refkey } from "@alloy-js/core";
2
2
  import * as cl from "@typespec/http-client";
3
3
  export interface ClientContextFactoryProps {
4
4
  client: cl.Client;
5
5
  }
6
- export declare function getClientContextFactoryRef(client: cl.Client): ay.Refkey;
7
- export declare function ClientContextFactoryDeclaration(props: ClientContextFactoryProps): ay.Children;
6
+ export declare function getClientContextFactoryRef(client: cl.Client): Refkey;
7
+ export declare function ClientContextFactoryDeclaration(props: ClientContextFactoryProps): Children;
8
8
  //# sourceMappingURL=client-context-factory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client-context-factory.d.ts","sourceRoot":"","sources":["../../../../src/components/client-context/client-context-factory.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAKrC,OAAO,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAQ5C,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC;CACnB;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,aAE3D;AAED,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,yBAAyB,eA+C/E"}
1
+ {"version":3,"file":"client-context-factory.d.ts","sourceRoot":"","sources":["../../../../src/components/client-context/client-context-factory.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAqB,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAKrE,OAAO,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAQ5C,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC;CACnB;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,UAE3D;AAED,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,yBAAyB,YA+C/E"}
@@ -1,5 +1,5 @@
1
1
  import { createComponent as _$createComponent, memo as _$memo } from "@alloy-js/core/jsx-runtime";
2
- import * as ay from "@alloy-js/core";
2
+ import { For, List, refkey } from "@alloy-js/core";
3
3
  import * as ts from "@alloy-js/typescript";
4
4
  import { useTsp } from "@typespec/emitter-framework";
5
5
  import { FunctionDeclaration } from "@typespec/emitter-framework/typescript";
@@ -10,7 +10,7 @@ import { addClientTestOptions } from "../testing/client-options.js";
10
10
  import { getClientcontextDeclarationRef } from "./client-context-declaration.js";
11
11
  import { ParametrizedEndpoint } from "./parametrized-endpoint.js";
12
12
  export function getClientContextFactoryRef(client) {
13
- return ay.refkey(client, "contextFactory");
13
+ return refkey(client, "contextFactory");
14
14
  }
15
15
  export function ClientContextFactoryDeclaration(props) {
16
16
  const {
@@ -21,9 +21,9 @@ export function ClientContextFactoryDeclaration(props) {
21
21
  const namePolicy = ts.useTSNamePolicy();
22
22
  const factoryFunctionName = namePolicy.getName(`create_${props.client.name}Context`, "function");
23
23
  const clientConstructor = $.client.getConstructor(props.client);
24
- const parameters = buildClientParameters(props.client, ay.refkey());
24
+ const parameters = buildClientParameters(props.client, refkey());
25
25
  const urlTemplate = $.client.getUrlTemplate(props.client);
26
- const endpointRef = ay.refkey();
26
+ const endpointRef = refkey();
27
27
  const resolvedEndpoint = _$createComponent(ParametrizedEndpoint, {
28
28
  refkey: endpointRef,
29
29
  get template() {
@@ -84,7 +84,7 @@ function AuthScheme(props) {
84
84
  case "http":
85
85
  return _$createComponent(ts.ObjectExpression, {
86
86
  get children() {
87
- return _$createComponent(ay.List, {
87
+ return _$createComponent(List, {
88
88
  comma: true,
89
89
  get children() {
90
90
  return [_$createComponent(ts.ObjectProperty, {
@@ -109,7 +109,7 @@ function AuthScheme(props) {
109
109
  }
110
110
  return _$createComponent(ts.ObjectExpression, {
111
111
  get children() {
112
- return _$createComponent(ay.List, {
112
+ return _$createComponent(List, {
113
113
  comma: true,
114
114
  get children() {
115
115
  return [_$createComponent(ts.ObjectProperty, {
@@ -133,7 +133,7 @@ function AuthScheme(props) {
133
133
  case "oauth2":
134
134
  return _$createComponent(ts.ObjectExpression, {
135
135
  get children() {
136
- return _$createComponent(ay.List, {
136
+ return _$createComponent(List, {
137
137
  comma: true,
138
138
  get children() {
139
139
  return [_$createComponent(ts.ObjectProperty, {
@@ -142,7 +142,7 @@ function AuthScheme(props) {
142
142
  }), _$createComponent(ts.ObjectProperty, {
143
143
  name: "flows",
144
144
  get children() {
145
- return ["[", _$createComponent(ay.For, {
145
+ return ["[", _$createComponent(For, {
146
146
  get each() {
147
147
  return props.scheme.flows;
148
148
  },
@@ -192,7 +192,7 @@ function AuthSchemeOptions(props) {
192
192
  return _$createComponent(ts.ObjectProperty, {
193
193
  name: "authSchemes",
194
194
  get children() {
195
- return ["[", _$createComponent(ay.For, {
195
+ return ["[", _$createComponent(For, {
196
196
  each: supportedSchemes,
197
197
  comma: true,
198
198
  line: true,
@@ -219,7 +219,7 @@ function ClientOptionsExpression(props) {
219
219
  }
220
220
  return _$createComponent(ts.ObjectExpression, {
221
221
  get children() {
222
- return _$createComponent(ay.For, {
222
+ return _$createComponent(For, {
223
223
  each: options,
224
224
  joiner: ",",
225
225
  line: true,
@@ -1,8 +1,8 @@
1
- import * as ay from "@alloy-js/core";
1
+ import { Children } from "@alloy-js/core";
2
2
  import * as cl from "@typespec/http-client";
3
3
  export interface ClientContextOptionsDeclarationProps {
4
4
  client: cl.Client;
5
5
  }
6
- export declare function getClientContextOptionsRef(client: cl.Client): ay.Refkey;
7
- export declare function ClientContextOptionsDeclaration(props: ClientContextOptionsDeclarationProps): ay.Children;
6
+ export declare function getClientContextOptionsRef(client: cl.Client): import("@alloy-js/core").Refkey;
7
+ export declare function ClientContextOptionsDeclaration(props: ClientContextOptionsDeclarationProps): Children;
8
8
  //# sourceMappingURL=client-context-options.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client-context-options.d.ts","sourceRoot":"","sources":["../../../../src/components/client-context/client-context-options.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAErC,OAAO,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAG5C,MAAM,WAAW,oCAAoC;IACnD,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC;CACnB;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,aAE3D;AAED,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,oCAAoC,eAqB1F"}
1
+ {"version":3,"file":"client-context-options.d.ts","sourceRoot":"","sources":["../../../../src/components/client-context/client-context-options.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,MAAM,gBAAgB,CAAC;AAEvD,OAAO,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAG5C,MAAM,WAAW,oCAAoC;IACnD,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC;CACnB;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,mCAE3D;AAED,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,oCAAoC,YAqB1F"}
@@ -1,9 +1,9 @@
1
1
  import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
2
- import * as ay from "@alloy-js/core";
2
+ import { For, refkey } from "@alloy-js/core";
3
3
  import * as ts from "@alloy-js/typescript";
4
4
  import { httpRuntimeTemplateLib } from "../external-packages/ts-http-runtime.js";
5
5
  export function getClientContextOptionsRef(client) {
6
- return ay.refkey(client, "options");
6
+ return refkey(client, "options");
7
7
  }
8
8
  export function ClientContextOptionsDeclaration(props) {
9
9
  const ref = getClientContextOptionsRef(props.client);
@@ -24,7 +24,7 @@ export function ClientContextOptionsDeclaration(props) {
24
24
  });
25
25
  },
26
26
  get children() {
27
- return [_$createComponent(ay.For, {
27
+ return [_$createComponent(For, {
28
28
  get each() {
29
29
  return Array.from(clientOptions.entries());
30
30
  },
@@ -1,8 +1,8 @@
1
- import * as ay from "@alloy-js/core";
1
+ import { type Children } from "@alloy-js/core";
2
2
  import * as cl from "@typespec/http-client";
3
3
  export interface ClientContextProps {
4
4
  client: cl.Client;
5
- children?: ay.Children;
5
+ children?: Children;
6
6
  }
7
- export declare function ClientContext(props: ClientContextProps): ay.Children;
7
+ export declare function ClientContext(props: ClientContextProps): Children;
8
8
  //# sourceMappingURL=client-context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client-context.d.ts","sourceRoot":"","sources":["../../../../src/components/client-context/client-context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAErC,OAAO,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAK5C,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC;CACxB;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,eAUtD"}
1
+ {"version":3,"file":"client-context.d.ts","sourceRoot":"","sources":["../../../../src/components/client-context/client-context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAK5C,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,YAUtD"}
@@ -1,9 +1,9 @@
1
- import * as ay from "@alloy-js/core";
1
+ import { Refkey } from "@alloy-js/core";
2
2
  import { ModelProperty } from "@typespec/compiler";
3
3
  export interface ParametrizedEndpointProps {
4
- refkey: ay.Refkey;
4
+ refkey: Refkey;
5
5
  template: string;
6
6
  params: ModelProperty[];
7
7
  }
8
- export declare function ParametrizedEndpoint(props: ParametrizedEndpointProps): ay.Children;
8
+ export declare function ParametrizedEndpoint(props: ParametrizedEndpointProps): import("@alloy-js/core").Children;
9
9
  //# sourceMappingURL=parametrized-endpoint.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"parametrized-endpoint.d.ts","sourceRoot":"","sources":["../../../../src/components/client-context/parametrized-endpoint.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAErC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAInD,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,aAAa,EAAE,CAAC;CACzB;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,eAqCpE"}
1
+ {"version":3,"file":"parametrized-endpoint.d.ts","sourceRoot":"","sources":["../../../../src/components/client-context/parametrized-endpoint.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,MAAM,EAAyB,MAAM,gBAAgB,CAAC;AAE1E,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAInD,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,aAAa,EAAE,CAAC;CACzB;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,qCAqCpE"}
@@ -1,11 +1,11 @@
1
1
  import { createComponent as _$createComponent, memo as _$memo } from "@alloy-js/core/jsx-runtime";
2
- import * as ay from "@alloy-js/core";
2
+ import { code, For, refkey, StatementList } from "@alloy-js/core";
3
3
  import * as ts from "@alloy-js/typescript";
4
4
  import { useTransformNamePolicy } from "@typespec/emitter-framework";
5
5
  import { getDefaultValue } from "../../utils/parameters.js";
6
6
  export function ParametrizedEndpoint(props) {
7
7
  const propNamer = useTransformNamePolicy();
8
- const paramsRef = ay.refkey();
8
+ const paramsRef = refkey();
9
9
  const params = _$createComponent(ts.VarDeclaration, {
10
10
  name: "params",
11
11
  type: "Record<string, any>",
@@ -13,7 +13,7 @@ export function ParametrizedEndpoint(props) {
13
13
  get children() {
14
14
  return _$createComponent(ts.ObjectExpression, {
15
15
  get children() {
16
- return _$createComponent(ay.For, {
16
+ return _$createComponent(For, {
17
17
  get each() {
18
18
  return props.params;
19
19
  },
@@ -40,14 +40,14 @@ export function ParametrizedEndpoint(props) {
40
40
  return props.refkey;
41
41
  },
42
42
  get children() {
43
- return ay.code`
43
+ return code`
44
44
  "${props.template}".replace(/{([^}]+)}/g, (_, key) =>
45
45
  key in ${paramsRef} ? String(params[key]) : (() => { throw new Error(\`Missing parameter: $\{key}\`); })()
46
46
  );
47
47
  `;
48
48
  }
49
49
  });
50
- return _$createComponent(ay.StatementList, {
50
+ return _$createComponent(StatementList, {
51
51
  get children() {
52
52
  return [params, resolvedEndpoint];
53
53
  }
@@ -1,11 +1,11 @@
1
- import * as ay from "@alloy-js/core";
1
+ import { Children } from "@alloy-js/core";
2
2
  import * as cl from "@typespec/http-client";
3
3
  export interface OperationsDirectoryProps {
4
- children?: ay.Children;
4
+ children?: Children;
5
5
  }
6
- export declare function OperationsDirectory(props: OperationsDirectoryProps): ay.Children;
6
+ export declare function OperationsDirectory(props: OperationsDirectoryProps): Children;
7
7
  export interface SubClientsProps {
8
8
  client: cl.Client;
9
9
  }
10
- export declare function SubClients(props: SubClientsProps): ay.Children;
10
+ export declare function SubClients(props: SubClientsProps): Children;
11
11
  //# sourceMappingURL=client-directory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client-directory.d.ts","sourceRoot":"","sources":["../../../src/components/client-directory.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAErC,OAAO,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAK5C,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC;CACxB;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,eAclE;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC;CACnB;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,eAkBhD"}
1
+ {"version":3,"file":"client-directory.d.ts","sourceRoot":"","sources":["../../../src/components/client-directory.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAuC,MAAM,gBAAgB,CAAC;AAE/E,OAAO,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAK5C,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,YAclE;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC;CACnB;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,YAkBhD"}
@@ -1,5 +1,5 @@
1
1
  import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
2
- import * as ay from "@alloy-js/core";
2
+ import { For, SourceDirectory, StatementList } from "@alloy-js/core";
3
3
  import * as ts from "@alloy-js/typescript";
4
4
  import { useClientLibrary } from "@typespec/http-client";
5
5
  import { ClientContext } from "./client-context/client-context.js";
@@ -9,11 +9,11 @@ export function OperationsDirectory(props) {
9
9
  topLevel: clients
10
10
  } = useClientLibrary();
11
11
  // If it is the root client, we don't need to create a directory
12
- return _$createComponent(ay.For, {
12
+ return _$createComponent(For, {
13
13
  each: clients,
14
14
  joiner: ",",
15
15
  line: true,
16
- children: client => _$createComponent(ay.StatementList, {
16
+ children: client => _$createComponent(StatementList, {
17
17
  get children() {
18
18
  return [_$createComponent(ClientOperations, {
19
19
  client: client
@@ -28,12 +28,12 @@ export function OperationsDirectory(props) {
28
28
  }
29
29
  export function SubClients(props) {
30
30
  const subClients = props.client.subClients;
31
- return _$createComponent(ay.For, {
31
+ return _$createComponent(For, {
32
32
  each: subClients,
33
33
  children: subClient => {
34
34
  const namePolicy = ts.useTSNamePolicy();
35
35
  const subClientName = namePolicy.getName(subClient.name, "variable");
36
- return _$createComponent(ay.SourceDirectory, {
36
+ return _$createComponent(SourceDirectory, {
37
37
  path: subClientName,
38
38
  get children() {
39
39
  return [_$createComponent(ClientOperations, {
@@ -1,14 +1,14 @@
1
- import * as ay from "@alloy-js/core";
1
+ import { Refkey } from "@alloy-js/core";
2
2
  import { HttpOperation } from "@typespec/http";
3
3
  import * as cl from "@typespec/http-client";
4
4
  export interface ClientOperationsProps {
5
5
  client: cl.Client;
6
6
  }
7
- export declare function ClientOperations(props: ClientOperationsProps): ay.Children;
7
+ export declare function ClientOperations(props: ClientOperationsProps): import("@alloy-js/core").Children;
8
8
  export interface ClientOperationProps {
9
9
  httpOperation: HttpOperation;
10
- refkey: ay.Refkey;
10
+ refkey: Refkey;
11
11
  internal?: boolean;
12
12
  }
13
- export declare function ClientOperation(props: ClientOperationProps): ay.Children;
13
+ export declare function ClientOperation(props: ClientOperationProps): import("@alloy-js/core").Children;
14
14
  //# sourceMappingURL=client-operation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client-operation.d.ts","sourceRoot":"","sources":["../../../src/components/client-operation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAIrC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAU5C,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC;CACnB;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,eAqB5D;AAED,MAAM,WAAW,oBAAoB;IACnC,aAAa,EAAE,aAAa,CAAC;IAC7B,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAMD,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,eAgD1D"}
1
+ {"version":3,"file":"client-operation.d.ts","sourceRoot":"","sources":["../../../src/components/client-operation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,MAAM,EAAU,MAAM,gBAAgB,CAAC;AAI3D,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAU5C,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC;CACnB;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,qCAqB5D;AAED,MAAM,WAAW,oBAAoB;IACnC,aAAa,EAAE,aAAa,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAMD,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,qCAgD1D"}
@@ -1,5 +1,5 @@
1
1
  import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
2
- import * as ay from "@alloy-js/core";
2
+ import { For, List, refkey } from "@alloy-js/core";
3
3
  import * as ts from "@alloy-js/typescript";
4
4
  import { useTsp } from "@typespec/emitter-framework";
5
5
  import { FunctionDeclaration, TypeExpression } from "@typespec/emitter-framework/typescript";
@@ -22,7 +22,7 @@ export function ClientOperations(props) {
22
22
  return _$createComponent(ts.SourceFile, {
23
23
  path: `${fileName}.ts`,
24
24
  get children() {
25
- return _$createComponent(ay.For, {
25
+ return _$createComponent(For, {
26
26
  each: clientOperations,
27
27
  children: operation => _$createComponent(OperationPipeline, {
28
28
  get httpOperation() {
@@ -37,7 +37,7 @@ export function ClientOperations(props) {
37
37
  });
38
38
  }
39
39
  function getClientOperationOptionsParamRef(httpOperation) {
40
- return ay.refkey(httpOperation, "client-operation-options-parameter");
40
+ return refkey(httpOperation, "client-operation-options-parameter");
41
41
  }
42
42
  export function ClientOperation(props) {
43
43
  const {
@@ -54,13 +54,13 @@ export function ClientOperation(props) {
54
54
  return;
55
55
  }
56
56
  const returnType = $.httpOperation.getReturnType(props.httpOperation);
57
- const responseRefkey = ay.refkey(props.httpOperation, "http-response");
57
+ const responseRefkey = refkey(props.httpOperation, "http-response");
58
58
  const clientContextInterfaceRef = getClientcontextDeclarationRef(client);
59
59
  const signatureParams = [{
60
60
  name: "client",
61
61
  type: clientContextInterfaceRef
62
62
  }, ...getOperationParameters(props.httpOperation, optionsRefkey)];
63
- return _$createComponent(ay.List, {
63
+ return _$createComponent(List, {
64
64
  hardline: true,
65
65
  get children() {
66
66
  return [_$createComponent(OperationOptionsDeclaration, {
@@ -86,7 +86,7 @@ export function ClientOperation(props) {
86
86
  return props.refkey;
87
87
  },
88
88
  get children() {
89
- return _$createComponent(ay.List, {
89
+ return _$createComponent(List, {
90
90
  hardline: true,
91
91
  get children() {
92
92
  return [_$createComponent(HttpRequest, {
@@ -1,15 +1,15 @@
1
- import * as ay from "@alloy-js/core";
1
+ import { Refkey } from "@alloy-js/core";
2
2
  import * as cl from "@typespec/http-client";
3
3
  export interface ClientProps {
4
4
  }
5
- export declare function Client(props: ClientProps): ay.Children;
5
+ export declare function Client(props: ClientProps): import("@alloy-js/core").Children;
6
6
  export interface ClientClassProps {
7
7
  client: cl.Client;
8
8
  }
9
- export declare function getClientClassRef(client: cl.Client): ay.Refkey;
10
- export declare function ClientClass(props: ClientClassProps): ay.Children;
9
+ export declare function getClientClassRef(client: cl.Client): Refkey;
10
+ export declare function ClientClass(props: ClientClassProps): import("@alloy-js/core").Children;
11
11
  export interface NewClientExpressionProps {
12
12
  client: cl.Client;
13
- args: ay.Refkey[];
13
+ args: Refkey[];
14
14
  }
15
15
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/components/client.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAIrC,OAAO,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAQ5C,MAAM,WAAW,WAAW;CAAG;AAE/B,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,eAoBxC;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC;CACnB;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,aAElD;AAKD,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,eAiDlD;AAkED,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC;IAClB,IAAI,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC;CACnB"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/components/client.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,MAAM,EAAU,MAAM,gBAAgB,CAAC;AAI3D,OAAO,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAQ5C,MAAM,WAAW,WAAW;CAAG;AAE/B,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,qCAoBxC;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC;CACnB;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,UAElD;AAKD,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,qCAiDlD;AAkED,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB"}
@@ -1,5 +1,5 @@
1
1
  import { createComponent as _$createComponent, createIntrinsic as _$createIntrinsic } from "@alloy-js/core/jsx-runtime";
2
- import * as ay from "@alloy-js/core";
2
+ import { For, List, refkey } from "@alloy-js/core";
3
3
  import * as ts from "@alloy-js/typescript";
4
4
  import { useTsp } from "@typespec/emitter-framework";
5
5
  import { ClassMethod } from "@typespec/emitter-framework/typescript";
@@ -17,7 +17,7 @@ export function Client(props) {
17
17
  const {
18
18
  topLevel
19
19
  } = useClientLibrary();
20
- return _$createComponent(ay.For, {
20
+ return _$createComponent(For, {
21
21
  each: topLevel,
22
22
  hardline: true,
23
23
  children: client => {
@@ -26,7 +26,7 @@ export function Client(props) {
26
26
  return _$createComponent(ts.SourceFile, {
27
27
  path: `${fileName}.ts`,
28
28
  get children() {
29
- return _$createComponent(ay.For, {
29
+ return _$createComponent(For, {
30
30
  each: flatClients,
31
31
  hardline: true,
32
32
  children: client => _$createComponent(ClientClass, {
@@ -39,10 +39,10 @@ export function Client(props) {
39
39
  });
40
40
  }
41
41
  export function getClientClassRef(client) {
42
- return ay.refkey(client.type, "client-class");
42
+ return refkey(client.type, "client-class");
43
43
  }
44
44
  function getClientContextFieldRef(client) {
45
- return ay.refkey(client.type, "client-context");
45
+ return refkey(client.type, "client-context");
46
46
  }
47
47
  export function ClientClass(props) {
48
48
  const {
@@ -60,7 +60,7 @@ export function ClientClass(props) {
60
60
  name: clientName,
61
61
  refkey: clientClassRef,
62
62
  get children() {
63
- return _$createComponent(ay.List, {
63
+ return _$createComponent(List, {
64
64
  hardline: true,
65
65
  get children() {
66
66
  return [_$createComponent(ts.ClassField, {
@@ -68,7 +68,7 @@ export function ClientClass(props) {
68
68
  jsPrivate: true,
69
69
  refkey: contextMemberRef,
70
70
  type: contextDeclarationRef
71
- }), _$createComponent(ay.For, {
71
+ }), _$createComponent(For, {
72
72
  each: subClients,
73
73
  hardline: true,
74
74
  semicolon: true,
@@ -79,12 +79,12 @@ export function ClientClass(props) {
79
79
  get client() {
80
80
  return props.client;
81
81
  }
82
- }), _$createComponent(ay.For, {
82
+ }), _$createComponent(For, {
83
83
  each: operations,
84
84
  hardline: true,
85
85
  semicolon: true,
86
86
  children: op => {
87
- const parameters = getOperationParameters(op.httpOperation, ay.refkey());
87
+ const parameters = getOperationParameters(op.httpOperation, refkey());
88
88
  const args = parameters.flatMap(p => p.refkey);
89
89
  const isPaging = Boolean($.operation.getPagingMetadata(op.httpOperation.operation));
90
90
  return _$createComponent(ClassMethod, {
@@ -98,7 +98,7 @@ export function ClientClass(props) {
98
98
  get children() {
99
99
  return ["return", " ", _$createComponent(ts.FunctionCallExpression, {
100
100
  get target() {
101
- return ay.refkey(op.httpOperation.operation);
101
+ return refkey(op.httpOperation.operation);
102
102
  },
103
103
  get args() {
104
104
  return [contextMemberRef, ...args];
@@ -114,7 +114,7 @@ export function ClientClass(props) {
114
114
  });
115
115
  }
116
116
  function getSubClientClassFieldRef(client) {
117
- return ay.refkey(client.type, "client-field");
117
+ return refkey(client.type, "client-field");
118
118
  }
119
119
  function SubClientClassField(props) {
120
120
  const {
@@ -143,7 +143,7 @@ function ClientConstructor(props) {
143
143
  const subClients = props.client.subClients.filter(sc => $.client.haveSameConstructor(sc, props.client));
144
144
  const clientContextFieldRef = getClientContextFieldRef(props.client);
145
145
  const clientContextFactoryRef = getClientContextFactoryRef(props.client);
146
- const constructorParameters = buildClientParameters(props.client, ay.refkey());
146
+ const constructorParameters = buildClientParameters(props.client, refkey());
147
147
  const args = Object.values(constructorParameters).map(p => p.refkey);
148
148
  return _$createComponent(ts.ClassMethod, {
149
149
  name: "constructor",
@@ -152,7 +152,7 @@ function ClientConstructor(props) {
152
152
  return [clientContextFieldRef, " =", " ", _$createComponent(ts.FunctionCallExpression, {
153
153
  target: clientContextFactoryRef,
154
154
  args: args
155
- }), ";", _$createIntrinsic("br", {}), _$createComponent(ay.For, {
155
+ }), ";", _$createIntrinsic("br", {}), _$createComponent(For, {
156
156
  each: subClients,
157
157
  joiner: ";",
158
158
  hardline: true,
@@ -169,7 +169,7 @@ function ClientConstructor(props) {
169
169
  });
170
170
  }
171
171
  function calculateSubClientArgs(subClient, parentParams) {
172
- const subClientParams = buildClientParameters(subClient, ay.refkey()).map(p => p.name);
172
+ const subClientParams = buildClientParameters(subClient, refkey()).map(p => p.name);
173
173
  return parentParams.filter(({
174
174
  name
175
175
  }) => subClientParams.includes(name)).flatMap(p => p.refkey ? p.refkey : []);
@@ -1,4 +1,4 @@
1
- import { Children } from "@alloy-js/core";
1
+ import { type Children } from "@alloy-js/core";
2
2
  import { EncodingDefaults } from "../context/encoding/types.js";
3
3
  export interface EncodingProviderProps {
4
4
  defaults?: EncodingDefaults;
@@ -1 +1 @@
1
- {"version":3,"file":"encoding-provider.d.ts","sourceRoot":"","sources":["../../../src/components/encoding-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,YAQ5D"}
1
+ {"version":3,"file":"encoding-provider.d.ts","sourceRoot":"","sources":["../../../src/components/encoding-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,YAQ5D"}
@@ -1,10 +1,10 @@
1
- import * as ay from "@alloy-js/core";
1
+ import { Children } from "@alloy-js/core";
2
2
  import { HttpOperation, HttpProperty } from "@typespec/http";
3
3
  export interface HttpRequestParametersExpressionProps {
4
4
  httpOperation: HttpOperation;
5
- optionsParameter: ay.Children;
5
+ optionsParameter: Children;
6
6
  parameters?: HttpProperty[];
7
- children?: ay.Children;
7
+ children?: Children;
8
8
  }
9
- export declare function HttpRequestParametersExpression(props: HttpRequestParametersExpressionProps): ay.Children;
9
+ export declare function HttpRequestParametersExpression(props: HttpRequestParametersExpressionProps): Children;
10
10
  //# sourceMappingURL=http-request-parameters-expression.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"http-request-parameters-expression.d.ts","sourceRoot":"","sources":["../../../src/components/http-request-parameters-expression.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAGrC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG7D,MAAM,WAAW,oCAAoC;IACnD,aAAa,EAAE,aAAa,CAAC;IAC7B,gBAAgB,EAAE,EAAE,CAAC,QAAQ,CAAC;IAC9B,UAAU,CAAC,EAAE,YAAY,EAAE,CAAC;IAC5B,QAAQ,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC;CACxB;AAED,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,oCAAoC,eA4D1F"}
1
+ {"version":3,"file":"http-request-parameters-expression.d.ts","sourceRoot":"","sources":["../../../src/components/http-request-parameters-expression.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAqD,MAAM,gBAAgB,CAAC;AAG7F,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG7D,MAAM,WAAW,oCAAoC;IACnD,aAAa,EAAE,aAAa,CAAC;IAC7B,gBAAgB,EAAE,QAAQ,CAAC;IAC3B,UAAU,CAAC,EAAE,YAAY,EAAE,CAAC;IAC5B,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,oCAAoC,YA4D1F"}