Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
fdfc760
Added new common.ts within API folder to store generic types against …
Redtigercod4 Jun 30, 2026
ea7eeb7
Updated types within common.ts and created a new RPM Repository type …
Redtigercod4 Jul 1, 2026
41f5e58
Updated ansible repository to new interface, mapped out shared types …
Redtigercod4 Jul 1, 2026
1e81ca6
Updated file repository to new interface adding in new fields from re…
Redtigercod4 Jul 1, 2026
f1221fb
Fixed issue with Ansible types. Removed incorrect comment due to plug…
Redtigercod4 Jul 1, 2026
63086c4
Defined new distribution generic from pulpcore and built out ansible …
Redtigercod4 Jul 2, 2026
762de1e
Defined new distribution and publication generic for file distributio…
Redtigercod4 Jul 2, 2026
ee63c10
Defined new Remote generic and updated ansible remote type
Redtigercod4 Jul 2, 2026
4e164e3
Updated File Remote definition along with commit pinning references.
Redtigercod4 Jul 2, 2026
8ccab40
Updated Container distributions to have new interface against plugin
Redtigercod4 Jul 2, 2026
8f80c3d
Built out RPM Repository API Client with Typed List endpoint
Redtigercod4 Jul 3, 2026
eb4b326
Added integration testing against RPM Repository API Client using nod…
Redtigercod4 Jul 3, 2026
dfa58c6
Refined test suite to using Axios instead of node:fetch, Fixed minor …
Redtigercod4 Jul 9, 2026
c92abff
Added create & update on RPM repositories with associated testing
Redtigercod4 Jul 9, 2026
a094275
Added repository delete with testing helpers to handle dispatch task …
Redtigercod4 Jul 10, 2026
e6524b1
Updated types for task dispatch response, updated error messaging on …
Redtigercod4 Jul 10, 2026
0d67264
Merge branch 'main' into feat/rpm-api-client
Redtigercod4 Sep 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@
"sort-exports": "perl -i -pe 's/^export/import/' src/**/index.ts ; npm run prettier ; perl -i -pe 's/^import/export/' src/**/index.ts",
"start": "NODE_ENV=development webpack serve --config config/start.config.js",
"test": "true",
"test:check-ts": "node -e \"process.versions.node.localeCompare('22.10.0',undefined,{numeric:true})>=0||(console.error('Testing uses feature flags requiring Node >= 22.10.0, but is using '+process.versions.node),process.exit(1))\"",
"test:check-api-status": "curl -sf \"${PULP_BASE_URL:-http://localhost:8080/pulp/api/v3/}status/\" -o /dev/null || (echo 'Integration tests require the Pulp API, is it running?' >&2; exit 1)",
"test:check": "npm run test:check-ts && npm run test:check-api-status",
"test:unit": "npm run test:check && node --test --experimental-strip-types --test-name-pattern '^Unit: '",
"test:integration": "npm run test:check && node --test --experimental-strip-types --test-name-pattern '^Integration: '",
"test:coverage": "npm run test:check && node --test --experimental-strip-types --experimental-test-coverage --test-coverage-exclude '**/*.test.ts' --test-coverage-exclude 'src/api/test-utils/**'",
"upgrade": "npx npm-check-updates -u -t minor"
},
"engines": {
Expand Down
96 changes: 96 additions & 0 deletions src/api/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,99 @@ interface GenericRemote extends GenericResource {
rate_limit?: number | null;
}

/**
* Generic Filters shared across PulpCore & Plugin Endpoints.
*
* @see https://github.com/pulp/pulpcore/blob/934c752dae916857b2005e1fe0ef75496accc082/pulpcore/filters.py#L290
*/
interface GenericFilterParams {
pulp_id__in?: string;
pulp_href__in?: string;
prn__in?: string;
q?: string;
exclude_fields?: string;
fields?: string;
limit?: number;
minimal?: boolean;
offset?: number;
page_size?: number;
ordering?: string;
format?: string;
}

type LookupFilterParams<
Field extends string,
Lookup extends string,
Value,
> = Partial<Record<Field | `${Field}__${Lookup}`, Value>>;
type NameFilterOptions =
| 'iexact'
| 'in'
| 'contains'
| 'icontains'
| 'startswith'
| 'istartswith'
| 'regex'
| 'iregex';
type NullableNumericFilterOptions =
| 'ne'
| 'lt'
| 'lte'
| 'gt'
| 'gte'
| 'range'
| 'isnull';
type NameFilterParams = LookupFilterParams<'name', NameFilterOptions, string>;
type RetainRepoVersionsFilterParams = LookupFilterParams<
'retain_repo_versions',
NullableNumericFilterOptions,
number | string
>;
type RetainCheckpointsFilterParams = LookupFilterParams<
'retain_checkpoints',
NullableNumericFilterOptions,
number | string
>;

/**
* Generic Repository Filters shared across PulpCore & Plugin Endpoints.
*
* @see https://github.com/pulp/pulpcore/blob/934c752dae916857b2005e1fe0ef75496accc082/pulpcore/app/viewsets/repository.py#L88
*/
interface GenericRepositoryFilterParams
extends
GenericFilterParams,
NameFilterParams,
RetainRepoVersionsFilterParams,
RetainCheckpointsFilterParams {
pulp_label_select?: string;
remote?: string | null;
with_content?: string;
latest_with_content?: string;
}

/**
* Paginated Response shared across PulpCore & Plugin Endpoints.
*
* @see https://github.com/pulp/pulpcore/blob/934c752dae916857b2005e1fe0ef75496accc082/pulpcore/app/settings.py#L186
* @see https://github.com/encode/django-rest-framework/blob/6f0b74def3fcc81e126b87b08e59abdb6c2ad056/rest_framework/pagination.py#L364
*/
interface PaginatedResponse<TResult> {
count: number;
next: string | null;
previous: string | null;
results: TResult[];
}

/**
* Async Task Dispatch Response shared across PulpCore & Plugin Endpoints.
*
* @see https://github.com/pulp/pulpcore/blob/dea04fa79a6ca590f2943a0a7754c219061be10c/pulpcore/app/response.py#L6
*/
interface DispatchedTaskResponse {
task: string;
}

/**
* --------------------
* These are shared Plugin Types outside the PulpCore Generics.
Expand All @@ -123,5 +216,8 @@ export type {
GenericDistribution,
GenericPublication,
GenericRemote,
GenericRepositoryFilterParams,
PaginatedResponse,
DispatchedTaskResponse,
AnsibleLastSyncType,
};
8 changes: 8 additions & 0 deletions src/api/plugins/rpm/client.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { PulpAPI } from 'src/api/pulp';
import { createRepositoryAPI } from './repository';

class RpmClient extends PulpAPI {
repository = createRepositoryAPI(this);
}

export { RpmClient };
Loading
Loading