@managemint-solutions/entities 1.26.0 → 1.27.0
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/dist/additional-details/enum/index.d.ts +1 -0
- package/dist/additional-details/enum/index.js +1 -0
- package/dist/audit-trail/enum/index.d.ts +1 -0
- package/dist/audit-trail/enum/index.js +1 -0
- package/dist/leads/dto/index.d.ts +32 -0
- package/dist/leads/dto/index.js +2 -0
- package/dist/leads/enum/index.d.ts +10 -0
- package/dist/leads/enum/index.js +15 -0
- package/dist/leads/index.d.ts +61 -0
- package/dist/leads/index.js +2 -0
- package/dist/notes/enum/index.d.ts +1 -0
- package/dist/notes/enum/index.js +1 -0
- package/dist/status/enum/index.d.ts +1 -0
- package/dist/status/enum/index.js +1 -0
- package/dist/status/index.d.ts +1 -0
- package/dist/supporting-files/enum/index.d.ts +1 -0
- package/dist/supporting-files/enum/index.js +1 -0
- package/dist/users/index.d.ts +5 -0
- package/dist/users/permissions/dto/index.d.ts +4 -0
- package/package.json +1 -1
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AdditionalDetailsTypes = exports.AdditionalDetailsEntityTypes = void 0;
|
|
4
4
|
var AdditionalDetailsEntityTypes;
|
|
5
5
|
(function (AdditionalDetailsEntityTypes) {
|
|
6
|
+
AdditionalDetailsEntityTypes["LEAD"] = "leads";
|
|
6
7
|
AdditionalDetailsEntityTypes["CLIENT"] = "clients";
|
|
7
8
|
AdditionalDetailsEntityTypes["PROJECT"] = "projects";
|
|
8
9
|
AdditionalDetailsEntityTypes["BUDGET_EXPENSE"] = "budget_expenses";
|
|
@@ -20,6 +20,7 @@ var AuditTrailEntityType;
|
|
|
20
20
|
AuditTrailEntityType["ADDITIONAL_DETAILS"] = "additional_details";
|
|
21
21
|
AuditTrailEntityType["SUPPORTING_FILES"] = "supporting_files";
|
|
22
22
|
AuditTrailEntityType["NOTES"] = "notes";
|
|
23
|
+
AuditTrailEntityType["LEADS"] = "leads";
|
|
23
24
|
AuditTrailEntityType["CLIENTS"] = "clients";
|
|
24
25
|
AuditTrailEntityType["PROJECTS"] = "projects";
|
|
25
26
|
AuditTrailEntityType["TASKS"] = "tasks";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { UUID } from "crypto";
|
|
2
|
+
import { LeadSource } from "../enum";
|
|
3
|
+
export type GetLeadsDto = {
|
|
4
|
+
search?: string | null;
|
|
5
|
+
page: number;
|
|
6
|
+
page_size: number;
|
|
7
|
+
created_after?: string | null;
|
|
8
|
+
created_before?: string | null;
|
|
9
|
+
status_id_in?: string | null;
|
|
10
|
+
assigned_to_id?: string | null;
|
|
11
|
+
completed?: boolean | null;
|
|
12
|
+
archive: boolean;
|
|
13
|
+
};
|
|
14
|
+
export type LeadIdDto = {
|
|
15
|
+
leadId: string;
|
|
16
|
+
};
|
|
17
|
+
export type CreateLeadDto = {
|
|
18
|
+
name: string;
|
|
19
|
+
contact_person?: string | null;
|
|
20
|
+
email?: string | null;
|
|
21
|
+
phone?: string | null;
|
|
22
|
+
status_id?: UUID | null;
|
|
23
|
+
assigned_to_id?: string | null;
|
|
24
|
+
source?: LeadSource | null;
|
|
25
|
+
estimated_value_minor?: number | null;
|
|
26
|
+
follow_up_date?: string | null;
|
|
27
|
+
lost_reason?: string | null;
|
|
28
|
+
};
|
|
29
|
+
export type UpdateLeadDto = CreateLeadDto;
|
|
30
|
+
export type ConvertLeadDto = {
|
|
31
|
+
client_status_id: string | null;
|
|
32
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Where a lead came from. Stored as plain text; the sdk DTO validates it against this list. */
|
|
2
|
+
export declare enum LeadSource {
|
|
3
|
+
REFERRAL = "referral",
|
|
4
|
+
WEBSITE = "website",
|
|
5
|
+
SOCIAL_MEDIA = "social_media",
|
|
6
|
+
EVENT = "event",
|
|
7
|
+
COLD_OUTREACH = "cold_outreach",
|
|
8
|
+
EXISTING_CLIENT = "existing_client",
|
|
9
|
+
OTHER = "other"
|
|
10
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LeadSource = void 0;
|
|
4
|
+
/** Where a lead came from. Stored as plain text; the sdk DTO validates it against this list. */
|
|
5
|
+
var LeadSource;
|
|
6
|
+
(function (LeadSource) {
|
|
7
|
+
LeadSource["REFERRAL"] = "referral";
|
|
8
|
+
LeadSource["WEBSITE"] = "website";
|
|
9
|
+
LeadSource["SOCIAL_MEDIA"] = "social_media";
|
|
10
|
+
LeadSource["EVENT"] = "event";
|
|
11
|
+
LeadSource["COLD_OUTREACH"] = "cold_outreach";
|
|
12
|
+
LeadSource["EXISTING_CLIENT"] = "existing_client";
|
|
13
|
+
LeadSource["OTHER"] = "other";
|
|
14
|
+
})(LeadSource || (exports.LeadSource = LeadSource = {}));
|
|
15
|
+
;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { UUID } from 'crypto';
|
|
2
|
+
import { ClientIdentity } from '../clients';
|
|
3
|
+
import { StatusEntity } from '../status';
|
|
4
|
+
import { UserIdentity } from '../users';
|
|
5
|
+
import { LeadSource } from './enum';
|
|
6
|
+
export type LeadIdentity = {
|
|
7
|
+
mms_id: UUID;
|
|
8
|
+
name: string;
|
|
9
|
+
};
|
|
10
|
+
export type LeadSummary = {
|
|
11
|
+
mms_id: UUID;
|
|
12
|
+
created_at: Date;
|
|
13
|
+
name: string;
|
|
14
|
+
/** The person at the business the lead is about; null when the lead is a person. */
|
|
15
|
+
contact_person: string | null;
|
|
16
|
+
email: string;
|
|
17
|
+
status: StatusEntity | null;
|
|
18
|
+
assigned_to: UserIdentity | null;
|
|
19
|
+
/** Minor units in the organization's currency; null when not estimated. */
|
|
20
|
+
estimated_value_minor: number | null;
|
|
21
|
+
/** A date (YYYY-MM-DD) to follow the lead up; null when none is set. */
|
|
22
|
+
follow_up_date: string | null;
|
|
23
|
+
created_by: UserIdentity;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* A prospective client. Converting it creates a client from its data, moves its notes,
|
|
27
|
+
* additional details and files to that client, moves the lead itself to the organization's Won
|
|
28
|
+
* status and sets `converted_client`. Won is reached only by converting - it cannot be created
|
|
29
|
+
* or set directly. The lead is not deleted, stays as a record of the deal, and the list hides
|
|
30
|
+
* Won leads by default.
|
|
31
|
+
*/
|
|
32
|
+
export type LeadEntity = {
|
|
33
|
+
mms_id: UUID;
|
|
34
|
+
created_at: Date;
|
|
35
|
+
name: string;
|
|
36
|
+
contact_person: string | null;
|
|
37
|
+
email: string;
|
|
38
|
+
phone: string;
|
|
39
|
+
status: StatusEntity | null;
|
|
40
|
+
assigned_to: UserIdentity | null;
|
|
41
|
+
source: LeadSource | null;
|
|
42
|
+
estimated_value_minor: number | null;
|
|
43
|
+
follow_up_date: string | null;
|
|
44
|
+
/** Why the lead was lost; set only while its status is a fail status. */
|
|
45
|
+
lost_reason: string | null;
|
|
46
|
+
converted_client: ClientIdentity | null;
|
|
47
|
+
converted_at: Date | null;
|
|
48
|
+
updated_at: Date | null;
|
|
49
|
+
last_updated_by: UserIdentity | null;
|
|
50
|
+
created_by: UserIdentity;
|
|
51
|
+
archived: boolean;
|
|
52
|
+
archived_at: Date | null;
|
|
53
|
+
archived_by: UserIdentity | null;
|
|
54
|
+
unarchived_at: Date | null;
|
|
55
|
+
unarchived_by: UserIdentity | null;
|
|
56
|
+
deleted: boolean;
|
|
57
|
+
deleted_at: Date | null;
|
|
58
|
+
deleted_by: UserIdentity | null;
|
|
59
|
+
restored_at: Date | null;
|
|
60
|
+
restored_by: UserIdentity | null;
|
|
61
|
+
};
|
package/dist/notes/enum/index.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.NotesEntityTypes = void 0;
|
|
4
4
|
var NotesEntityTypes;
|
|
5
5
|
(function (NotesEntityTypes) {
|
|
6
|
+
NotesEntityTypes["LEAD"] = "leads";
|
|
6
7
|
NotesEntityTypes["CLIENT"] = "clients";
|
|
7
8
|
NotesEntityTypes["PROJECT"] = "projects";
|
|
8
9
|
NotesEntityTypes["BUDGET_EXPENSE"] = "budget_expenses";
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.StatusEntityTypes = void 0;
|
|
4
4
|
var StatusEntityTypes;
|
|
5
5
|
(function (StatusEntityTypes) {
|
|
6
|
+
StatusEntityTypes["LEAD"] = "leads";
|
|
6
7
|
StatusEntityTypes["CLIENT"] = "clients";
|
|
7
8
|
StatusEntityTypes["PROJECT"] = "projects";
|
|
8
9
|
StatusEntityTypes["TASK"] = "tasks";
|
package/dist/status/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SupportingFilesExtensions = exports.SupportingFilesEntityTypes = void 0;
|
|
4
4
|
var SupportingFilesEntityTypes;
|
|
5
5
|
(function (SupportingFilesEntityTypes) {
|
|
6
|
+
SupportingFilesEntityTypes["LEAD"] = "leads";
|
|
6
7
|
SupportingFilesEntityTypes["CLIENT"] = "clients";
|
|
7
8
|
SupportingFilesEntityTypes["PROJECT"] = "projects";
|
|
8
9
|
SupportingFilesEntityTypes["BUDGET_EXPENSE"] = "budget_expenses";
|
package/dist/users/index.d.ts
CHANGED
|
@@ -63,6 +63,10 @@ export interface PermissionsEntity {
|
|
|
63
63
|
is_admin: boolean;
|
|
64
64
|
is_owner: boolean;
|
|
65
65
|
view_dashboard: boolean;
|
|
66
|
+
create_leads: boolean;
|
|
67
|
+
read_leads: boolean;
|
|
68
|
+
update_leads: boolean;
|
|
69
|
+
delete_leads: boolean;
|
|
66
70
|
create_clients: boolean;
|
|
67
71
|
read_clients: boolean;
|
|
68
72
|
update_clients: boolean;
|
|
@@ -135,6 +139,7 @@ export interface PermissionsEntity {
|
|
|
135
139
|
export interface Permissions {
|
|
136
140
|
permissions: {
|
|
137
141
|
dashboard: Omit<CrudPermission, 'create' | 'update' | 'delete'>;
|
|
142
|
+
leads: CrudPermission;
|
|
138
143
|
clients: CrudPermission;
|
|
139
144
|
projects: CrudPermission;
|
|
140
145
|
project_budgets: CrudPermission;
|
package/package.json
CHANGED