# Packages

## Get all packages in a repository with latest versions

> Retrieves a summary of all packages in a repository, showing the latest version of each package along with version counts and metadata.

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"51.3.0"},"security":[{"access-token":[]}],"components":{"securitySchemes":{"access-token":{"scheme":"bearer","bearerFormat":"JWT","type":"http","in":"header"}},"schemas":{"RepositoryPackagesResponseDto":{"type":"object","properties":{"packages":{"description":"List of packages with their latest versions","type":"array","items":{"$ref":"#/components/schemas/RepositoryPackageSummaryDto"}},"totalPackages":{"type":"number","description":"Total number of packages in the repository"},"repoId":{"type":"string","description":"Repository identifier"}},"required":["packages","totalPackages","repoId"]},"RepositoryPackageSummaryDto":{"type":"object","properties":{"packageName":{"type":"string","description":"Package name"},"latestVersion":{"type":"string","description":"Latest version number"},"latestPublishedAt":{"type":"string","description":"When the latest version was published"},"latestBuildStatus":{"type":"string","description":"Build status of latest version"},"latestStage":{"type":"string","description":"Stage of latest version"},"totalVersions":{"type":"number","description":"Total number of versions available"}},"required":["packageName","latestVersion","latestPublishedAt","totalVersions"]}}},"paths":{"/sfp/api/packages/{repoId}/packages":{"get":{"operationId":"PackagesController_getRepositoryPackages","summary":"Get all packages in a repository with latest versions","description":"Retrieves a summary of all packages in a repository, showing the latest version of each package along with version counts and metadata.","parameters":[{"name":"repoId","required":true,"in":"path","description":"Repository identifier (e.g., \"flxbl-io/sf-core\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Repository packages retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryPackagesResponseDto"}}}},"403":{"description":"Forbidden - Requires role: member, application"}},"tags":["Packages"]}}}}
```

## Get the latest package artifact

> Retrieves the most recent version of a package artifact based on the published timestamp.

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"51.3.0"},"security":[{"access-token":[]}],"components":{"securitySchemes":{"access-token":{"scheme":"bearer","bearerFormat":"JWT","type":"http","in":"header"}},"schemas":{"PackageArtifactDto":{"type":"object","properties":{"packageName":{"type":"string","description":"Package name"},"package_version_number":{"type":"string","description":"Package version number"},"package_type":{"type":"string","description":"Package type"},"stage":{"type":"string","description":"Stage of the package","enum":["Build","Published"]},"publishedAt":{"type":"string","description":"When the package was published"},"repoIdentifier":{"type":"string","description":"Repository identifier"},"buildStatus":{"description":"Build status information","allOf":[{"$ref":"#/components/schemas/BuildStatusDto"}]},"deployments":{"description":"Deployment history","type":"array","items":{"$ref":"#/components/schemas/DeploymentInfoDto"}},"sourceVersion":{"type":"string","description":"Package source version"},"package_version_id":{"type":"string","description":"Package version ID"},"metadataCount":{"type":"number","description":"Metadata count"},"isApexFound":{"type":"boolean","description":"Whether package contains Apex"},"isProfilesFound":{"type":"boolean","description":"Whether package contains Profiles"},"test_coverage":{"type":"number","description":"Test coverage percentage"},"has_passed_coverage_check":{"type":"boolean","description":"Whether package passed coverage check"},"sfpPackage":{"type":"object","description":"Full SfpPackage metadata from the build artifact. Contains all raw fields such as apexClassesSortedByTypes, triggers, payload, etc."}},"required":["packageName","package_version_number","publishedAt","repoIdentifier"]},"BuildStatusDto":{"type":"object","properties":{"buildNumber":{"type":"number","description":"Build number"},"commitId":{"type":"string","description":"Commit ID associated with the build"},"status":{"type":"string","description":"Build status","enum":["building","success","failed"]},"buildStartedAt":{"type":"string","description":"When the build started"},"buildCompletedAt":{"type":"string","description":"When the build completed"},"buildError":{"type":"string","description":"Error message if build failed"},"domain":{"type":"string","description":"Domain associated with the build"},"lastUpdatedAt":{"type":"string","description":"Last update timestamp"}},"required":["buildNumber","commitId","status","lastUpdatedAt"]},"DeploymentInfoDto":{"type":"object","properties":{"targetOrg":{"type":"string","description":"Target Salesforce org"},"deployedAt":{"type":"string","description":"Deployment timestamp"},"deploymentStatus":{"type":"string","description":"Deployment status","enum":["success","failed","skipped"]},"deploymentDuration":{"type":"number","description":"Deployment duration in milliseconds"},"deploymentMode":{"type":"string","description":"Deployment mode"},"stage":{"type":"string","description":"Stage of deployment"},"deployedBy":{"type":"string","description":"User who deployed"},"errorMessage":{"type":"string","description":"Error message if deployment failed"},"subscriberVersionId":{"type":"string","description":"Subscriber version ID"},"commitId":{"type":"string","description":"Commit ID"},"packageType":{"type":"string","description":"Package type"}},"required":["targetOrg","deployedAt","deploymentStatus"]}}},"paths":{"/sfp/api/packages/{repoId}/{packageName}/artifacts/latest":{"get":{"operationId":"PackagesController_getLatestPackageArtifact","summary":"Get the latest package artifact","description":"Retrieves the most recent version of a package artifact based on the published timestamp.","parameters":[{"name":"repoId","required":true,"in":"path","description":"Repository identifier (e.g., \"flxbl-io/sf-core\")","schema":{"type":"string"}},{"name":"packageName","required":true,"in":"path","description":"Package name","schema":{"type":"string"}}],"responses":{"200":{"description":"Latest package artifact retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageArtifactDto"}}}},"403":{"description":"Forbidden - Requires role: member, application"},"404":{"description":"No package artifacts found"}},"tags":["Packages"]}}}}
```

## Query package artifacts by criteria

> Search for package artifacts using multiple filter criteria. Returns an array of matching artifacts.

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"51.3.0"},"security":[{"access-token":[]}],"components":{"securitySchemes":{"access-token":{"scheme":"bearer","bearerFormat":"JWT","type":"http","in":"header"}},"schemas":{"PackageArtifactDto":{"type":"object","properties":{"packageName":{"type":"string","description":"Package name"},"package_version_number":{"type":"string","description":"Package version number"},"package_type":{"type":"string","description":"Package type"},"stage":{"type":"string","description":"Stage of the package","enum":["Build","Published"]},"publishedAt":{"type":"string","description":"When the package was published"},"repoIdentifier":{"type":"string","description":"Repository identifier"},"buildStatus":{"description":"Build status information","allOf":[{"$ref":"#/components/schemas/BuildStatusDto"}]},"deployments":{"description":"Deployment history","type":"array","items":{"$ref":"#/components/schemas/DeploymentInfoDto"}},"sourceVersion":{"type":"string","description":"Package source version"},"package_version_id":{"type":"string","description":"Package version ID"},"metadataCount":{"type":"number","description":"Metadata count"},"isApexFound":{"type":"boolean","description":"Whether package contains Apex"},"isProfilesFound":{"type":"boolean","description":"Whether package contains Profiles"},"test_coverage":{"type":"number","description":"Test coverage percentage"},"has_passed_coverage_check":{"type":"boolean","description":"Whether package passed coverage check"},"sfpPackage":{"type":"object","description":"Full SfpPackage metadata from the build artifact. Contains all raw fields such as apexClassesSortedByTypes, triggers, payload, etc."}},"required":["packageName","package_version_number","publishedAt","repoIdentifier"]},"BuildStatusDto":{"type":"object","properties":{"buildNumber":{"type":"number","description":"Build number"},"commitId":{"type":"string","description":"Commit ID associated with the build"},"status":{"type":"string","description":"Build status","enum":["building","success","failed"]},"buildStartedAt":{"type":"string","description":"When the build started"},"buildCompletedAt":{"type":"string","description":"When the build completed"},"buildError":{"type":"string","description":"Error message if build failed"},"domain":{"type":"string","description":"Domain associated with the build"},"lastUpdatedAt":{"type":"string","description":"Last update timestamp"}},"required":["buildNumber","commitId","status","lastUpdatedAt"]},"DeploymentInfoDto":{"type":"object","properties":{"targetOrg":{"type":"string","description":"Target Salesforce org"},"deployedAt":{"type":"string","description":"Deployment timestamp"},"deploymentStatus":{"type":"string","description":"Deployment status","enum":["success","failed","skipped"]},"deploymentDuration":{"type":"number","description":"Deployment duration in milliseconds"},"deploymentMode":{"type":"string","description":"Deployment mode"},"stage":{"type":"string","description":"Stage of deployment"},"deployedBy":{"type":"string","description":"User who deployed"},"errorMessage":{"type":"string","description":"Error message if deployment failed"},"subscriberVersionId":{"type":"string","description":"Subscriber version ID"},"commitId":{"type":"string","description":"Commit ID"},"packageType":{"type":"string","description":"Package type"}},"required":["targetOrg","deployedAt","deploymentStatus"]}}},"paths":{"/sfp/api/packages/{repoId}/{packageName}/artifacts/query":{"get":{"operationId":"PackagesController_queryPackageArtifacts","summary":"Query package artifacts by criteria","description":"Search for package artifacts using multiple filter criteria. Returns an array of matching artifacts.","parameters":[{"name":"repoId","required":true,"in":"path","description":"Repository identifier (e.g., \"flxbl-io/sf-core\")","schema":{"type":"string"}},{"name":"packageName","required":true,"in":"path","description":"Package name","schema":{"type":"string"}},{"name":"stage","required":false,"in":"query","description":"Filter by package stage","schema":{"enum":["Build","Published"],"type":"string"}},{"name":"status","required":false,"in":"query","description":"Filter by build status","schema":{"enum":["building","success","failed"],"type":"string"}},{"name":"domain","required":false,"in":"query","description":"Filter by domain","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Number of results to return","schema":{"minimum":1,"maximum":100,"default":20,"type":"number"}},{"name":"offset","required":false,"in":"query","description":"Number of results to skip","schema":{"minimum":0,"default":0,"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Field to sort by","schema":{"default":"publishedAt","enum":["version","publishedAt","buildNumber"],"type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort order","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"description":"Query executed successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PackageArtifactDto"}}}}},"403":{"description":"Forbidden - Requires role: member, application"}},"tags":["Packages"]}}}}
```

## Get a specific package artifact by version

> Retrieves complete metadata for a specific version of a package artifact including build status, deployment history, and all associated metadata.

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"51.3.0"},"security":[{"access-token":[]}],"components":{"securitySchemes":{"access-token":{"scheme":"bearer","bearerFormat":"JWT","type":"http","in":"header"}},"schemas":{"PackageArtifactDto":{"type":"object","properties":{"packageName":{"type":"string","description":"Package name"},"package_version_number":{"type":"string","description":"Package version number"},"package_type":{"type":"string","description":"Package type"},"stage":{"type":"string","description":"Stage of the package","enum":["Build","Published"]},"publishedAt":{"type":"string","description":"When the package was published"},"repoIdentifier":{"type":"string","description":"Repository identifier"},"buildStatus":{"description":"Build status information","allOf":[{"$ref":"#/components/schemas/BuildStatusDto"}]},"deployments":{"description":"Deployment history","type":"array","items":{"$ref":"#/components/schemas/DeploymentInfoDto"}},"sourceVersion":{"type":"string","description":"Package source version"},"package_version_id":{"type":"string","description":"Package version ID"},"metadataCount":{"type":"number","description":"Metadata count"},"isApexFound":{"type":"boolean","description":"Whether package contains Apex"},"isProfilesFound":{"type":"boolean","description":"Whether package contains Profiles"},"test_coverage":{"type":"number","description":"Test coverage percentage"},"has_passed_coverage_check":{"type":"boolean","description":"Whether package passed coverage check"},"sfpPackage":{"type":"object","description":"Full SfpPackage metadata from the build artifact. Contains all raw fields such as apexClassesSortedByTypes, triggers, payload, etc."}},"required":["packageName","package_version_number","publishedAt","repoIdentifier"]},"BuildStatusDto":{"type":"object","properties":{"buildNumber":{"type":"number","description":"Build number"},"commitId":{"type":"string","description":"Commit ID associated with the build"},"status":{"type":"string","description":"Build status","enum":["building","success","failed"]},"buildStartedAt":{"type":"string","description":"When the build started"},"buildCompletedAt":{"type":"string","description":"When the build completed"},"buildError":{"type":"string","description":"Error message if build failed"},"domain":{"type":"string","description":"Domain associated with the build"},"lastUpdatedAt":{"type":"string","description":"Last update timestamp"}},"required":["buildNumber","commitId","status","lastUpdatedAt"]},"DeploymentInfoDto":{"type":"object","properties":{"targetOrg":{"type":"string","description":"Target Salesforce org"},"deployedAt":{"type":"string","description":"Deployment timestamp"},"deploymentStatus":{"type":"string","description":"Deployment status","enum":["success","failed","skipped"]},"deploymentDuration":{"type":"number","description":"Deployment duration in milliseconds"},"deploymentMode":{"type":"string","description":"Deployment mode"},"stage":{"type":"string","description":"Stage of deployment"},"deployedBy":{"type":"string","description":"User who deployed"},"errorMessage":{"type":"string","description":"Error message if deployment failed"},"subscriberVersionId":{"type":"string","description":"Subscriber version ID"},"commitId":{"type":"string","description":"Commit ID"},"packageType":{"type":"string","description":"Package type"}},"required":["targetOrg","deployedAt","deploymentStatus"]}}},"paths":{"/sfp/api/packages/{repoId}/{packageName}/artifacts/{version}":{"get":{"operationId":"PackagesController_getPackageArtifact","summary":"Get a specific package artifact by version","description":"Retrieves complete metadata for a specific version of a package artifact including build status, deployment history, and all associated metadata.","parameters":[{"name":"repoId","required":true,"in":"path","description":"Repository identifier (e.g., \"flxbl-io/sf-core\")","schema":{"type":"string"}},{"name":"packageName","required":true,"in":"path","description":"Package name","schema":{"type":"string"}},{"name":"version","required":true,"in":"path","description":"Package version number","schema":{"type":"string"}}],"responses":{"200":{"description":"Package artifact retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageArtifactDto"}}}},"403":{"description":"Forbidden - Requires role: member, application"},"404":{"description":"Package artifact not found"}},"tags":["Packages"]}}}}
```

## List all package artifacts

> Retrieves a paginated list of all versions of a package with optional filtering by stage, status, and domain.

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"51.3.0"},"security":[{"access-token":[]}],"components":{"securitySchemes":{"access-token":{"scheme":"bearer","bearerFormat":"JWT","type":"http","in":"header"}},"schemas":{"PackageArtifactListResponseDto":{"type":"object","properties":{"artifacts":{"description":"List of package artifacts","type":"array","items":{"$ref":"#/components/schemas/PackageArtifactDto"}},"total":{"type":"number","description":"Total number of artifacts available"},"limit":{"type":"number","description":"Current limit"},"offset":{"type":"number","description":"Current offset"},"hasMore":{"type":"boolean","description":"Whether there are more results available"}},"required":["artifacts","total","limit","offset","hasMore"]},"PackageArtifactDto":{"type":"object","properties":{"packageName":{"type":"string","description":"Package name"},"package_version_number":{"type":"string","description":"Package version number"},"package_type":{"type":"string","description":"Package type"},"stage":{"type":"string","description":"Stage of the package","enum":["Build","Published"]},"publishedAt":{"type":"string","description":"When the package was published"},"repoIdentifier":{"type":"string","description":"Repository identifier"},"buildStatus":{"description":"Build status information","allOf":[{"$ref":"#/components/schemas/BuildStatusDto"}]},"deployments":{"description":"Deployment history","type":"array","items":{"$ref":"#/components/schemas/DeploymentInfoDto"}},"sourceVersion":{"type":"string","description":"Package source version"},"package_version_id":{"type":"string","description":"Package version ID"},"metadataCount":{"type":"number","description":"Metadata count"},"isApexFound":{"type":"boolean","description":"Whether package contains Apex"},"isProfilesFound":{"type":"boolean","description":"Whether package contains Profiles"},"test_coverage":{"type":"number","description":"Test coverage percentage"},"has_passed_coverage_check":{"type":"boolean","description":"Whether package passed coverage check"},"sfpPackage":{"type":"object","description":"Full SfpPackage metadata from the build artifact. Contains all raw fields such as apexClassesSortedByTypes, triggers, payload, etc."}},"required":["packageName","package_version_number","publishedAt","repoIdentifier"]},"BuildStatusDto":{"type":"object","properties":{"buildNumber":{"type":"number","description":"Build number"},"commitId":{"type":"string","description":"Commit ID associated with the build"},"status":{"type":"string","description":"Build status","enum":["building","success","failed"]},"buildStartedAt":{"type":"string","description":"When the build started"},"buildCompletedAt":{"type":"string","description":"When the build completed"},"buildError":{"type":"string","description":"Error message if build failed"},"domain":{"type":"string","description":"Domain associated with the build"},"lastUpdatedAt":{"type":"string","description":"Last update timestamp"}},"required":["buildNumber","commitId","status","lastUpdatedAt"]},"DeploymentInfoDto":{"type":"object","properties":{"targetOrg":{"type":"string","description":"Target Salesforce org"},"deployedAt":{"type":"string","description":"Deployment timestamp"},"deploymentStatus":{"type":"string","description":"Deployment status","enum":["success","failed","skipped"]},"deploymentDuration":{"type":"number","description":"Deployment duration in milliseconds"},"deploymentMode":{"type":"string","description":"Deployment mode"},"stage":{"type":"string","description":"Stage of deployment"},"deployedBy":{"type":"string","description":"User who deployed"},"errorMessage":{"type":"string","description":"Error message if deployment failed"},"subscriberVersionId":{"type":"string","description":"Subscriber version ID"},"commitId":{"type":"string","description":"Commit ID"},"packageType":{"type":"string","description":"Package type"}},"required":["targetOrg","deployedAt","deploymentStatus"]}}},"paths":{"/sfp/api/packages/{repoId}/{packageName}/artifacts":{"get":{"operationId":"PackagesController_listPackageArtifacts","summary":"List all package artifacts","description":"Retrieves a paginated list of all versions of a package with optional filtering by stage, status, and domain.","parameters":[{"name":"repoId","required":true,"in":"path","description":"Repository identifier (e.g., \"flxbl-io/sf-core\")","schema":{"type":"string"}},{"name":"packageName","required":true,"in":"path","description":"Package name","schema":{"type":"string"}},{"name":"stage","required":false,"in":"query","description":"Filter by package stage","schema":{"enum":["Build","Published"],"type":"string"}},{"name":"status","required":false,"in":"query","description":"Filter by build status","schema":{"enum":["building","success","failed"],"type":"string"}},{"name":"domain","required":false,"in":"query","description":"Filter by domain","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Number of results to return (1-100)","schema":{"minimum":1,"maximum":100,"default":20,"type":"number"}},{"name":"offset","required":false,"in":"query","description":"Number of results to skip","schema":{"minimum":0,"default":0,"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Field to sort by","schema":{"enum":["version","publishedAt","buildNumber"],"type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort order","schema":{"enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"description":"Package artifacts retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageArtifactListResponseDto"}}}},"403":{"description":"Forbidden - Requires role: member, application"}},"tags":["Packages"]}}}}
```

## Get all available versions of a package

> Retrieves a list of all available versions for a package with basic metadata.

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"51.3.0"},"security":[{"access-token":[]}],"components":{"securitySchemes":{"access-token":{"scheme":"bearer","bearerFormat":"JWT","type":"http","in":"header"}},"schemas":{"PackageArtifactVersionDto":{"type":"object","properties":{"version":{"type":"string","description":"Package version"},"publishedAt":{"type":"string","description":"When the artifact was published"},"buildStatus":{"type":"string","description":"Build status"},"stage":{"type":"string","description":"Stage"}},"required":["version","publishedAt"]}}},"paths":{"/sfp/api/packages/{repoId}/{packageName}/versions":{"get":{"operationId":"PackagesController_getPackageVersions","summary":"Get all available versions of a package","description":"Retrieves a list of all available versions for a package with basic metadata.","parameters":[{"name":"repoId","required":true,"in":"path","description":"Repository identifier (e.g., \"flxbl-io/sf-core\")","schema":{"type":"string"}},{"name":"packageName","required":true,"in":"path","description":"Package name","schema":{"type":"string"}}],"responses":{"200":{"description":"Package versions retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PackageArtifactVersionDto"}}}}},"403":{"description":"Forbidden - Requires role: member, application"}},"tags":["Packages"]}}}}
```

## Get changelog diff between two package versions

> Compares two versions of a package and returns the diff including:\
> &#x20;       \- List of commits between versions\
> &#x20;       \- Extracted work items from commit messages\
> &#x20;       \- Summary statistics\
> &#x20;       \
> &#x20;       Supports both forward diffs (older to newer) and rollback diffs (newer to older).\
> &#x20;       Rollback diffs will show removed commits and work items.\
> &#x20;       \
> &#x20;       Work items are extracted using patterns that match:\
> &#x20;       \- GitHub issues: #123\
> &#x20;       \- JIRA tickets: ABC-123, AB-1234\
> &#x20;       \- Custom patterns: USER-STORY-123, BUG-456, etc.

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"51.3.0"},"security":[{"access-token":[]}],"components":{"securitySchemes":{"access-token":{"scheme":"bearer","bearerFormat":"JWT","type":"http","in":"header"}}},"paths":{"/sfp/api/packages/{repoId}/{packageName}/changelog/diff":{"get":{"operationId":"PackagesController_getPackageDiff","summary":"Get changelog diff between two package versions","description":"Compares two versions of a package and returns the diff including:\n        - List of commits between versions\n        - Extracted work items from commit messages\n        - Summary statistics\n        \n        Supports both forward diffs (older to newer) and rollback diffs (newer to older).\n        Rollback diffs will show removed commits and work items.\n        \n        Work items are extracted using patterns that match:\n        - GitHub issues: #123\n        - JIRA tickets: ABC-123, AB-1234\n        - Custom patterns: USER-STORY-123, BUG-456, etc.","parameters":[{"name":"repoId","required":true,"in":"path","description":"Repository identifier (e.g., \"flxbl-io/sf-core\")","schema":{"type":"string"}},{"name":"packageName","required":true,"in":"path","description":"Package name","schema":{"type":"string"}},{"name":"from","required":true,"in":"query","description":"Starting version for comparison","schema":{"type":"string"}},{"name":"to","required":true,"in":"query","description":"Ending version for comparison","schema":{"type":"string"}},{"name":"workItemPatterns","required":false,"in":"query","description":"Custom regex patterns for extracting work items from commit messages. If not provided, uses default patterns.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Package diff retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"packageName":{"type":"string"},"fromVersion":{"type":"string"},"toVersion":{"type":"string"},"commits":{"type":"array","items":{"type":"object","properties":{"sha":{"type":"string"},"message":{"type":"string"},"author":{"type":"string"},"date":{"type":"string"}}}},"removedCommits":{"type":"array","description":"Commits removed in a rollback (only present for rollback diffs)","items":{"type":"object","properties":{"sha":{"type":"string"},"message":{"type":"string"},"author":{"type":"string"},"date":{"type":"string"}}}},"workItems":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"removedWorkItems":{"type":"object","description":"Work items removed in a rollback (only present for rollback diffs)","additionalProperties":{"type":"array","items":{"type":"string"}}},"isRollback":{"type":"boolean","description":"Indicates if this is a rollback diff (newer to older version)"},"summary":{"type":"object","properties":{"totalCommits":{"type":"number"},"totalRemovedCommits":{"type":"number"},"totalWorkItems":{"type":"number"},"totalRemovedWorkItems":{"type":"number"},"totalPullRequests":{"type":"number"},"totalRemovedPullRequests":{"type":"number"},"commitRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"direction":{"type":"string","enum":["forward","rollback"],"description":"Direction of the diff"}}}}}}}}}},"403":{"description":"Forbidden - Requires role: member, application"},"404":{"description":"One or both package versions not found"}},"tags":["Packages"]}}}}
```

## Compare source contents of two package versions

> Fetches two artifact versions from Verdaccio, extracts them, and generates a file-level diff with unified text diffs for modified files. Returns an execution ID for polling.

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"51.3.0"},"security":[{"access-token":[]}],"components":{"securitySchemes":{"access-token":{"scheme":"bearer","bearerFormat":"JWT","type":"http","in":"header"}}},"paths":{"/sfp/api/packages/{repoId}/{packageName}/content-diff":{"post":{"operationId":"PackagesController_comparePackageContents","summary":"Compare source contents of two package versions","description":"Fetches two artifact versions from Verdaccio, extracts them, and generates a file-level diff with unified text diffs for modified files. Returns an execution ID for polling.","parameters":[{"name":"repoId","required":true,"in":"path","description":"Repository identifier (e.g., \"flxbl-io/sf-core\")","schema":{"type":"string"}},{"name":"packageName","required":true,"in":"path","description":"Package name","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["fromVersion","toVersion"],"properties":{"fromVersion":{"type":"string","description":"Source version to compare from"},"toVersion":{"type":"string","description":"Target version to compare to"}}}}}},"responses":{"201":{"description":"Content diff task dispatched","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Task execution ID for polling"},"taskType":{"type":"string"},"status":{"type":"string"},"triggeredAt":{"type":"string"}}}}}},"400":{"description":"Invalid versions or missing parameters"},"403":{"description":"Forbidden - Requires role: member, application"},"503":{"description":"Flow engine unavailable"}},"tags":["Packages"]}}}}
```

## Get cached content diff between two package versions

> Retrieves a previously computed content diff result from the dedicated content diffs store.

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"51.3.0"},"security":[{"access-token":[]}],"components":{"securitySchemes":{"access-token":{"scheme":"bearer","bearerFormat":"JWT","type":"http","in":"header"}}},"paths":{"/sfp/api/packages/{repoId}/{packageName}/content-diff/{fromVersion}/{toVersion}":{"get":{"operationId":"PackagesController_getContentDiff","summary":"Get cached content diff between two package versions","description":"Retrieves a previously computed content diff result from the dedicated content diffs store.","parameters":[{"name":"repoId","required":true,"in":"path","description":"Repository identifier","schema":{"type":"string"}},{"name":"packageName","required":true,"in":"path","description":"Package name","schema":{"type":"string"}},{"name":"fromVersion","required":true,"in":"path","description":"Source version","schema":{"type":"string"}},{"name":"toVersion","required":true,"in":"path","description":"Target version","schema":{"type":"string"}}],"responses":{"200":{"description":"Content diff retrieved successfully"},"403":{"description":"Forbidden - Requires role: member, application"},"404":{"description":"Content diff not found"}},"tags":["Packages"]}}}}
```
