@hahnpro/hpc-api 2026.9.12 → 2026.9.13

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.
Files changed (24) hide show
  1. package/package.json +1 -1
  2. package/src/lib/interfaces/authz/capability-bundle-capability.interface.d.ts +1 -1
  3. package/src/lib/interfaces/authz/feature-capability.interface.d.ts +1 -1
  4. package/src/lib/interfaces/authz/feature.interface.d.ts +4 -0
  5. package/src/lib/interfaces/authz/index.d.ts +2 -2
  6. package/src/lib/interfaces/authz/org-group-capability-bundle.interface.d.ts +1 -1
  7. package/src/lib/interfaces/authz/org-subscription.interface.d.ts +1 -1
  8. package/src/lib/interfaces/authz/plan-feature.interface.d.ts +2 -2
  9. package/src/lib/interfaces/authz/plan.interface.d.ts +4 -0
  10. package/src/lib/interfaces/authz/service-account-capability-bundle.interface.d.ts +1 -1
  11. package/src/lib/mock/authz/authz.mock.service.d.ts +2 -0
  12. package/src/lib/mock/authz/authz.mock.service.js +2 -0
  13. package/src/lib/mock/authz/plans.mock.service.d.ts +8 -0
  14. package/src/lib/mock/authz/plans.mock.service.js +19 -0
  15. package/src/lib/services/authz/authorization.service.d.ts +1 -2
  16. package/src/lib/services/authz/authz.service.d.ts +2 -0
  17. package/src/lib/services/authz/authz.service.js +2 -0
  18. package/src/lib/services/authz/org-group-capability-bundle.service.d.ts +1 -2
  19. package/src/lib/services/authz/org-group-capability.service.d.ts +1 -2
  20. package/src/lib/services/authz/org-group-member.service.d.ts +1 -2
  21. package/src/lib/services/authz/org-group.service.d.ts +1 -2
  22. package/src/lib/services/authz/org-subscription.service.d.ts +2 -3
  23. package/src/lib/services/authz/plans.service.d.ts +9 -0
  24. package/src/lib/services/authz/plans.service.js +19 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hahnpro/hpc-api",
3
- "version": "2026.9.12",
3
+ "version": "2026.9.13",
4
4
  "description": "Module for easy access to the HahnPRO Cloud API",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -1,5 +1,5 @@
1
1
  import type { Audited } from './audited.interface';
2
- import { CapabilityBundleId } from './capability-bundle.interface';
2
+ import type { CapabilityBundleId } from './capability-bundle.interface';
3
3
  import type { CapabilityId } from './capability.interface';
4
4
  export interface CreateCapabilityBundleCapability {
5
5
  capabilityBundleId: CapabilityBundleId;
@@ -1,6 +1,6 @@
1
1
  import type { Audited } from './audited.interface';
2
2
  import type { CapabilityId } from './capability.interface';
3
- import { FeatureId } from './feature.interface';
3
+ import type { FeatureId } from './feature.interface';
4
4
  export interface CreateFeatureCapability {
5
5
  featureId: FeatureId;
6
6
  capabilityId: CapabilityId;
@@ -1,4 +1,5 @@
1
1
  import type { Audited } from './audited.interface';
2
+ import type { CapabilityBundle } from './capability-bundle.interface';
2
3
  import type { LocalizedText, LocalizedTextPatch } from './localized-text.interface';
3
4
  export declare enum FeatureId {
4
5
  ALERTS = "alerts",
@@ -39,3 +40,6 @@ export interface Feature extends Audited<string>, Omit<CreateFeature, 'id' | 'de
39
40
  readonly id: FeatureId;
40
41
  description: LocalizedText | null;
41
42
  }
43
+ export interface FeatureWithCapabilityBundles extends Feature {
44
+ capabilityBundles: CapabilityBundle[];
45
+ }
@@ -4,14 +4,14 @@ export type { CreateCapabilityBundle, UpdateCapabilityBundle, CapabilityBundle }
4
4
  export type { CreateCapabilityBundleCapability, CapabilityBundleCapability } from './capability-bundle-capability.interface';
5
5
  export type { CreateCapability, UpdateCapability, Capability } from './capability.interface';
6
6
  export type { CreateOrgGroup, UpdateOrgGroup, OrgGroup } from './org-group.interface';
7
- export type { CreateFeature, UpdateFeature, Feature } from './feature.interface';
7
+ export type { CreateFeature, UpdateFeature, Feature, FeatureWithCapabilityBundles } from './feature.interface';
8
8
  export type { CreateFeatureCapability, FeatureCapability } from './feature-capability.interface';
9
9
  export type { CreateOrgGroupCapability, OrgGroupCapability } from './org-group-capability.interface';
10
10
  export type { CreateOrgGroupCapabilityBundle, OrgGroupCapabilityBundle } from './org-group-capability-bundle.interface';
11
11
  export type { CreateOrgGroupMember, OrgGroupMember } from './org-group-member.interface';
12
12
  export type { CreateOrgSubscription, UpdateOrgSubscription, OrgSubscription } from './org-subscription.interface';
13
13
  export type { SqlPagination, SqlPaginationResult } from './sql-pagination.interface';
14
- export type { CreatePlan, UpdatePlan, Plan as AuthzPlan } from './plan.interface';
14
+ export type { CreatePlan, UpdatePlan, Plan as AuthzPlan, PlanWithFeaturesAndCapabilityBundles } from './plan.interface';
15
15
  export type { CreatePlanFeature, PlanFeature } from './plan-feature.interface';
16
16
  export type { CreateServiceAccountCapability, ServiceAccountCapability } from './service-account-capability.interface';
17
17
  export type { CreateServiceAccountCapabilityBundle, ServiceAccountCapabilityBundle } from './service-account-capability-bundle.interface';
@@ -1,5 +1,5 @@
1
1
  import type { Audited } from './audited.interface';
2
- import { CapabilityBundleId } from './capability-bundle.interface';
2
+ import type { CapabilityBundleId } from './capability-bundle.interface';
3
3
  export interface CreateOrgGroupCapabilityBundle {
4
4
  orgGroupId: string;
5
5
  capabilityBundleId: CapabilityBundleId;
@@ -1,5 +1,5 @@
1
1
  import type { Audited } from './audited.interface';
2
- import { PlanId } from './plan.interface';
2
+ import type { PlanId } from './plan.interface';
3
3
  export declare enum OrgSubscriptionStatus {
4
4
  ACTIVE = "active",
5
5
  CANCELLED = "cancelled"
@@ -1,6 +1,6 @@
1
1
  import type { Audited } from './audited.interface';
2
- import { FeatureId } from './feature.interface';
3
- import { PlanId } from './plan.interface';
2
+ import type { FeatureId } from './feature.interface';
3
+ import type { PlanId } from './plan.interface';
4
4
  export interface CreatePlanFeature {
5
5
  planId: PlanId;
6
6
  featureId: FeatureId;
@@ -1,4 +1,5 @@
1
1
  import type { Audited } from './audited.interface';
2
+ import type { FeatureWithCapabilityBundles } from './feature.interface';
2
3
  import type { LocalizedText, LocalizedTextPatch } from './localized-text.interface';
3
4
  export declare enum PlanId {
4
5
  DEFAULT = "default",
@@ -22,3 +23,6 @@ export interface Plan extends Audited<string>, Omit<CreatePlan, 'id' | 'descript
22
23
  readonly id: PlanId;
23
24
  description: LocalizedText | null;
24
25
  }
26
+ export interface PlanWithFeaturesAndCapabilityBundles extends Plan {
27
+ features: FeatureWithCapabilityBundles[];
28
+ }
@@ -1,5 +1,5 @@
1
1
  import type { Audited } from './audited.interface';
2
- import { CapabilityBundleId } from './capability-bundle.interface';
2
+ import type { CapabilityBundleId } from './capability-bundle.interface';
3
3
  export interface CreateServiceAccountCapabilityBundle {
4
4
  serviceAccountId: string;
5
5
  capabilityBundleId: CapabilityBundleId;
@@ -5,6 +5,7 @@ import { OrgGroupCapabilityService } from '../../services/authz/org-group-capabi
5
5
  import { OrgGroupMemberService } from '../../services/authz/org-group-member.service';
6
6
  import { OrgGroupService } from '../../services/authz/org-group.service';
7
7
  import { OrgSubscriptionService } from '../../services/authz/org-subscription.service';
8
+ import { PlansService } from '../../services/authz/plans.service';
8
9
  import { APIBaseMock } from '../api-base.mock';
9
10
  export declare class AuthzMockService extends APIBaseMock<never> implements AuthzService {
10
11
  readonly authorization: AuthorizationService;
@@ -13,5 +14,6 @@ export declare class AuthzMockService extends APIBaseMock<never> implements Auth
13
14
  readonly orgGroupCapabilityBundles: OrgGroupCapabilityBundleService;
14
15
  readonly orgGroupMembers: OrgGroupMemberService;
15
16
  readonly orgSubscriptions: OrgSubscriptionService;
17
+ readonly plans: PlansService;
16
18
  constructor();
17
19
  }
@@ -8,6 +8,7 @@ const org_group_capability_mock_service_1 = require("./org-group-capability.mock
8
8
  const org_group_member_mock_service_1 = require("./org-group-member.mock.service");
9
9
  const org_group_mock_service_1 = require("./org-group.mock.service");
10
10
  const org_subscription_mock_service_1 = require("./org-subscription.mock.service");
11
+ const plans_mock_service_1 = require("./plans.mock.service");
11
12
  class AuthzMockService extends api_base_mock_1.APIBaseMock {
12
13
  constructor() {
13
14
  super(null);
@@ -17,6 +18,7 @@ class AuthzMockService extends api_base_mock_1.APIBaseMock {
17
18
  this.orgGroupCapabilityBundles = new org_group_capability_bundle_mock_service_1.OrgGroupCapabilityBundleMockService();
18
19
  this.orgGroupMembers = new org_group_member_mock_service_1.OrgGroupMemberMockService();
19
20
  this.orgSubscriptions = new org_subscription_mock_service_1.OrgSubscriptionMockService();
21
+ this.plans = new plans_mock_service_1.PlansMockService();
20
22
  }
21
23
  }
22
24
  exports.AuthzMockService = AuthzMockService;
@@ -0,0 +1,8 @@
1
+ import { APIBaseMock } from '../../mock/api-base.mock';
2
+ import { PlansService } from '../../services/authz/plans.service';
3
+ export declare class PlansMockService extends APIBaseMock<never> implements PlansService {
4
+ constructor();
5
+ getPlans(..._args: Parameters<PlansService['getPlans']>): ReturnType<PlansService['getPlans']>;
6
+ getPlanById(..._args: Parameters<PlansService['getPlanById']>): ReturnType<PlansService['getPlanById']>;
7
+ getPlanDetailsById(..._args: Parameters<PlansService['getPlanDetailsById']>): ReturnType<PlansService['getPlanDetailsById']>;
8
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PlansMockService = void 0;
4
+ const api_base_mock_1 = require("../../mock/api-base.mock");
5
+ class PlansMockService extends api_base_mock_1.APIBaseMock {
6
+ constructor() {
7
+ super(null);
8
+ }
9
+ getPlans(..._args) {
10
+ throw new Error('Method not implemented.');
11
+ }
12
+ getPlanById(..._args) {
13
+ throw new Error('Method not implemented.');
14
+ }
15
+ getPlanDetailsById(..._args) {
16
+ throw new Error('Method not implemented.');
17
+ }
18
+ }
19
+ exports.PlansMockService = PlansMockService;
@@ -1,6 +1,5 @@
1
1
  import { APIBase } from '../../api-base';
2
- import { CapabilityId, Permission, TokenOption } from '../../interfaces';
3
- import type { Capability, CapabilityBundle, SqlPagination } from '../../interfaces/authz';
2
+ import type { Capability, CapabilityBundle, CapabilityId, Permission, SqlPagination, TokenOption } from '../../interfaces';
4
3
  import { HttpClientService } from '../http-client.service';
5
4
  export declare class AuthorizationService extends APIBase {
6
5
  constructor(httpClient: HttpClientService);
@@ -6,6 +6,7 @@ import { OrgGroupCapabilityService } from './org-group-capability.service';
6
6
  import { OrgGroupMemberService } from './org-group-member.service';
7
7
  import { OrgGroupService } from './org-group.service';
8
8
  import { OrgSubscriptionService } from './org-subscription.service';
9
+ import { PlansService } from './plans.service';
9
10
  export declare class AuthzService extends APIBase {
10
11
  readonly authorization: AuthorizationService;
11
12
  readonly orgGroups: OrgGroupService;
@@ -13,5 +14,6 @@ export declare class AuthzService extends APIBase {
13
14
  readonly orgGroupCapabilityBundles: OrgGroupCapabilityBundleService;
14
15
  readonly orgGroupMembers: OrgGroupMemberService;
15
16
  readonly orgSubscriptions: OrgSubscriptionService;
17
+ readonly plans: PlansService;
16
18
  constructor(httpClient: HttpClientService);
17
19
  }
@@ -8,6 +8,7 @@ const org_group_capability_service_1 = require("./org-group-capability.service")
8
8
  const org_group_member_service_1 = require("./org-group-member.service");
9
9
  const org_group_service_1 = require("./org-group.service");
10
10
  const org_subscription_service_1 = require("./org-subscription.service");
11
+ const plans_service_1 = require("./plans.service");
11
12
  class AuthzService extends api_base_1.APIBase {
12
13
  constructor(httpClient) {
13
14
  super(httpClient, '/authz');
@@ -17,6 +18,7 @@ class AuthzService extends api_base_1.APIBase {
17
18
  this.orgGroupCapabilityBundles = new org_group_capability_bundle_service_1.OrgGroupCapabilityBundleService(httpClient);
18
19
  this.orgGroupMembers = new org_group_member_service_1.OrgGroupMemberService(httpClient);
19
20
  this.orgSubscriptions = new org_subscription_service_1.OrgSubscriptionService(httpClient);
21
+ this.plans = new plans_service_1.PlansService(httpClient);
20
22
  }
21
23
  }
22
24
  exports.AuthzService = AuthzService;
@@ -1,6 +1,5 @@
1
1
  import { APIBase } from '../../api-base';
2
- import type { TokenOption } from '../../interfaces';
3
- import type { CapabilityBundleId, CreateOrgGroupCapabilityBundle, OrgGroupCapabilityBundle, SqlPagination } from '../../interfaces/authz';
2
+ import type { CapabilityBundleId, CreateOrgGroupCapabilityBundle, OrgGroupCapabilityBundle, SqlPagination, TokenOption } from '../../interfaces';
4
3
  import { HttpClientService } from '../http-client.service';
5
4
  export declare class OrgGroupCapabilityBundleService extends APIBase {
6
5
  constructor(httpClient: HttpClientService);
@@ -1,6 +1,5 @@
1
1
  import { APIBase } from '../../api-base';
2
- import type { TokenOption } from '../../interfaces';
3
- import type { CapabilityId, CreateOrgGroupCapability, OrgGroupCapability, SqlPagination } from '../../interfaces/authz';
2
+ import type { CapabilityId, CreateOrgGroupCapability, OrgGroupCapability, SqlPagination, TokenOption } from '../../interfaces';
4
3
  import { HttpClientService } from '../http-client.service';
5
4
  export declare class OrgGroupCapabilityService extends APIBase {
6
5
  constructor(httpClient: HttpClientService);
@@ -1,6 +1,5 @@
1
1
  import { APIBase } from '../../api-base';
2
- import type { TokenOption } from '../../interfaces';
3
- import type { CreateOrgGroupMember, SqlPagination, SqlPaginationResult } from '../../interfaces/authz';
2
+ import type { CreateOrgGroupMember, SqlPagination, SqlPaginationResult, TokenOption } from '../../interfaces';
4
3
  import { HttpClientService } from '../http-client.service';
5
4
  export declare class OrgGroupMemberService extends APIBase {
6
5
  constructor(httpClient: HttpClientService);
@@ -1,6 +1,5 @@
1
1
  import { APIBase } from '../../api-base';
2
- import type { TokenOption } from '../../interfaces';
3
- import type { CreateOrgGroup, OrgGroup, SqlPagination, SqlPaginationResult, UpdateOrgGroup } from '../../interfaces/authz';
2
+ import type { CreateOrgGroup, OrgGroup, SqlPagination, SqlPaginationResult, TokenOption, UpdateOrgGroup } from '../../interfaces';
4
3
  import { HttpClientService } from '../http-client.service';
5
4
  export declare class OrgGroupService extends APIBase {
6
5
  constructor(httpClient: HttpClientService);
@@ -1,9 +1,8 @@
1
1
  import { APIBase } from '../../api-base';
2
- import type { TokenOption } from '../../interfaces';
3
- import type { OrgSubscription, SqlPagination } from '../../interfaces/authz';
2
+ import type { OrgSubscription, SqlPagination, SqlPaginationResult, TokenOption } from '../../interfaces';
4
3
  import { HttpClientService } from '../http-client.service';
5
4
  export declare class OrgSubscriptionService extends APIBase {
6
5
  constructor(httpClient: HttpClientService);
7
- getOrgSubscriptionsByOrgId(sqlPagination?: SqlPagination, options?: TokenOption): Promise<OrgSubscription[]>;
6
+ getOrgSubscriptionsByOrgId(sqlPagination?: SqlPagination, options?: TokenOption): Promise<SqlPaginationResult<OrgSubscription>>;
8
7
  getOrgSubscriptionById(orgSubscriptionId: string, options?: TokenOption): Promise<OrgSubscription>;
9
8
  }
@@ -0,0 +1,9 @@
1
+ import { APIBase } from '../../api-base';
2
+ import type { AuthzPlan as Plan, PlanId, PlanWithFeaturesAndCapabilityBundles, SqlPagination, SqlPaginationResult, TokenOption } from '../../interfaces';
3
+ import { HttpClientService } from '../http-client.service';
4
+ export declare class PlansService extends APIBase {
5
+ constructor(httpClient: HttpClientService);
6
+ getPlans(sqlPagination?: SqlPagination, options?: TokenOption): Promise<SqlPaginationResult<Plan>>;
7
+ getPlanById(planId: PlanId, options?: TokenOption): Promise<Plan>;
8
+ getPlanDetailsById(planId: PlanId, options?: TokenOption): Promise<PlanWithFeaturesAndCapabilityBundles>;
9
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PlansService = void 0;
4
+ const api_base_1 = require("../../api-base");
5
+ class PlansService extends api_base_1.APIBase {
6
+ constructor(httpClient) {
7
+ super(httpClient, '/authz/plans');
8
+ }
9
+ getPlans(sqlPagination = {}, options = {}) {
10
+ return this.httpClient.get(this.basePath, { ...options, params: sqlPagination });
11
+ }
12
+ getPlanById(planId, options = {}) {
13
+ return this.httpClient.get(`${this.basePath}/${planId}`, options);
14
+ }
15
+ getPlanDetailsById(planId, options = {}) {
16
+ return this.httpClient.get(`${this.basePath}/${planId}/details`, options);
17
+ }
18
+ }
19
+ exports.PlansService = PlansService;