@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.mjs
CHANGED
|
@@ -188,6 +188,7 @@ __export(api_definition_exports, {
|
|
|
188
188
|
joiner: () => joiner,
|
|
189
189
|
preprocessQueryParameters: () => preprocessQueryParameters,
|
|
190
190
|
prune: () => prune,
|
|
191
|
+
pruneEndpointForExampleSnippet: () => pruneEndpointForExampleSnippet,
|
|
191
192
|
pruneEndpointToSchemaSelector: () => pruneEndpointToSchemaSelector,
|
|
192
193
|
replaceMultipartTemplateStrings: () => replaceMultipartTemplateStrings,
|
|
193
194
|
replaceTemplateStrings: () => replaceTemplateStrings,
|
|
@@ -5404,6 +5405,34 @@ var ApiDefinitionV1ToLatest = class _ApiDefinitionV1ToLatest {
|
|
|
5404
5405
|
);
|
|
5405
5406
|
};
|
|
5406
5407
|
|
|
5408
|
+
// src/api-definition/prune-endpoint-example.ts
|
|
5409
|
+
function pruneEndpointForExampleSnippet(endpoint, exampleName) {
|
|
5410
|
+
const matching = exampleName != null ? endpoint.examples?.filter((example) => example.name === exampleName) : void 0;
|
|
5411
|
+
const examples = matching != null && matching.length > 0 ? matching : endpoint.examples;
|
|
5412
|
+
return {
|
|
5413
|
+
id: endpoint.id,
|
|
5414
|
+
namespace: endpoint.namespace,
|
|
5415
|
+
method: endpoint.method,
|
|
5416
|
+
path: endpoint.path,
|
|
5417
|
+
displayName: endpoint.displayName,
|
|
5418
|
+
operationId: endpoint.operationId,
|
|
5419
|
+
availability: endpoint.availability,
|
|
5420
|
+
auth: endpoint.auth,
|
|
5421
|
+
multiAuth: endpoint.multiAuth,
|
|
5422
|
+
defaultEnvironment: endpoint.defaultEnvironment,
|
|
5423
|
+
environments: endpoint.environments,
|
|
5424
|
+
errors: endpoint.errors?.map((error) => ({
|
|
5425
|
+
name: error.name,
|
|
5426
|
+
statusCode: error.statusCode,
|
|
5427
|
+
isWildcard: error.isWildcard,
|
|
5428
|
+
examples: error.examples
|
|
5429
|
+
})),
|
|
5430
|
+
examples,
|
|
5431
|
+
protocol: endpoint.protocol,
|
|
5432
|
+
includeInApiExplorer: endpoint.includeInApiExplorer
|
|
5433
|
+
};
|
|
5434
|
+
}
|
|
5435
|
+
|
|
5407
5436
|
// src/api-definition/prune-endpoint-schema.ts
|
|
5408
5437
|
var ALL_SECTIONS = ["request.path", "request.query", "request.body", "response.body"];
|
|
5409
5438
|
function getSchemaSectionsForSelector(selector) {
|