@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.
@@ -5163,6 +5163,34 @@ var ApiDefinitionV1ToLatest = class _ApiDefinitionV1ToLatest {
5163
5163
  );
5164
5164
  };
5165
5165
 
5166
+ // src/api-definition/prune-endpoint-example.ts
5167
+ function pruneEndpointForExampleSnippet(endpoint, exampleName) {
5168
+ const matching = exampleName != null ? endpoint.examples?.filter((example) => example.name === exampleName) : void 0;
5169
+ const examples = matching != null && matching.length > 0 ? matching : endpoint.examples;
5170
+ return {
5171
+ id: endpoint.id,
5172
+ namespace: endpoint.namespace,
5173
+ method: endpoint.method,
5174
+ path: endpoint.path,
5175
+ displayName: endpoint.displayName,
5176
+ operationId: endpoint.operationId,
5177
+ availability: endpoint.availability,
5178
+ auth: endpoint.auth,
5179
+ multiAuth: endpoint.multiAuth,
5180
+ defaultEnvironment: endpoint.defaultEnvironment,
5181
+ environments: endpoint.environments,
5182
+ errors: endpoint.errors?.map((error) => ({
5183
+ name: error.name,
5184
+ statusCode: error.statusCode,
5185
+ isWildcard: error.isWildcard,
5186
+ examples: error.examples
5187
+ })),
5188
+ examples,
5189
+ protocol: endpoint.protocol,
5190
+ includeInApiExplorer: endpoint.includeInApiExplorer
5191
+ };
5192
+ }
5193
+
5166
5194
  // src/api-definition/prune-endpoint-schema.ts
5167
5195
  var ALL_SECTIONS = ["request.path", "request.query", "request.body", "response.body"];
5168
5196
  function getSchemaSectionsForSelector(selector) {
@@ -7022,6 +7050,7 @@ export {
7022
7050
  joiner,
7023
7051
  preprocessQueryParameters,
7024
7052
  prune,
7053
+ pruneEndpointForExampleSnippet,
7025
7054
  pruneEndpointToSchemaSelector,
7026
7055
  replaceMultipartTemplateStrings,
7027
7056
  replaceTemplateStrings,