@hahnpro/hpc-api 2026.8.1 → 2026.8.2
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/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/src/lib/interfaces/index.d.ts +1 -1
- package/src/lib/interfaces/label.interface.d.ts +3 -0
- package/src/lib/mock/label.mock.service.d.ts +1 -0
- package/src/lib/mock/label.mock.service.js +3 -0
- package/src/lib/services/label.service.d.ts +1 -0
- package/src/lib/services/label.service.js +3 -0
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -21,7 +21,7 @@ export type { DashboardItem, FlowChange, FlowDeploymentDto, FlowDto, FlowPopulat
|
|
|
21
21
|
export type { Config, Issuer, TokenOption } from './http.interface';
|
|
22
22
|
export type { InvitationRepresentation } from './invitation-representation.interface';
|
|
23
23
|
export type { KeycloakProfile } from './keycloak-profile.interface';
|
|
24
|
-
export type { CreateLabelDto, Label, LabelColor, UpdateLabelDto } from './label.interface';
|
|
24
|
+
export type { BulkLabelsDto, CreateLabelDto, Label, LabelColor, UpdateLabelDto } from './label.interface';
|
|
25
25
|
export { LogbookEntrySource } from './logbook.interface';
|
|
26
26
|
export type { LogbookEntry, LogbookEntryDto } from './logbook.interface';
|
|
27
27
|
export type { MeteredQuantity, MeteringDimension, Plan, PlanComponents, RecurrentBillingTerm, SourceOffer, Subscription, SubscriptionInfo, Term, } from './marketplace.interface';
|
|
@@ -17,3 +17,6 @@ export interface Label {
|
|
|
17
17
|
}
|
|
18
18
|
export type CreateLabelDto = Pick<Label, 'name' | 'description' | 'color' | 'readPermissions' | 'readWritePermissions'>;
|
|
19
19
|
export type UpdateLabelDto = Partial<CreateLabelDto>;
|
|
20
|
+
export interface BulkLabelsDto {
|
|
21
|
+
ids: string[];
|
|
22
|
+
}
|
|
@@ -5,5 +5,6 @@ export declare class LabelMockService extends DataMockService<Label> implements
|
|
|
5
5
|
constructor(labels: Label[]);
|
|
6
6
|
count(): Promise<number>;
|
|
7
7
|
getOneByName(name: string): Promise<Label>;
|
|
8
|
+
getManyByIds(ids: string[]): Promise<Label[]>;
|
|
8
9
|
search(query: SearchOptions<Label>, _: any): Promise<SearchResult<Label>>;
|
|
9
10
|
}
|
|
@@ -13,6 +13,9 @@ class LabelMockService extends data_mock_service_1.DataMockService {
|
|
|
13
13
|
getOneByName(name) {
|
|
14
14
|
return Promise.resolve(this.data.find((label) => label.name === name));
|
|
15
15
|
}
|
|
16
|
+
getManyByIds(ids) {
|
|
17
|
+
return Promise.resolve(this.data.filter((label) => ids.includes(label.id)));
|
|
18
|
+
}
|
|
16
19
|
search(query, _) {
|
|
17
20
|
const docs = this.data.filter((label) => label.name.includes(query.query));
|
|
18
21
|
return Promise.resolve({
|
|
@@ -5,6 +5,7 @@ export declare class LabelService extends DataService<Label> {
|
|
|
5
5
|
constructor(httpClient: HttpClientService);
|
|
6
6
|
addMany(dtos: Label[], options?: TokenOption): Promise<Label[]>;
|
|
7
7
|
getOneByName(name: string, options?: TokenOption): Promise<Label>;
|
|
8
|
+
getManyByIds(ids: string[], options?: TokenOption): Promise<Label[]>;
|
|
8
9
|
count(options?: TokenOption): Promise<number>;
|
|
9
10
|
search<K extends keyof Label>(query: SearchOptions<Label, K>, tokenOption?: TokenOption): Promise<SearchResult<Label, K>>;
|
|
10
11
|
}
|
|
@@ -12,6 +12,9 @@ class LabelService extends data_service_1.DataService {
|
|
|
12
12
|
getOneByName(name, options = {}) {
|
|
13
13
|
return this.httpClient.get(`${this.basePath}/name/${name}`, options);
|
|
14
14
|
}
|
|
15
|
+
getManyByIds(ids, options = {}) {
|
|
16
|
+
return this.httpClient.post(`${this.basePath}/bulk`, { ids }, options);
|
|
17
|
+
}
|
|
15
18
|
count(options = {}) {
|
|
16
19
|
return this.httpClient.get(`${this.basePath}/count`, options);
|
|
17
20
|
}
|