@hahnpro/hpc-api 2026.8.2 → 2026.8.4
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 +3 -3
- package/src/lib/crm.constants.d.ts +23 -0
- package/src/lib/crm.constants.js +22 -1
- package/src/lib/interfaces/crm.interface.d.ts +7 -0
- package/src/lib/interfaces/index.d.ts +1 -1
- package/src/lib/mock/crm.mock.service.d.ts +2 -1
- package/src/lib/mock/crm.mock.service.js +5 -0
- package/src/lib/services/crm.service.d.ts +2 -1
- package/src/lib/services/crm.service.js +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hahnpro/hpc-api",
|
|
3
|
-
"version": "2026.8.
|
|
3
|
+
"version": "2026.8.4",
|
|
4
4
|
"description": "Module for easy access to the HahnPRO Cloud API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@microsoft/fetch-event-source": "2.0.1",
|
|
12
12
|
"axios": "1.19.0",
|
|
13
|
-
"eventsource": "5.1.
|
|
14
|
-
"jose": "6.2.
|
|
13
|
+
"eventsource": "5.1.1",
|
|
14
|
+
"jose": "6.2.10",
|
|
15
15
|
"jwt-decode": "4.0.0",
|
|
16
16
|
"p-queue": "9.3.3",
|
|
17
17
|
"rxjs": "7.8.2",
|
|
@@ -16,6 +16,29 @@ export declare const CRM_ASSET_TYPES: {
|
|
|
16
16
|
readonly name: "com.hahnpro.crm.deal";
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
|
+
export type CrmDealReminderStage = 'offer_sent' | 'order_placed' | 'up_cross_selling';
|
|
20
|
+
export declare const CRM_DEAL_REMINDER_SCHEMA_MARKER = "com.hahnpro.crm.deal-reminder";
|
|
21
|
+
export declare const CRM_DEAL_REMINDER_RULES: {
|
|
22
|
+
readonly offer_sent: {
|
|
23
|
+
readonly reminderType: "offer_follow_up";
|
|
24
|
+
readonly action: "follow_up_offer";
|
|
25
|
+
readonly businessDays: 5;
|
|
26
|
+
readonly description: "Beim Kunden zum versendeten Angebot nachfassen.";
|
|
27
|
+
};
|
|
28
|
+
readonly order_placed: {
|
|
29
|
+
readonly reminderType: "order_receipt";
|
|
30
|
+
readonly action: "check_order_and_project_transition";
|
|
31
|
+
readonly businessDays: 3;
|
|
32
|
+
readonly description: "Prüfen, ob Auftrag oder Vertrag eingegangen ist, und den Deal gegebenenfalls in Richtung Projekt/Kickoff weiterführen.";
|
|
33
|
+
};
|
|
34
|
+
readonly up_cross_selling: {
|
|
35
|
+
readonly reminderType: "follow_up_potential";
|
|
36
|
+
readonly action: "review_follow_up_deal";
|
|
37
|
+
readonly businessDays: 14;
|
|
38
|
+
readonly description: "Das weitere Up-/Cross-Selling-Potenzial prüfen und entscheiden, ob ein neuer Deal angelegt werden soll.";
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export type CrmDealReminderRule = (typeof CRM_DEAL_REMINDER_RULES)[CrmDealReminderStage];
|
|
19
42
|
export declare const CRM_ASSET_TYPE_IDS: {
|
|
20
43
|
readonly company: "69cd1e34310cf709b7936192";
|
|
21
44
|
readonly contact: "69cd1e2945c122feacf773d0";
|
package/src/lib/crm.constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PUBLIC_EMAIL_PROVIDERS = exports.CRM_ASSET_TYPE_NAMES = exports.CRM_ASSET_TYPE_IDS = exports.CRM_ASSET_TYPES = void 0;
|
|
3
|
+
exports.PUBLIC_EMAIL_PROVIDERS = exports.CRM_ASSET_TYPE_NAMES = exports.CRM_ASSET_TYPE_IDS = exports.CRM_DEAL_REMINDER_RULES = exports.CRM_DEAL_REMINDER_SCHEMA_MARKER = exports.CRM_ASSET_TYPES = void 0;
|
|
4
4
|
exports.CRM_ASSET_TYPES = {
|
|
5
5
|
company: {
|
|
6
6
|
id: '69cd1e34310cf709b7936192',
|
|
@@ -19,6 +19,27 @@ exports.CRM_ASSET_TYPES = {
|
|
|
19
19
|
name: 'com.hahnpro.crm.deal',
|
|
20
20
|
},
|
|
21
21
|
};
|
|
22
|
+
exports.CRM_DEAL_REMINDER_SCHEMA_MARKER = 'com.hahnpro.crm.deal-reminder';
|
|
23
|
+
exports.CRM_DEAL_REMINDER_RULES = {
|
|
24
|
+
offer_sent: {
|
|
25
|
+
reminderType: 'offer_follow_up',
|
|
26
|
+
action: 'follow_up_offer',
|
|
27
|
+
businessDays: 5,
|
|
28
|
+
description: 'Beim Kunden zum versendeten Angebot nachfassen.',
|
|
29
|
+
},
|
|
30
|
+
order_placed: {
|
|
31
|
+
reminderType: 'order_receipt',
|
|
32
|
+
action: 'check_order_and_project_transition',
|
|
33
|
+
businessDays: 3,
|
|
34
|
+
description: 'Prüfen, ob Auftrag oder Vertrag eingegangen ist, und den Deal gegebenenfalls in Richtung Projekt/Kickoff weiterführen.',
|
|
35
|
+
},
|
|
36
|
+
up_cross_selling: {
|
|
37
|
+
reminderType: 'follow_up_potential',
|
|
38
|
+
action: 'review_follow_up_deal',
|
|
39
|
+
businessDays: 14,
|
|
40
|
+
description: 'Das weitere Up-/Cross-Selling-Potenzial prüfen und entscheiden, ob ein neuer Deal angelegt werden soll.',
|
|
41
|
+
},
|
|
42
|
+
};
|
|
22
43
|
exports.CRM_ASSET_TYPE_IDS = {
|
|
23
44
|
company: exports.CRM_ASSET_TYPES.company.id,
|
|
24
45
|
contact: exports.CRM_ASSET_TYPES.contact.id,
|
|
@@ -157,6 +157,13 @@ export interface CrmMergeContactDuplicatesResponse {
|
|
|
157
157
|
primaryEmail?: string;
|
|
158
158
|
keptEmails: string[];
|
|
159
159
|
}
|
|
160
|
+
export interface SendDealReminderPayload {
|
|
161
|
+
taskId: string;
|
|
162
|
+
}
|
|
163
|
+
export interface CrmDealReminderDeliveryResult {
|
|
164
|
+
delivered: boolean;
|
|
165
|
+
reason?: 'task_missing' | 'not_crm_deal_reminder' | 'task_not_expired' | 'deal_missing' | 'reminder_no_longer_current' | 'reminder_not_due' | 'organization_mismatch' | 'invalid_reminder_context' | 'assignee_missing' | 'assignee_email_missing' | 'already_sent';
|
|
166
|
+
}
|
|
160
167
|
export interface MatchResult {
|
|
161
168
|
found: boolean;
|
|
162
169
|
assetId?: string;
|
|
@@ -6,7 +6,7 @@ export type { Audit } from './audit.interface';
|
|
|
6
6
|
export type { Author } from './author.interface';
|
|
7
7
|
export type { AzureBillingEvent, AzureBillingResult, Billing, BillingEvent, BillingResource, BillingSubscription, BillingValues, OnceBilledResources, RegularlyBilledResources, } from './billing.interface';
|
|
8
8
|
export type { Content, ContentAnalysis, ContentChange, ContentSearchResult, IndexingStatusData, ReindexStatusSsePayload, } from './content.interface';
|
|
9
|
-
export type { CompanyCandidate, ContactCandidate, CrmContactMergeOverrides, CrmDuplicateEntityType, CrmDuplicateGroup, CrmDuplicateGroupStatus, CrmDuplicateMember, CrmDuplicateReasonCode, CrmEmailMerge, CrmGetContactDuplicatesResponse, CrmGetDuplicatesQuery, CrmGetDuplicatesResponse, CrmImportContactDuplicateDetails, CrmImportContactDuplicateMemberDetails, CrmImportDuplicateDecision, CrmImportDuplicateEntityType, CrmImportDuplicateGroup, CrmImportDuplicateMember, CrmImportDuplicateReasonCode, CrmImportJsonRequest, CrmImportParser, CrmImportResponse, CrmMergeContactDuplicatesRequest, CrmMergeContactDuplicatesResponse, ImportResult, ImportResultStats, MatchResult, MeetingReport, ReportActivity, ReportParticipant, ReportSummary, TouchpointCandidate, } from './crm.interface';
|
|
9
|
+
export type { CompanyCandidate, ContactCandidate, CrmDealReminderDeliveryResult, CrmContactMergeOverrides, CrmDuplicateEntityType, CrmDuplicateGroup, CrmDuplicateGroupStatus, CrmDuplicateMember, CrmDuplicateReasonCode, CrmEmailMerge, CrmGetContactDuplicatesResponse, CrmGetDuplicatesQuery, CrmGetDuplicatesResponse, CrmImportContactDuplicateDetails, CrmImportContactDuplicateMemberDetails, CrmImportDuplicateDecision, CrmImportDuplicateEntityType, CrmImportDuplicateGroup, CrmImportDuplicateMember, CrmImportDuplicateReasonCode, CrmImportJsonRequest, CrmImportParser, CrmImportResponse, CrmMergeContactDuplicatesRequest, CrmMergeContactDuplicatesResponse, ImportResult, ImportResultStats, MatchResult, MeetingReport, ReportActivity, ReportParticipant, ReportSummary, SendDealReminderPayload, TouchpointCandidate, } from './crm.interface';
|
|
10
10
|
export type { DataInterface, Filter, Paginated, RequestParameter } from './data.interface';
|
|
11
11
|
export type { DataspaceAllowedResourceType, DataspaceWorkflowResult, DataspaceWorkflowStatus, ShareInDataspaceDto, } from './dataspace.interface';
|
|
12
12
|
export type { EdgeDeviceRequestResponse, EdgeDeviceResult, WebIOData } from './edge-device.interface';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Config, CrmGetDuplicatesQuery, CrmGetDuplicatesResponse, CrmImportParser, CrmImportResponse, CrmMergeContactDuplicatesRequest, CrmMergeContactDuplicatesResponse, TokenOption } from '../interfaces';
|
|
1
|
+
import { Config, CrmDealReminderDeliveryResult, CrmGetDuplicatesQuery, CrmGetDuplicatesResponse, CrmImportParser, CrmImportResponse, CrmMergeContactDuplicatesRequest, CrmMergeContactDuplicatesResponse, SendDealReminderPayload, TokenOption } from '../interfaces';
|
|
2
2
|
import { CrmService } from '../services';
|
|
3
3
|
import { CrossPlatformFormData } from '../utils';
|
|
4
4
|
export declare class CrmMockService extends CrmService {
|
|
@@ -7,4 +7,5 @@ export declare class CrmMockService extends CrmService {
|
|
|
7
7
|
importJson(_csv: string, _parser?: CrmImportParser, _options?: TokenOption): Promise<CrmImportResponse>;
|
|
8
8
|
getDuplicates(_query?: CrmGetDuplicatesQuery, _options?: TokenOption): Promise<CrmGetDuplicatesResponse>;
|
|
9
9
|
mergeDuplicates(dto: CrmMergeContactDuplicatesRequest, _options?: TokenOption): Promise<CrmMergeContactDuplicatesResponse>;
|
|
10
|
+
sendDealReminder(_payload: SendDealReminderPayload, _options?: TokenOption): Promise<CrmDealReminderDeliveryResult>;
|
|
10
11
|
}
|
|
@@ -62,5 +62,10 @@ class CrmMockService extends services_1.CrmService {
|
|
|
62
62
|
keptEmails: dto.emailMerge?.keptEmails ?? [],
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
+
async sendDealReminder(_payload, _options = {}) {
|
|
66
|
+
return {
|
|
67
|
+
delivered: true,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
65
70
|
}
|
|
66
71
|
exports.CrmMockService = CrmMockService;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { APIBase } from '../api-base';
|
|
2
2
|
import { Config, TokenOption } from '../interfaces';
|
|
3
|
-
import { CrmGetDuplicatesQuery, CrmGetDuplicatesResponse, CrmImportParser, CrmImportResponse, CrmMergeContactDuplicatesRequest, CrmMergeContactDuplicatesResponse } from '../interfaces/crm.interface';
|
|
3
|
+
import { CrmDealReminderDeliveryResult, CrmGetDuplicatesQuery, CrmGetDuplicatesResponse, CrmImportParser, CrmImportResponse, CrmMergeContactDuplicatesRequest, CrmMergeContactDuplicatesResponse, SendDealReminderPayload } from '../interfaces/crm.interface';
|
|
4
4
|
import { CrossPlatformFormData } from '../utils';
|
|
5
5
|
import { HttpClientService } from './http-client.service';
|
|
6
6
|
export declare class CrmService extends APIBase {
|
|
@@ -9,4 +9,5 @@ export declare class CrmService extends APIBase {
|
|
|
9
9
|
importJson(csv: string, parser?: CrmImportParser, options?: TokenOption): Promise<CrmImportResponse>;
|
|
10
10
|
getDuplicates(query?: CrmGetDuplicatesQuery, options?: TokenOption): Promise<CrmGetDuplicatesResponse>;
|
|
11
11
|
mergeDuplicates(dto: CrmMergeContactDuplicatesRequest, options?: TokenOption): Promise<CrmMergeContactDuplicatesResponse>;
|
|
12
|
+
sendDealReminder(payload: SendDealReminderPayload, options?: TokenOption): Promise<CrmDealReminderDeliveryResult>;
|
|
12
13
|
}
|
|
@@ -26,5 +26,8 @@ class CrmService extends api_base_1.APIBase {
|
|
|
26
26
|
mergeDuplicates(dto, options = {}) {
|
|
27
27
|
return this.httpClient.post(`${this.basePath}/duplicates`, dto, options);
|
|
28
28
|
}
|
|
29
|
+
sendDealReminder(payload, options = {}) {
|
|
30
|
+
return this.httpClient.post(`${this.basePath}/deal-reminder/send`, payload, options);
|
|
31
|
+
}
|
|
29
32
|
}
|
|
30
33
|
exports.CrmService = CrmService;
|