@typespec/http-client-js 0.2.0-dev.2 → 0.2.0-dev.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.
- package/dist/src/components/client-context/client-context-declaration.d.ts.map +1 -1
- package/dist/src/components/client-context/client-context-declaration.js.map +1 -1
- package/dist/src/components/client-context/client-context-factory.d.ts.map +1 -1
- package/dist/src/components/client-context/client-context-factory.js +7 -4
- package/dist/src/components/client-context/client-context-factory.js.map +1 -1
- package/dist/src/components/client-context/client-context-options.d.ts.map +1 -1
- package/dist/src/components/client-context/client-context-options.js +13 -9
- package/dist/src/components/client-context/client-context-options.js.map +1 -1
- package/dist/src/components/client-context/client-context.d.ts.map +1 -1
- package/dist/src/components/client-context/client-context.js +7 -12
- package/dist/src/components/client-context/client-context.js.map +1 -1
- package/dist/src/components/client-context/parametrized-endpoint.d.ts +1 -1
- package/dist/src/components/client-context/parametrized-endpoint.d.ts.map +1 -1
- package/dist/src/components/client-context/parametrized-endpoint.js +22 -13
- package/dist/src/components/client-context/parametrized-endpoint.js.map +1 -1
- package/dist/src/components/client-directory.d.ts +2 -2
- package/dist/src/components/client-directory.d.ts.map +1 -1
- package/dist/src/components/client-directory.js +33 -21
- package/dist/src/components/client-directory.js.map +1 -1
- package/dist/src/components/client-operation.d.ts.map +1 -1
- package/dist/src/components/client-operation.js +6 -6
- package/dist/src/components/client-operation.js.map +1 -1
- package/dist/src/components/client.d.ts +1 -1
- package/dist/src/components/client.d.ts.map +1 -1
- package/dist/src/components/client.js +83 -64
- package/dist/src/components/client.js.map +1 -1
- package/dist/src/components/encoding-provider.d.ts.map +1 -1
- package/dist/src/components/encoding-provider.js +0 -1
- package/dist/src/components/encoding-provider.js.map +1 -1
- package/dist/src/components/http-request-options.d.ts.map +1 -1
- package/dist/src/components/http-request-options.js +3 -3
- package/dist/src/components/http-request-options.js.map +1 -1
- package/dist/src/components/http-request-parameters-expression.d.ts +1 -2
- package/dist/src/components/http-request-parameters-expression.d.ts.map +1 -1
- package/dist/src/components/http-request-parameters-expression.js +37 -33
- package/dist/src/components/http-request-parameters-expression.js.map +1 -1
- package/dist/src/components/http-request.d.ts.map +1 -1
- package/dist/src/components/http-request.js +24 -20
- package/dist/src/components/http-request.js.map +1 -1
- package/dist/src/components/http-response.d.ts +1 -1
- package/dist/src/components/http-response.d.ts.map +1 -1
- package/dist/src/components/http-response.js +36 -33
- package/dist/src/components/http-response.js.map +1 -1
- package/dist/src/components/models.d.ts.map +1 -1
- package/dist/src/components/models.js +21 -18
- package/dist/src/components/models.js.map +1 -1
- package/dist/src/components/operation-options.d.ts.map +1 -1
- package/dist/src/components/operation-options.js +17 -14
- package/dist/src/components/operation-options.js.map +1 -1
- package/dist/src/components/output.d.ts.map +1 -1
- package/dist/src/components/output.js +2 -1
- package/dist/src/components/output.js.map +1 -1
- package/dist/src/components/serializers.d.ts.map +1 -1
- package/dist/src/components/serializers.js +3 -3
- package/dist/src/components/serializers.js.map +1 -1
- package/dist/src/components/static-helpers/bytes-encoding.d.ts.map +1 -1
- package/dist/src/components/static-helpers/bytes-encoding.js +2 -2
- package/dist/src/components/static-helpers/bytes-encoding.js.map +1 -1
- package/dist/src/components/static-helpers/interfaces.d.ts.map +1 -1
- package/dist/src/components/static-helpers/interfaces.js.map +1 -1
- package/dist/src/components/static-helpers/multipart-helpers.d.ts.map +1 -1
- package/dist/src/components/static-helpers/multipart-helpers.js +4 -4
- package/dist/src/components/static-helpers/multipart-helpers.js.map +1 -1
- package/dist/src/components/static-helpers/rest-error.d.ts.map +1 -1
- package/dist/src/components/static-helpers/rest-error.js +66 -57
- package/dist/src/components/static-helpers/rest-error.js.map +1 -1
- package/dist/src/components/transforms/content-type-encoding-provider.d.ts.map +1 -1
- package/dist/src/components/transforms/content-type-encoding-provider.js +0 -1
- package/dist/src/components/transforms/content-type-encoding-provider.js.map +1 -1
- package/dist/src/components/transforms/json/json-array-transform.d.ts.map +1 -1
- package/dist/src/components/transforms/json/json-array-transform.js.map +1 -1
- package/dist/src/components/transforms/json/json-model-additional-properties-transform.d.ts.map +1 -1
- package/dist/src/components/transforms/json/json-model-additional-properties-transform.js +4 -4
- package/dist/src/components/transforms/json/json-model-additional-properties-transform.js.map +1 -1
- package/dist/src/components/transforms/json/json-model-base-transform.d.ts.map +1 -1
- package/dist/src/components/transforms/json/json-model-base-transform.js.map +1 -1
- package/dist/src/components/transforms/json/json-model-property-transform.d.ts.map +1 -1
- package/dist/src/components/transforms/json/json-model-property-transform.js.map +1 -1
- package/dist/src/components/transforms/json/json-model-transform.d.ts.map +1 -1
- package/dist/src/components/transforms/json/json-model-transform.js +20 -17
- package/dist/src/components/transforms/json/json-model-transform.js.map +1 -1
- package/dist/src/components/transforms/json/json-record-transform.d.ts.map +1 -1
- package/dist/src/components/transforms/json/json-record-transform.js.map +1 -1
- package/dist/src/components/transforms/json/json-transform-discriminator.d.ts.map +1 -1
- package/dist/src/components/transforms/json/json-transform-discriminator.js +3 -3
- package/dist/src/components/transforms/json/json-transform-discriminator.js.map +1 -1
- package/dist/src/components/transforms/json/json-transform.d.ts.map +1 -1
- package/dist/src/components/transforms/json/json-transform.js.map +1 -1
- package/dist/src/components/transforms/json/union-transform.d.ts.map +1 -1
- package/dist/src/components/transforms/json/union-transform.js +2 -2
- package/dist/src/components/transforms/json/union-transform.js.map +1 -1
- package/dist/src/components/transforms/multipart/array-part-transform.d.ts.map +1 -1
- package/dist/src/components/transforms/multipart/array-part-transform.js.map +1 -1
- package/dist/src/components/transforms/multipart/file-part-transform.js +1 -1
- package/dist/src/components/transforms/multipart/file-part-transform.js.map +1 -1
- package/dist/src/components/transforms/multipart/multipart-transform.d.ts.map +1 -1
- package/dist/src/components/transforms/multipart/multipart-transform.js +9 -6
- package/dist/src/components/transforms/multipart/multipart-transform.js.map +1 -1
- package/dist/src/components/transforms/multipart/simple-part-transform.d.ts.map +1 -1
- package/dist/src/components/transforms/multipart/simple-part-transform.js +1 -1
- package/dist/src/components/transforms/multipart/simple-part-transform.js.map +1 -1
- package/dist/src/components/transforms/operation-transform-declaration.d.ts.map +1 -1
- package/dist/src/components/transforms/operation-transform-declaration.js +2 -2
- package/dist/src/components/transforms/operation-transform-declaration.js.map +1 -1
- package/dist/src/components/transforms/operation-transform-expression.d.ts.map +1 -1
- package/dist/src/components/transforms/operation-transform-expression.js.map +1 -1
- package/dist/src/components/utils/url-template.d.ts.map +1 -1
- package/dist/src/components/utils/url-template.js.map +1 -1
- package/dist/src/emitter.d.ts.map +1 -1
- package/dist/src/emitter.js +6 -6
- package/dist/src/emitter.js.map +1 -1
- package/dist/src/utils/operations.d.ts +13 -1
- package/dist/src/utils/operations.d.ts.map +1 -1
- package/dist/src/utils/operations.js +71 -0
- package/dist/src/utils/operations.js.map +1 -1
- package/dist/src/utils/parameters.d.ts.map +1 -1
- package/dist/src/utils/parameters.js +1 -1
- package/dist/src/utils/parameters.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/src/components/client-context/client-context-declaration.tsx +8 -1
- package/src/components/client-context/client-context-factory.tsx +50 -30
- package/src/components/client-context/client-context-options.tsx +13 -6
- package/src/components/client-context/client-context.tsx +5 -3
- package/src/components/client-context/parametrized-endpoint.tsx +26 -15
- package/src/components/client-directory.tsx +26 -16
- package/src/components/client-operation.tsx +24 -12
- package/src/components/client.tsx +77 -39
- package/src/components/encoding-provider.tsx +1 -3
- package/src/components/http-request-options.tsx +24 -14
- package/src/components/http-request-parameters-expression.tsx +34 -37
- package/src/components/http-request.tsx +26 -16
- package/src/components/http-response.tsx +31 -26
- package/src/components/models.tsx +18 -14
- package/src/components/operation-options.tsx +18 -5
- package/src/components/output.tsx +10 -9
- package/src/components/serializers.tsx +9 -5
- package/src/components/static-helpers/bytes-encoding.tsx +26 -8
- package/src/components/static-helpers/interfaces.tsx +14 -9
- package/src/components/static-helpers/multipart-helpers.tsx +34 -13
- package/src/components/static-helpers/rest-error.tsx +56 -18
- package/src/components/transforms/content-type-encoding-provider.tsx +1 -3
- package/src/components/transforms/json/json-array-transform.tsx +6 -4
- package/src/components/transforms/json/json-model-additional-properties-transform.tsx +18 -13
- package/src/components/transforms/json/json-model-base-transform.tsx +6 -1
- package/src/components/transforms/json/json-model-property-transform.tsx +7 -9
- package/src/components/transforms/json/json-model-transform.tsx +44 -16
- package/src/components/transforms/json/json-record-transform.tsx +5 -3
- package/src/components/transforms/json/json-transform-discriminator.tsx +12 -11
- package/src/components/transforms/json/json-transform.tsx +5 -3
- package/src/components/transforms/json/union-transform.tsx +20 -8
- package/src/components/transforms/multipart/array-part-transform.tsx +6 -3
- package/src/components/transforms/multipart/file-part-transform.tsx +1 -1
- package/src/components/transforms/multipart/multipart-transform.tsx +4 -6
- package/src/components/transforms/multipart/part-transform.tsx +1 -1
- package/src/components/transforms/multipart/simple-part-transform.tsx +7 -10
- package/src/components/transforms/operation-transform-declaration.tsx +24 -7
- package/src/components/transforms/operation-transform-expression.tsx +12 -5
- package/src/components/utils/url-template.tsx +10 -6
- package/src/emitter.tsx +4 -3
- package/src/utils/operations.ts +96 -1
- package/src/utils/parameters.tsx +5 -1
- package/test/scenarios/additional-properties/extends.md +0 -4
- package/test/scenarios/additional-properties/is.md +0 -4
- package/test/scenarios/additional-properties/spread.md +0 -4
- package/test/scenarios/auth/basic_auth.md +0 -1
- package/test/scenarios/auth/bearer.md +0 -1
- package/test/scenarios/auth/client_parameters.md +0 -1
- package/test/scenarios/auth/key_credential.md +0 -1
- package/test/scenarios/auth/sub_client_override.md +0 -2
- package/test/scenarios/client/dotted_namespace.md +0 -1
- package/test/scenarios/client/global_namespace.md +0 -5
- package/test/scenarios/client/multiple_top_level_clients.md +0 -2
- package/test/scenarios/client/nested_client.md +0 -2
- package/test/scenarios/encoding/bytes_body.md +0 -4
- package/test/scenarios/encoding/bytes_json_property.md +0 -5
- package/test/scenarios/encoding/bytes_nullable.md +0 -14
- package/test/scenarios/encoding/header_bytes.md +0 -12
- package/test/scenarios/encoding/header_date.md +0 -20
- package/test/scenarios/encoding/model_with_bytes_property.md +0 -5
- package/test/scenarios/encoding/query_bytes.md +0 -4
- package/test/scenarios/encoding/query_date.md +0 -20
- package/test/scenarios/http-operations/basic-request.md +0 -12
- package/test/scenarios/http-operations/basic-response.md +0 -19
- package/test/scenarios/http-operations/basic.md +0 -6
- package/test/scenarios/http-operations/constant-header.md +0 -4
- package/test/scenarios/http-operations/create-operation.md +0 -4
- package/test/scenarios/http-operations/on_response.md +0 -4
- package/test/scenarios/http-operations/optional-request-body.md +0 -5
- package/test/scenarios/http-operations/path-parameter-in-model.md +0 -4
- package/test/scenarios/http-operations/path-parameter.md +0 -4
- package/test/scenarios/http-operations/scalar-payload.md +0 -4
- package/test/scenarios/http-operations/with-parameters.md +0 -5
- package/test/scenarios/models/inheritance_2_discriminators.md +0 -24
- package/test/scenarios/models/inheritance_discriminator.md +0 -4
- package/test/scenarios/models/inline-models.md +1 -4
- package/test/scenarios/models/model_additional_properties.md +0 -4
- package/test/scenarios/models/model_extends.md +0 -4
- package/test/scenarios/models/model_spread.md +0 -2
- package/test/scenarios/models/nested_property.md +0 -4
- package/test/scenarios/models/property_references_property.md +0 -6
- package/test/scenarios/multipart/anonymous_part.md +1 -10
- package/test/scenarios/multipart/file.md +0 -12
- package/test/scenarios/multipart/file_content_type.md +0 -5
- package/test/scenarios/multipart/simple_part.md +0 -4
- package/test/scenarios/operation-parameters/body_root_anonymous.md +2 -17
- package/test/scenarios/operation-parameters/constant_as_optional.md +0 -5
- package/test/scenarios/operation-parameters/default_value_as_optional.md +0 -5
- package/test/scenarios/operation-parameters/no_content_type.md +0 -5
- package/test/scenarios/operation-parameters/no_parameters.md +0 -5
- package/test/scenarios/operation-parameters/only_optional.md +0 -5
- package/test/scenarios/operation-parameters/only_required.md +0 -5
- package/test/scenarios/operation-parameters/reserved_names.md +0 -5
- package/test/scenarios/operation-parameters/spread_body.md +0 -5
- package/test/scenarios/operation-parameters/spread_with_nested.md +0 -5
- package/test/scenarios/operation-parameters/union_body.md +0 -6
- package/test/scenarios/operation-parameters/with_body_property.md +0 -5
- package/test/scenarios/operation-parameters/with_body_root.md +0 -5
- package/test/scenarios/serializers/arrays.md +0 -8
- package/test/scenarios/serializers/basic_model.md +0 -4
- package/test/scenarios/serializers/basic_model_wire_name.md +0 -2
- package/test/scenarios/serializers/discriminated_union_spread.md +0 -4
- package/test/scenarios/serializers/multipart.md +0 -4
- package/test/scenarios/serializers/polymorphic_single_level_inheritance.md +0 -5
- package/test/scenarios/serializers/record.md +0 -4
- package/test/scenarios/serializers/scalars.md +0 -5
- package/test/scenarios/serializers/spread.md +0 -4
- package/test/scenarios/serializers/string_union.md +0 -4
package/dist/src/emitter.js
CHANGED
|
@@ -23,7 +23,7 @@ export async function $onEmit(context) {
|
|
|
23
23
|
version: "1.0.0",
|
|
24
24
|
path: ".",
|
|
25
25
|
scripts: {
|
|
26
|
-
|
|
26
|
+
build: "tsc"
|
|
27
27
|
},
|
|
28
28
|
devDependencies: {
|
|
29
29
|
"@types/node": "~18.19.75"
|
|
@@ -34,22 +34,22 @@ export async function $onEmit(context) {
|
|
|
34
34
|
get children() {
|
|
35
35
|
return [_$createComponent(ts.BarrelFile, {
|
|
36
36
|
"export": "."
|
|
37
|
-
}),
|
|
37
|
+
}), _$createComponent(Client, {}), _$createComponent(ay.SourceDirectory, {
|
|
38
38
|
path: "models",
|
|
39
39
|
get children() {
|
|
40
40
|
return [_$createComponent(ts.BarrelFile, {
|
|
41
41
|
"export": "models"
|
|
42
|
-
}),
|
|
42
|
+
}), _$createComponent(Models, {}), _$createComponent(ModelSerializers, {})];
|
|
43
43
|
}
|
|
44
|
-
}),
|
|
44
|
+
}), _$createComponent(ay.SourceDirectory, {
|
|
45
45
|
path: "api",
|
|
46
46
|
get children() {
|
|
47
47
|
return _$createComponent(OperationsDirectory, {});
|
|
48
48
|
}
|
|
49
|
-
}),
|
|
49
|
+
}), _$createComponent(ay.SourceDirectory, {
|
|
50
50
|
path: "helpers",
|
|
51
51
|
get children() {
|
|
52
|
-
return [_$createComponent(Interfaces, {}),
|
|
52
|
+
return [_$createComponent(Interfaces, {}), _$createComponent(MultipartHelpers, {}), _$createComponent(ts.SourceFile, {
|
|
53
53
|
path: "error.ts",
|
|
54
54
|
get children() {
|
|
55
55
|
return _$createComponent(RestError, {});
|
package/dist/src/emitter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emitter.js","names":["ay","ts","writeOutput","OperationsDirectory","Client","Models","Output","ModelSerializers","Interfaces","MultipartHelpers","RestError","$onEmit","context","packageName","options","output","_$createComponent","children","PackageDirectory","name","version","path","scripts","devDependencies","SourceDirectory","BarrelFile","SourceFile","emitterOutputDir"],"sources":["../../src/emitter.tsx"],"sourcesContent":[null],"mappings":";AAAA,OAAO,KAAKA,EAAE,MAAM,gBAAgB;AACpC,OAAO,KAAKC,EAAE,MAAM,sBAAsB;AAE1C,SAASC,WAAW,QAAQ,6BAA6B;AACzD,SAASC,mBAAmB;AAC5B,SAASC,MAAM;AACf,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,SAASC,MAAM;AACf,SAASC,gBAAgB,QAAQ,6BAA6B;AAC9D,SAASC,UAAU;AACnB,SAASC,gBAAgB;AACzB,SAASC,SAAS;AAGlB;AACA;AACA;AACA;AACA,OAAO,eAAeC,OAAOA,CAACC,OAA4C,EAAE;EAC1E,MAAMC,WAAW,GAAGD,OAAO,CAACE,OAAO,CAAC,cAAc,CAAC,IAAI,cAAc;EACrE,MAAMC,MAAM,GAAAC,iBAAA,CACTV,MAAM;IAAA,IAAAW,SAAA;MAAA,OAAAD,iBAAA,CACJf,EAAE,CAACiB,gBAAgB;QAClBC,IAAI,EAAEN,WAAW;QACjBO,OAAO;QACPC,IAAI;QACJC,OAAO,EAAE;
|
|
1
|
+
{"version":3,"file":"emitter.js","names":["ay","ts","writeOutput","OperationsDirectory","Client","Models","Output","ModelSerializers","Interfaces","MultipartHelpers","RestError","$onEmit","context","packageName","options","output","_$createComponent","children","PackageDirectory","name","version","path","scripts","build","devDependencies","SourceDirectory","BarrelFile","SourceFile","emitterOutputDir"],"sources":["../../src/emitter.tsx"],"sourcesContent":[null],"mappings":";AAAA,OAAO,KAAKA,EAAE,MAAM,gBAAgB;AACpC,OAAO,KAAKC,EAAE,MAAM,sBAAsB;AAE1C,SAASC,WAAW,QAAQ,6BAA6B;AACzD,SAASC,mBAAmB;AAC5B,SAASC,MAAM;AACf,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,SAASC,MAAM;AACf,SAASC,gBAAgB,QAAQ,6BAA6B;AAC9D,SAASC,UAAU;AACnB,SAASC,gBAAgB;AACzB,SAASC,SAAS;AAGlB;AACA;AACA;AACA;AACA,OAAO,eAAeC,OAAOA,CAACC,OAA4C,EAAE;EAC1E,MAAMC,WAAW,GAAGD,OAAO,CAACE,OAAO,CAAC,cAAc,CAAC,IAAI,cAAc;EACrE,MAAMC,MAAM,GAAAC,iBAAA,CACTV,MAAM;IAAA,IAAAW,SAAA;MAAA,OAAAD,iBAAA,CACJf,EAAE,CAACiB,gBAAgB;QAClBC,IAAI,EAAEN,WAAW;QACjBO,OAAO;QACPC,IAAI;QACJC,OAAO,EAAE;UAAEC,KAAK,EAAE;QAAM,CAAC;QACzBC,eAAe,EAAE;UAAE,aAAa,EAAE;QAAY,CAAC;QAAA,IAAAP,SAAA;UAAA,OAAAD,iBAAA,CAE9ChB,EAAE,CAACyB,eAAe;YAACJ,IAAI;YAAA,IAAAJ,SAAA;cAAA,QAAAD,iBAAA,CACrBf,EAAE,CAACyB,UAAU;gBAAA;cAAA,IAAAV,iBAAA,CACbZ,MAAM,OAAAY,iBAAA,CACNhB,EAAE,CAACyB,eAAe;gBAACJ,IAAI;gBAAA,IAAAJ,SAAA;kBAAA,QAAAD,iBAAA,CACrBf,EAAE,CAACyB,UAAU;oBAAA;kBAAA,IAAAV,iBAAA,CACbX,MAAM,OAAAW,iBAAA,CACNT,gBAAgB;gBAAA;cAAA,IAAAS,iBAAA,CAElBhB,EAAE,CAACyB,eAAe;gBAACJ,IAAI;gBAAA,IAAAJ,SAAA;kBAAA,OAAAD,iBAAA,CACrBb,mBAAmB;gBAAA;cAAA,IAAAa,iBAAA,CAErBhB,EAAE,CAACyB,eAAe;gBAACJ,IAAI;gBAAA,IAAAJ,SAAA;kBAAA,QAAAD,iBAAA,CACrBR,UAAU,OAAAQ,iBAAA,CACVP,gBAAgB,OAAAO,iBAAA,CAChBf,EAAE,CAAC0B,UAAU;oBAACN,IAAI;oBAAA,IAAAJ,SAAA;sBAAA,OAAAD,iBAAA,CAChBN,SAAS;oBAAA;kBAAA;gBAAA;cAAA;YAAA;UAAA;QAAA;MAAA;IAAA;EAAA,EAMrB;EAED,MAAMR,WAAW,CAACa,MAAM,EAAEH,OAAO,CAACgB,gBAAgB,CAAC;AACrD","ignoreList":[]}
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
-
import { ModelProperty } from "@typespec/compiler";
|
|
1
|
+
import { ModelProperty, Operation } from "@typespec/compiler";
|
|
2
|
+
import { unsafe_Mutator as Mutator } from "@typespec/compiler/experimental";
|
|
3
|
+
/**
|
|
4
|
+
* Prepares operation for client representation. This includes adding an options bag for optional parameters.
|
|
5
|
+
* @param operation operation to be prepared
|
|
6
|
+
* @returns the prepared operation
|
|
7
|
+
*/
|
|
8
|
+
export declare function prepareOperation(operation: Operation): Operation;
|
|
9
|
+
export declare const anonymousMutator: Mutator;
|
|
10
|
+
/**
|
|
11
|
+
* Mutates the operation so that the parameters model is split into required and optional parameters.
|
|
12
|
+
*/
|
|
13
|
+
export declare const httpParamsMutator: Mutator;
|
|
2
14
|
export declare function isConstantHeader(modelProperty: ModelProperty): boolean;
|
|
3
15
|
//# sourceMappingURL=operations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../src/utils/operations.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../src/utils/operations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,aAAa,EAAE,SAAS,EAAS,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAEL,cAAc,IAAI,OAAO,EAG1B,MAAM,iCAAiC,CAAC;AAGzC;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,CAEhE;AAgBD,eAAO,MAAM,gBAAgB,EAAE,OAI9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,OAuD/B,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,aAAa,EAAE,aAAa,WAU5D"}
|
|
@@ -1,4 +1,75 @@
|
|
|
1
|
+
import { unsafe_mutateSubgraph as mutateSubgraph, unsafe_MutatorFlow as MutatorFlow } from "@typespec/compiler/experimental";
|
|
1
2
|
import { $ } from "@typespec/compiler/experimental/typekit";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Prepares operation for client representation. This includes adding an options bag for optional parameters.
|
|
6
|
+
* @param operation operation to be prepared
|
|
7
|
+
* @returns the prepared operation
|
|
8
|
+
*/
|
|
9
|
+
export function prepareOperation(operation) {
|
|
10
|
+
return mutateSubgraph($.program, [httpParamsMutator], operation).type;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Mutates anonymous types to be named.
|
|
15
|
+
*/
|
|
16
|
+
const anonymousMutatorRecord = {
|
|
17
|
+
filter(t) {
|
|
18
|
+
return MutatorFlow.MutateAndRecur;
|
|
19
|
+
},
|
|
20
|
+
mutate(t, clone) {
|
|
21
|
+
if (!clone.name) {
|
|
22
|
+
clone.name = $.type.getPlausibleName(clone);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
export const anonymousMutator = {
|
|
27
|
+
name: "Anonymous types",
|
|
28
|
+
Model: anonymousMutatorRecord,
|
|
29
|
+
Union: anonymousMutatorRecord
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Mutates the operation so that the parameters model is split into required and optional parameters.
|
|
34
|
+
*/
|
|
35
|
+
export const httpParamsMutator = {
|
|
36
|
+
name: "Http parameters",
|
|
37
|
+
Operation: {
|
|
38
|
+
filter() {
|
|
39
|
+
return MutatorFlow.DoNotRecur;
|
|
40
|
+
},
|
|
41
|
+
mutate(o, clone, _program, realm) {
|
|
42
|
+
const httpOperation = $.httpOperation.get(o);
|
|
43
|
+
const returnType = $.httpOperation.getReturnType(httpOperation);
|
|
44
|
+
clone.returnType = returnType;
|
|
45
|
+
const params = $.httpRequest.getParameters(httpOperation, ["query", "header", "path", "body", "contentType"]);
|
|
46
|
+
if (!params) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
clone.parameters = params;
|
|
50
|
+
const optionals = [...clone.parameters.properties.values()].filter(p => p.optional).reduce((acc, prop) => {
|
|
51
|
+
acc[prop.name] = prop;
|
|
52
|
+
return acc;
|
|
53
|
+
}, {});
|
|
54
|
+
const optionsBag = $.model.create({
|
|
55
|
+
properties: optionals
|
|
56
|
+
});
|
|
57
|
+
const optionsProp = $.modelProperty.create({
|
|
58
|
+
name: "options",
|
|
59
|
+
type: optionsBag,
|
|
60
|
+
optional: true
|
|
61
|
+
});
|
|
62
|
+
for (const [key, prop] of clone.parameters.properties) {
|
|
63
|
+
if (prop.optional || isConstantHeader(prop)) {
|
|
64
|
+
clone.parameters.properties.delete(key);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
if (Object.keys(optionals).length > 0) {
|
|
68
|
+
clone.parameters.properties.set("options", optionsProp);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
};
|
|
2
73
|
export function isConstantHeader(modelProperty) {
|
|
3
74
|
if (!$.modelProperty.isHttpHeader(modelProperty)) {
|
|
4
75
|
return false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","names":["$","
|
|
1
|
+
{"version":3,"file":"operations.js","names":["unsafe_mutateSubgraph","mutateSubgraph","unsafe_MutatorFlow","MutatorFlow","$","prepareOperation","operation","program","httpParamsMutator","type","anonymousMutatorRecord","filter","t","MutateAndRecur","mutate","clone","name","getPlausibleName","anonymousMutator","Model","Union","Operation","DoNotRecur","o","_program","realm","httpOperation","get","returnType","getReturnType","params","httpRequest","getParameters","parameters","optionals","properties","values","p","optional","reduce","acc","prop","optionsBag","model","create","optionsProp","modelProperty","key","isConstantHeader","delete","Object","keys","length","set","isHttpHeader","value","undefined"],"sources":["../../../src/utils/operations.ts"],"sourcesContent":[null],"mappings":"AACA,SACEA,qBAAqB,IAAIC,cAAc,EAEvCC,kBAAkB,IAAIC,WAAW,QAE5B,iCAAiC;AACxC,SAASC,CAAC,QAAQ,yCAAyC;;AAE3D;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAACC,SAAoB,EAAa;EAChE,OAAOL,cAAc,CAACG,CAAC,CAACG,OAAO,EAAE,CAACC,iBAAiB,CAAC,EAAEF,SAAS,CAAC,CAACG,IAAI;AACvE;;AAEA;AACA;AACA;AACA,MAAMC,sBAA2D,GAAG;EAClEC,MAAMA,CAACC,CAAC,EAAE;IACR,OAAOT,WAAW,CAACU,cAAc;EACnC,CAAC;EACDC,MAAMA,CAACF,CAAC,EAAEG,KAAK,EAAE;IACf,IAAI,CAACA,KAAK,CAACC,IAAI,EAAE;MACfD,KAAK,CAACC,IAAI,GAAGZ,CAAC,CAACK,IAAI,CAACQ,gBAAgB,CAACF,KAAK,CAAC;IAC7C;EACF;AACF,CAAC;AAED,OAAO,MAAMG,gBAAyB,GAAG;EACvCF,IAAI,EAAE,iBAAiB;EACvBG,KAAK,EAAET,sBAAsB;EAC7BU,KAAK,EAAEV;AACT,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAMF,iBAA0B,GAAG;EACxCQ,IAAI,EAAE,iBAAiB;EACvBK,SAAS,EAAE;IACTV,MAAMA,CAAA,EAAG;M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AACH,QAAQ,IAAIU,gBAAgB,CAACP,IAAI,CAAC,EAAE;UAC3C1B,KAAK,CAACkB,UAAU,CAACE,UAAU,CAACc,MAAM,CAACF,GAAG,CAAC;QACzC;MACF;MAEA,IAAIG,MAAM,CAACC,IAAI,CAACjB,SAAS,CAAC,CAACkB,MAAM,GAAG,CAAC,EAAE;QACrCrC,KAAK,CAACkB,UAAU,CAACE,UAAU,CAACkB,GAAG,CAAC,SAAS,EAAER,WAAW,CAAC;MACzD;IACF;EACF;AACF,CAAC;AAED,OAAO,SAASG,gBAAgBA,CAACF,aAA4B,EAAE;EAC7D,IAAI,CAAC1C,CAAC,CAAC0C,aAAa,CAACQ,YAAY,CAACR,aAAa,CAAC,EAAE;IAChD,OAAO,KAAK;EACd;EAEA,IAAI,OAAO,IAAIA,aAAa,CAACrC,IAAI,IAAIqC,aAAa,CAACrC,IAAI,CAAC8C,KAAK,KAAKC,SAAS,EAAE;IAC3E,OAAO,IAAI;EACb;EAEA,OAAO,KAAK;AACd","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parameters.d.ts","sourceRoot":"","sources":["../../../src/utils/parameters.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAS,MAAM,oBAAoB,CAAC;AAG1D,OAAO,EAAY,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAI5C,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,mBAAmB,CAAC,CA6B/F;
|
|
1
|
+
{"version":3,"file":"parameters.d.ts","sourceRoot":"","sources":["../../../src/utils/parameters.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAS,MAAM,oBAAoB,CAAC;AAG1D,OAAO,EAAY,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAI5C,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,mBAAmB,CAAC,CA6B/F;AA4CD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,YAAY,GAAG,OAAO,CAE/D;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAChG,wBAAgB,eAAe,CAAC,QAAQ,EAAE,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC"}
|
|
@@ -36,7 +36,7 @@ function buildClientParameterDescriptor(modelProperty) {
|
|
|
36
36
|
return ["credential", {
|
|
37
37
|
refkey: ay.refkey(modelProperty),
|
|
38
38
|
optional: modelProperty.optional,
|
|
39
|
-
type: ay.mapJoin(credentialType, t => t, {
|
|
39
|
+
type: ay.mapJoin(() => credentialType, t => t, {
|
|
40
40
|
joiner: " | "
|
|
41
41
|
})
|
|
42
42
|
}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parameters.js","names":["ay","$","buildParameterDescriptor","getClientContextOptionsRef","httpRuntimeTemplateLib","buildClientParameters","client","clientConstructor","getConstructor","parameters","operation","getClientSignature","params","reduce","acc","param","paramsDescriptor","buildClientParameterDescriptor","name","descriptor","optional","refkey","type","modelProperty","authSchemes","getCredentialAuth","length","undefined","credentialType","Array","from","Set","filter","s","map","getCredentialType","mapJoin","t","joiner","scheme","KeyCredential","TokenCredential","hasDefaultValue","property","getDefaultValue","httpOrModelProperty","kind","defaultValue","getValue","value","JSON","stringify","valueKind","asNumber"],"sources":["../../../src/utils/parameters.tsx"],"sourcesContent":[null],"mappings":"AAAA,OAAO,KAAKA,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C,CAAC,CAACF,IAAI,KAAK,QAAQ,EAAE;MAChE,OAAOK,SAAS;IAClB;IAEA,MAAMC,cAAc,GAAGC,KAAK,CAACC,IAAI,CAC/B,IAAIC,GAAG,CAACP,WAAW,CAACQ,MAAM,CAAEC,CAAC,IAAKA,CAAC,CAACX,IAAI,KAAK,QAAQ,CAAC,CAACY,GAAG,CAAED,CAAC,IAAKE,iBAAiB,CAACF,CAAC,CAAC,CAAC,CACzF,CAAC;IACD,OAAO,CACL,YAAY,EACZ;MACEZ,MAAM,EAAErB,EAAE,CAACqB,MAAM,CAACE,aAAa,CAAC;MAChCH,QAAQ,EAAEG,aAAa,CAACH,QAAQ;MAChCE,IAAI,EAAEtB,EAAE,CAACoC,OAAO,
|
|
1
|
+
{"version":3,"file":"parameters.js","names":["ay","$","buildParameterDescriptor","getClientContextOptionsRef","httpRuntimeTemplateLib","buildClientParameters","client","clientConstructor","getConstructor","parameters","operation","getClientSignature","params","reduce","acc","param","paramsDescriptor","buildClientParameterDescriptor","name","descriptor","optional","refkey","type","modelProperty","authSchemes","getCredentialAuth","length","undefined","credentialType","Array","from","Set","filter","s","map","getCredentialType","mapJoin","t","joiner","scheme","KeyCredential","TokenCredential","hasDefaultValue","property","getDefaultValue","httpOrModelProperty","kind","defaultValue","getValue","value","JSON","stringify","valueKind","asNumber"],"sources":["../../../src/utils/parameters.tsx"],"sourcesContent":[null],"mappings":"AAAA,OAAO,KAAKA,EAAE,MAAM,gBAAgB;AAGpC,SAASC,CAAC,QAAQ,yCAAyC;AAC3D,SAASC,wBAAwB,QAAQ,wCAAwC;AAGjF,SAASC,0BAA0B;AACnC,SAASC,sBAAsB,QAAQ,oDAAoD;AAE3F,OAAO,SAASC,qBAAqBA,CAACC,MAAiB,EAA0C;EAC/F,MAAMC,iBAAiB,GAAGN,CAAC,CAACK,MAAM,CAACE,cAAc,CAACF,MAAM,CAAC;EACzD,MAAMG,UAAU,GAAGR,CAAC,CAACS,SAAS,CAACC,kBAAkB,CAACL,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