@hahnpro/hpc-api 2026.10.1 → 2026.10.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/package.json +1 -1
- package/src/index.d.ts +0 -1
- package/src/index.js +0 -1
- package/src/lib/constants/index.d.ts +3 -0
- package/src/lib/constants/index.js +16 -0
- package/src/lib/constants/permissions.constants.d.ts +1 -0
- package/src/lib/constants/permissions.constants.js +4 -0
- package/src/lib/interfaces/authz/feature.interface.d.ts +0 -4
- package/src/lib/interfaces/authz/index.d.ts +5 -3
- package/src/lib/interfaces/authz/localized-permission.interface.d.ts +5 -0
- package/src/lib/interfaces/authz/localized-permission.interface.js +2 -0
- package/src/lib/interfaces/authz/org-subscription.interface.d.ts +4 -0
- package/src/lib/interfaces/authz/plan.interface.d.ts +0 -4
- package/src/lib/interfaces/authz/sql-sort.interface.d.ts +4 -0
- package/src/lib/interfaces/authz/sql-sort.interface.js +2 -0
- package/src/lib/mock/authz/authorization.mock.service.d.ts +2 -2
- package/src/lib/mock/authz/plans.mock.service.d.ts +1 -1
- package/src/lib/mock/authz/plans.mock.service.js +1 -1
- package/src/lib/services/authz/authorization.service.d.ts +2 -2
- package/src/lib/services/authz/org-subscription.service.d.ts +2 -2
- package/src/lib/services/authz/org-subscription.service.js +2 -2
- package/src/lib/services/authz/plans.service.d.ts +2 -2
- package/src/lib/services/authz/plans.service.js +5 -2
- /package/src/lib/{constants.d.ts → constants/active-org-id-header.constants.d.ts} +0 -0
- /package/src/lib/{constants.js → constants/active-org-id-header.constants.js} +0 -0
- /package/src/lib/{crm.constants.d.ts → constants/crm.constants.d.ts} +0 -0
- /package/src/lib/{crm.constants.js → constants/crm.constants.js} +0 -0
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
package/src/index.js
CHANGED
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./lib/api"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./lib/constants"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./lib/crm.constants"), exports);
|
|
7
6
|
tslib_1.__exportStar(require("./lib/interfaces"), exports);
|
|
8
7
|
tslib_1.__exportStar(require("./lib/mock"), exports);
|
|
9
8
|
tslib_1.__exportStar(require("./lib/services"), exports);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { ACTIVE_ORG_ID_HEADER } from './active-org-id-header.constants';
|
|
2
|
+
export { type CrmDealReminderRule, type CrmDealReminderStage, CRM_DEAL_REMINDER_RULES, CRM_DEAL_REMINDER_SCHEMA_MARKER, buildCrmMeetingSourceId, buildCrmMeetingParticipantSourceId, CRM_ASSET_TYPE_IDS, CRM_ASSET_TYPE_NAMES, CRM_ASSET_TYPES, PUBLIC_EMAIL_PROVIDERS, } from './crm.constants';
|
|
3
|
+
export { PUBLIC_PERMISSION } from './permissions.constants';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PUBLIC_PERMISSION = exports.PUBLIC_EMAIL_PROVIDERS = exports.CRM_ASSET_TYPES = exports.CRM_ASSET_TYPE_NAMES = exports.CRM_ASSET_TYPE_IDS = exports.buildCrmMeetingParticipantSourceId = exports.buildCrmMeetingSourceId = exports.CRM_DEAL_REMINDER_SCHEMA_MARKER = exports.CRM_DEAL_REMINDER_RULES = exports.ACTIVE_ORG_ID_HEADER = void 0;
|
|
4
|
+
var active_org_id_header_constants_1 = require("./active-org-id-header.constants");
|
|
5
|
+
Object.defineProperty(exports, "ACTIVE_ORG_ID_HEADER", { enumerable: true, get: function () { return active_org_id_header_constants_1.ACTIVE_ORG_ID_HEADER; } });
|
|
6
|
+
var crm_constants_1 = require("./crm.constants");
|
|
7
|
+
Object.defineProperty(exports, "CRM_DEAL_REMINDER_RULES", { enumerable: true, get: function () { return crm_constants_1.CRM_DEAL_REMINDER_RULES; } });
|
|
8
|
+
Object.defineProperty(exports, "CRM_DEAL_REMINDER_SCHEMA_MARKER", { enumerable: true, get: function () { return crm_constants_1.CRM_DEAL_REMINDER_SCHEMA_MARKER; } });
|
|
9
|
+
Object.defineProperty(exports, "buildCrmMeetingSourceId", { enumerable: true, get: function () { return crm_constants_1.buildCrmMeetingSourceId; } });
|
|
10
|
+
Object.defineProperty(exports, "buildCrmMeetingParticipantSourceId", { enumerable: true, get: function () { return crm_constants_1.buildCrmMeetingParticipantSourceId; } });
|
|
11
|
+
Object.defineProperty(exports, "CRM_ASSET_TYPE_IDS", { enumerable: true, get: function () { return crm_constants_1.CRM_ASSET_TYPE_IDS; } });
|
|
12
|
+
Object.defineProperty(exports, "CRM_ASSET_TYPE_NAMES", { enumerable: true, get: function () { return crm_constants_1.CRM_ASSET_TYPE_NAMES; } });
|
|
13
|
+
Object.defineProperty(exports, "CRM_ASSET_TYPES", { enumerable: true, get: function () { return crm_constants_1.CRM_ASSET_TYPES; } });
|
|
14
|
+
Object.defineProperty(exports, "PUBLIC_EMAIL_PROVIDERS", { enumerable: true, get: function () { return crm_constants_1.PUBLIC_EMAIL_PROVIDERS; } });
|
|
15
|
+
var permissions_constants_1 = require("./permissions.constants");
|
|
16
|
+
Object.defineProperty(exports, "PUBLIC_PERMISSION", { enumerable: true, get: function () { return permissions_constants_1.PUBLIC_PERMISSION; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PUBLIC_PERMISSION = "public";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Audited } from './audited.interface';
|
|
2
|
-
import type { CapabilityBundle } from './capability-bundle.interface';
|
|
3
2
|
import type { LocalizedText, LocalizedTextPatch } from './localized-text.interface';
|
|
4
3
|
export declare enum FeatureId {
|
|
5
4
|
ALERTS = "alerts",
|
|
@@ -40,6 +39,3 @@ export interface Feature extends Audited<string>, Omit<CreateFeature, 'id' | 'de
|
|
|
40
39
|
readonly id: FeatureId;
|
|
41
40
|
description: LocalizedText | null;
|
|
42
41
|
}
|
|
43
|
-
export interface FeatureWithCapabilityBundles extends Feature {
|
|
44
|
-
capabilityBundles: CapabilityBundle[];
|
|
45
|
-
}
|
|
@@ -4,17 +4,19 @@ 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
|
|
7
|
+
export type { CreateFeature, UpdateFeature, Feature } 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
|
-
export type { CreateOrgSubscription, UpdateOrgSubscription, OrgSubscription } from './org-subscription.interface';
|
|
12
|
+
export type { CreateOrgSubscription, UpdateOrgSubscription, OrgSubscription, OrgSubscriptionSqlSort } from './org-subscription.interface';
|
|
13
13
|
export type { SqlPagination, SqlPaginationResult } from './sql-pagination.interface';
|
|
14
|
-
export type { CreatePlan, UpdatePlan, Plan as AuthzPlan
|
|
14
|
+
export type { CreatePlan, UpdatePlan, Plan as AuthzPlan } 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';
|
|
18
|
+
export type { LocalizedPermission } from './localized-permission.interface';
|
|
19
|
+
export type { SqlSort, SqlSortDirection } from './sql-sort.interface';
|
|
18
20
|
export { CapabilityId, CapabilityType, CapabilityAction, CapabilityScope } from './capability.interface';
|
|
19
21
|
export { CapabilityBundleId } from './capability-bundle.interface';
|
|
20
22
|
export { FeatureId } from './feature.interface';
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { Audited } from './audited.interface';
|
|
2
2
|
import type { PlanId } from './plan.interface';
|
|
3
|
+
import type { SqlSort, SqlSortDirection } from './sql-sort.interface';
|
|
4
|
+
export interface OrgSubscriptionSqlSort extends SqlSort {
|
|
5
|
+
status?: SqlSortDirection;
|
|
6
|
+
}
|
|
3
7
|
export declare enum OrgSubscriptionStatus {
|
|
4
8
|
ACTIVE = "active",
|
|
5
9
|
CANCELLED = "cancelled"
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Audited } from './audited.interface';
|
|
2
|
-
import type { FeatureWithCapabilityBundles } from './feature.interface';
|
|
3
2
|
import type { LocalizedText, LocalizedTextPatch } from './localized-text.interface';
|
|
4
3
|
export declare enum PlanId {
|
|
5
4
|
DEFAULT = "default",
|
|
@@ -23,6 +22,3 @@ export interface Plan extends Audited<string>, Omit<CreatePlan, 'id' | 'descript
|
|
|
23
22
|
readonly id: PlanId;
|
|
24
23
|
description: LocalizedText | null;
|
|
25
24
|
}
|
|
26
|
-
export interface PlanWithFeaturesAndCapabilityBundles extends Plan {
|
|
27
|
-
features: FeatureWithCapabilityBundles[];
|
|
28
|
-
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Capability, CapabilityBundle, CapabilityId,
|
|
1
|
+
import type { Capability, CapabilityBundle, CapabilityId, LocalizedPermission, SqlPagination, TokenOption } from '../../interfaces';
|
|
2
2
|
import { APIBaseMock } from '../../mock/api-base.mock';
|
|
3
3
|
import { AuthorizationService } from '../../services/authz/authorization.service';
|
|
4
4
|
export declare class AuthorizationMockService extends APIBaseMock<never> implements AuthorizationService {
|
|
@@ -6,5 +6,5 @@ export declare class AuthorizationMockService extends APIBaseMock<never> impleme
|
|
|
6
6
|
getOrgCapabilitiesForActiveSubscription(sqlPagination?: SqlPagination, options?: TokenOption): Promise<Capability[]>;
|
|
7
7
|
getOrgCapabilityBundlesForActiveSubscription(sqlPagination?: SqlPagination, options?: TokenOption): Promise<CapabilityBundle[]>;
|
|
8
8
|
getCapabilitiesForUsersActiveOrg(options?: TokenOption): Promise<CapabilityId[]>;
|
|
9
|
-
getPermissionsForUsersActiveOrg(options?: TokenOption): Promise<
|
|
9
|
+
getPermissionsForUsersActiveOrg(options?: TokenOption): Promise<LocalizedPermission[]>;
|
|
10
10
|
}
|
|
@@ -4,5 +4,5 @@ export declare class PlansMockService extends APIBaseMock<never> implements Plan
|
|
|
4
4
|
constructor();
|
|
5
5
|
getPlans(..._args: Parameters<PlansService['getPlans']>): ReturnType<PlansService['getPlans']>;
|
|
6
6
|
getPlanById(..._args: Parameters<PlansService['getPlanById']>): ReturnType<PlansService['getPlanById']>;
|
|
7
|
-
|
|
7
|
+
getPlanFeaturesByPlanId(..._args: Parameters<PlansService['getPlanFeaturesByPlanId']>): ReturnType<PlansService['getPlanFeaturesByPlanId']>;
|
|
8
8
|
}
|
|
@@ -12,7 +12,7 @@ class PlansMockService extends api_base_mock_1.APIBaseMock {
|
|
|
12
12
|
getPlanById(..._args) {
|
|
13
13
|
throw new Error('Method not implemented.');
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
getPlanFeaturesByPlanId(..._args) {
|
|
16
16
|
throw new Error('Method not implemented.');
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { APIBase } from '../../api-base';
|
|
2
|
-
import type { Capability, CapabilityBundle, CapabilityId,
|
|
2
|
+
import type { Capability, CapabilityBundle, CapabilityId, LocalizedPermission, SqlPagination, TokenOption } from '../../interfaces';
|
|
3
3
|
import { HttpClientService } from '../http-client.service';
|
|
4
4
|
export declare class AuthorizationService extends APIBase {
|
|
5
5
|
constructor(httpClient: HttpClientService);
|
|
6
6
|
getOrgCapabilitiesForActiveSubscription(sqlPagination?: SqlPagination, options?: TokenOption): Promise<Capability[]>;
|
|
7
7
|
getOrgCapabilityBundlesForActiveSubscription(sqlPagination?: SqlPagination, options?: TokenOption): Promise<CapabilityBundle[]>;
|
|
8
8
|
getCapabilitiesForUsersActiveOrg(options?: TokenOption): Promise<CapabilityId[]>;
|
|
9
|
-
getPermissionsForUsersActiveOrg(options?: TokenOption): Promise<
|
|
9
|
+
getPermissionsForUsersActiveOrg(options?: TokenOption): Promise<LocalizedPermission[]>;
|
|
10
10
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { APIBase } from '../../api-base';
|
|
2
|
-
import type { OrgSubscription, SqlPagination, SqlPaginationResult, TokenOption } from '../../interfaces';
|
|
2
|
+
import type { OrgSubscription, OrgSubscriptionSqlSort, SqlPagination, SqlPaginationResult, TokenOption } from '../../interfaces';
|
|
3
3
|
import { HttpClientService } from '../http-client.service';
|
|
4
4
|
export declare class OrgSubscriptionService extends APIBase {
|
|
5
5
|
constructor(httpClient: HttpClientService);
|
|
6
|
-
getOrgSubscriptionsByOrgId(sqlPagination?: SqlPagination, options?: TokenOption): Promise<SqlPaginationResult<OrgSubscription>>;
|
|
6
|
+
getOrgSubscriptionsByOrgId(sqlPagination?: SqlPagination, sort?: OrgSubscriptionSqlSort, options?: TokenOption): Promise<SqlPaginationResult<OrgSubscription>>;
|
|
7
7
|
getOrgSubscriptionById(orgSubscriptionId: string, options?: TokenOption): Promise<OrgSubscription>;
|
|
8
8
|
}
|
|
@@ -6,8 +6,8 @@ class OrgSubscriptionService extends api_base_1.APIBase {
|
|
|
6
6
|
constructor(httpClient) {
|
|
7
7
|
super(httpClient, '/authz/org-subscriptions');
|
|
8
8
|
}
|
|
9
|
-
getOrgSubscriptionsByOrgId(sqlPagination = {}, options = {}) {
|
|
10
|
-
return this.httpClient.get(this.basePath, { ...options, params: sqlPagination });
|
|
9
|
+
getOrgSubscriptionsByOrgId(sqlPagination = {}, sort = {}, options = {}) {
|
|
10
|
+
return this.httpClient.get(this.basePath, { ...options, params: { ...sqlPagination, ...sort } });
|
|
11
11
|
}
|
|
12
12
|
getOrgSubscriptionById(orgSubscriptionId, options = {}) {
|
|
13
13
|
return this.httpClient.get(`${this.basePath}/${orgSubscriptionId}`, options);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { APIBase } from '../../api-base';
|
|
2
|
-
import type { AuthzPlan as Plan, PlanId,
|
|
2
|
+
import type { Feature, AuthzPlan as Plan, PlanId, SqlPagination, SqlPaginationResult, TokenOption } from '../../interfaces';
|
|
3
3
|
import { HttpClientService } from '../http-client.service';
|
|
4
4
|
export declare class PlansService extends APIBase {
|
|
5
5
|
constructor(httpClient: HttpClientService);
|
|
6
6
|
getPlans(sqlPagination?: SqlPagination, options?: TokenOption): Promise<SqlPaginationResult<Plan>>;
|
|
7
7
|
getPlanById(planId: PlanId, options?: TokenOption): Promise<Plan>;
|
|
8
|
-
|
|
8
|
+
getPlanFeaturesByPlanId(planId: PlanId, sqlPagination?: SqlPagination, options?: TokenOption): Promise<SqlPaginationResult<Feature>>;
|
|
9
9
|
}
|
|
@@ -12,8 +12,11 @@ class PlansService extends api_base_1.APIBase {
|
|
|
12
12
|
getPlanById(planId, options = {}) {
|
|
13
13
|
return this.httpClient.get(`${this.basePath}/${planId}`, options);
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
return this.httpClient.get(`${this.basePath}/${planId}/
|
|
15
|
+
getPlanFeaturesByPlanId(planId, sqlPagination = {}, options = {}) {
|
|
16
|
+
return this.httpClient.get(`${this.basePath}/${planId}/features`, {
|
|
17
|
+
...options,
|
|
18
|
+
params: sqlPagination,
|
|
19
|
+
});
|
|
17
20
|
}
|
|
18
21
|
}
|
|
19
22
|
exports.PlansService = PlansService;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|