@fern-api/fdr-sdk 1.2.158-2a3de2b6ef → 1.2.158-3ca6ed3799
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/js/api-definition/index.js +30 -0
- package/dist/js/api-definition/index.js.map +1 -1
- package/dist/js/api-definition/index.mjs +29 -0
- package/dist/js/api-definition/index.mjs.map +1 -1
- package/dist/js/converters/index.js +29 -0
- package/dist/js/converters/index.js.map +1 -1
- package/dist/js/converters/index.mjs +29 -0
- package/dist/js/converters/index.mjs.map +1 -1
- package/dist/js/index.js +29 -0
- package/dist/js/index.js.map +1 -1
- package/dist/js/index.mjs +29 -0
- package/dist/js/index.mjs.map +1 -1
- package/dist/js/navigation/index.js +29 -0
- package/dist/js/navigation/index.js.map +1 -1
- package/dist/js/navigation/index.mjs +29 -0
- package/dist/js/navigation/index.mjs.map +1 -1
- package/dist/js/orpc-client.js +8 -0
- package/dist/js/orpc-client.js.map +1 -1
- package/dist/js/orpc-client.mjs +7 -0
- package/dist/js/orpc-client.mjs.map +1 -1
- package/dist/types/api-definition/__test__/prune-endpoint-example.test.d.ts +2 -0
- package/dist/types/api-definition/__test__/prune-endpoint-example.test.d.ts.map +1 -0
- package/dist/types/api-definition/index.d.ts +1 -0
- package/dist/types/api-definition/index.d.ts.map +1 -1
- package/dist/types/api-definition/prune-endpoint-example.d.ts +12 -0
- package/dist/types/api-definition/prune-endpoint-example.d.ts.map +1 -0
- package/dist/types/orpc-client/docs-ledger/ledger-manifest.d.ts +28594 -11685
- package/dist/types/orpc-client/docs-ledger/ledger-manifest.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/js/index.js
CHANGED
|
@@ -252,6 +252,7 @@ __export(api_definition_exports, {
|
|
|
252
252
|
joiner: () => joiner,
|
|
253
253
|
preprocessQueryParameters: () => preprocessQueryParameters,
|
|
254
254
|
prune: () => prune,
|
|
255
|
+
pruneEndpointForExampleSnippet: () => pruneEndpointForExampleSnippet,
|
|
255
256
|
pruneEndpointToSchemaSelector: () => pruneEndpointToSchemaSelector,
|
|
256
257
|
replaceMultipartTemplateStrings: () => replaceMultipartTemplateStrings,
|
|
257
258
|
replaceTemplateStrings: () => replaceTemplateStrings,
|
|
@@ -5468,6 +5469,34 @@ var ApiDefinitionV1ToLatest = class _ApiDefinitionV1ToLatest {
|
|
|
5468
5469
|
);
|
|
5469
5470
|
};
|
|
5470
5471
|
|
|
5472
|
+
// src/api-definition/prune-endpoint-example.ts
|
|
5473
|
+
function pruneEndpointForExampleSnippet(endpoint, exampleName) {
|
|
5474
|
+
const matching = exampleName != null ? endpoint.examples?.filter((example) => example.name === exampleName) : void 0;
|
|
5475
|
+
const examples = matching != null && matching.length > 0 ? matching : endpoint.examples;
|
|
5476
|
+
return {
|
|
5477
|
+
id: endpoint.id,
|
|
5478
|
+
namespace: endpoint.namespace,
|
|
5479
|
+
method: endpoint.method,
|
|
5480
|
+
path: endpoint.path,
|
|
5481
|
+
displayName: endpoint.displayName,
|
|
5482
|
+
operationId: endpoint.operationId,
|
|
5483
|
+
availability: endpoint.availability,
|
|
5484
|
+
auth: endpoint.auth,
|
|
5485
|
+
multiAuth: endpoint.multiAuth,
|
|
5486
|
+
defaultEnvironment: endpoint.defaultEnvironment,
|
|
5487
|
+
environments: endpoint.environments,
|
|
5488
|
+
errors: endpoint.errors?.map((error) => ({
|
|
5489
|
+
name: error.name,
|
|
5490
|
+
statusCode: error.statusCode,
|
|
5491
|
+
isWildcard: error.isWildcard,
|
|
5492
|
+
examples: error.examples
|
|
5493
|
+
})),
|
|
5494
|
+
examples,
|
|
5495
|
+
protocol: endpoint.protocol,
|
|
5496
|
+
includeInApiExplorer: endpoint.includeInApiExplorer
|
|
5497
|
+
};
|
|
5498
|
+
}
|
|
5499
|
+
|
|
5471
5500
|
// src/api-definition/prune-endpoint-schema.ts
|
|
5472
5501
|
var ALL_SECTIONS = ["request.path", "request.query", "request.body", "response.body"];
|
|
5473
5502
|
function getSchemaSectionsForSelector(selector) {
|