@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
|
@@ -211,6 +211,7 @@ __export(api_definition_exports, {
|
|
|
211
211
|
joiner: () => joiner,
|
|
212
212
|
preprocessQueryParameters: () => preprocessQueryParameters,
|
|
213
213
|
prune: () => prune,
|
|
214
|
+
pruneEndpointForExampleSnippet: () => pruneEndpointForExampleSnippet,
|
|
214
215
|
pruneEndpointToSchemaSelector: () => pruneEndpointToSchemaSelector,
|
|
215
216
|
replaceMultipartTemplateStrings: () => replaceMultipartTemplateStrings,
|
|
216
217
|
replaceTemplateStrings: () => replaceTemplateStrings,
|
|
@@ -5392,6 +5393,34 @@ var ApiDefinitionV1ToLatest = class _ApiDefinitionV1ToLatest {
|
|
|
5392
5393
|
);
|
|
5393
5394
|
};
|
|
5394
5395
|
|
|
5396
|
+
// src/api-definition/prune-endpoint-example.ts
|
|
5397
|
+
function pruneEndpointForExampleSnippet(endpoint, exampleName) {
|
|
5398
|
+
const matching = exampleName != null ? endpoint.examples?.filter((example) => example.name === exampleName) : void 0;
|
|
5399
|
+
const examples = matching != null && matching.length > 0 ? matching : endpoint.examples;
|
|
5400
|
+
return {
|
|
5401
|
+
id: endpoint.id,
|
|
5402
|
+
namespace: endpoint.namespace,
|
|
5403
|
+
method: endpoint.method,
|
|
5404
|
+
path: endpoint.path,
|
|
5405
|
+
displayName: endpoint.displayName,
|
|
5406
|
+
operationId: endpoint.operationId,
|
|
5407
|
+
availability: endpoint.availability,
|
|
5408
|
+
auth: endpoint.auth,
|
|
5409
|
+
multiAuth: endpoint.multiAuth,
|
|
5410
|
+
defaultEnvironment: endpoint.defaultEnvironment,
|
|
5411
|
+
environments: endpoint.environments,
|
|
5412
|
+
errors: endpoint.errors?.map((error) => ({
|
|
5413
|
+
name: error.name,
|
|
5414
|
+
statusCode: error.statusCode,
|
|
5415
|
+
isWildcard: error.isWildcard,
|
|
5416
|
+
examples: error.examples
|
|
5417
|
+
})),
|
|
5418
|
+
examples,
|
|
5419
|
+
protocol: endpoint.protocol,
|
|
5420
|
+
includeInApiExplorer: endpoint.includeInApiExplorer
|
|
5421
|
+
};
|
|
5422
|
+
}
|
|
5423
|
+
|
|
5395
5424
|
// src/api-definition/prune-endpoint-schema.ts
|
|
5396
5425
|
var ALL_SECTIONS = ["request.path", "request.query", "request.body", "response.body"];
|
|
5397
5426
|
function getSchemaSectionsForSelector(selector) {
|
|
@@ -7252,6 +7281,7 @@ var Transformer = class _Transformer {
|
|
|
7252
7281
|
joiner,
|
|
7253
7282
|
preprocessQueryParameters,
|
|
7254
7283
|
prune,
|
|
7284
|
+
pruneEndpointForExampleSnippet,
|
|
7255
7285
|
pruneEndpointToSchemaSelector,
|
|
7256
7286
|
replaceMultipartTemplateStrings,
|
|
7257
7287
|
replaceTemplateStrings,
|