refactor: remove sources selector from frontend

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-06-20 00:00:28 -04:00
parent 9845262e62
commit dfe308c046
10 changed files with 46 additions and 66 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
/**
* Collection type definitions
*/
import type { CollectionIdentifier, ListFilter, ListSort, ServiceIdentifier, SourceSelector } from './common';
import type { CollectionIdentifier, ListFilter, ListSort, ServiceIdentifier } from './common';
/**
* Collection information
+2 -27
View File
@@ -85,33 +85,8 @@ export type ApiStreamResponse<T = any> =
| ApiStreamDataResponse<T>;
/**
* Selector for targeting specific providers, services, collections, or entities in list or extant operations.
*
* Example usage:
* {
* "provider1": true, // Select all services/collections/entities under provider1
* "provider2": {
* "serviceA": true, // Select all collections/entities under serviceA of provider2
* "serviceB": {
* "collectionX": true, // Select all entities under collectionX of serviceB of provider2
* "collectionY": [1, 2, 3] // Select entities with identifiers 1, 2, and 3 under collectionY of serviceB of provider2
* }
* }
* }
*/
export type SourceSelector = {
[provider: string]: boolean | ServiceSelector;
};
export type ServiceSelector = {
[service: string]: boolean | CollectionSelector;
};
export type CollectionSelector = {
[collection: string | number]: boolean | EntitySelector;
};
export type EntitySelector = (string | number)[];
* Identifiers for targeting specific providers, services, collections, or entities in list or extant operations.
*
export type ProviderIdentifier = `${string}`;
export type ServiceIdentifier = `${string}:${string}`;
+1 -1
View File
@@ -92,7 +92,7 @@ export interface EntityExtantResponse {
* Entity delta
*/
export interface EntityDeltaRequest {
sources: CollectionIdentifier[];
targets: CollectionIdentifier[];
}
export interface EntityDeltaResponse {
+4 -4
View File
@@ -1,7 +1,7 @@
/**
* Provider type definitions
*/
import type { SourceSelector } from "./common";
import type { ProviderIdentifier } from "./common";
/**
* Provider capabilities
@@ -35,7 +35,7 @@ export interface ProviderModelInterface extends Omit<ProviderInterface, '@type'
* Provider list
*/
export interface ProviderListRequest {
sources?: SourceSelector;
targets?: ProviderIdentifier[];
}
export interface ProviderListResponse {
@@ -46,7 +46,7 @@ export interface ProviderListResponse {
* Provider fetch
*/
export interface ProviderFetchRequest {
identifier: string;
target: string;
}
export interface ProviderFetchResponse extends ProviderInterface {}
@@ -55,7 +55,7 @@ export interface ProviderFetchResponse extends ProviderInterface {}
* Provider extant
*/
export interface ProviderExtantRequest {
sources: SourceSelector;
targets: ProviderIdentifier[];
}
export interface ProviderExtantResponse {
+4 -3
View File
@@ -5,8 +5,9 @@ import type { ServiceAddressObject } from '@/models/address';
import type { Identity } from '@/models/identity';
import type { Location } from '@/models/location';
import type {
CollectionIdentifier,
ListFilterComparisonOperator,
SourceSelector,
ServiceIdentifier,
} from './common';
/**
@@ -81,7 +82,7 @@ export interface ServiceModelInterface extends Omit<{
* Service list
*/
export interface ServiceListRequest {
sources?: SourceSelector;
targets?: ServiceIdentifier[] | CollectionIdentifier[];
}
export interface ServiceListResponse {
@@ -104,7 +105,7 @@ export interface ServiceFetchResponse extends ServiceInterface {}
* Service extant
*/
export interface ServiceExtantRequest {
sources: SourceSelector;
targets: ServiceIdentifier[];
}
export interface ServiceExtantResponse {