@managemint-solutions/entities 1.25.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/tasks/dto/index.d.ts +9 -0
- package/dist/tasks/enum/index.d.ts +9 -0
- package/dist/tasks/enum/index.js +14 -0
- package/dist/tasks/index.d.ts +17 -0
- package/dist/users/index.d.ts +5 -0
- package/dist/users/permissions/dto/index.d.ts +4 -0
- package/package.json +1 -1
- package/dist/tasks/enum.ts/index.d.ts +0 -0
- package/dist/tasks/enum.ts/index.js +0 -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";
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
+
import { TaskLinkType } from "../enum";
|
|
1
2
|
export type TaskIdDto = {
|
|
2
3
|
taskId: string;
|
|
3
4
|
};
|
|
5
|
+
export type TaskLinkIdDto = {
|
|
6
|
+
taskId: string;
|
|
7
|
+
linkedTaskId: string;
|
|
8
|
+
};
|
|
9
|
+
export type AddTaskLinkDto = {
|
|
10
|
+
linked_task_id: string;
|
|
11
|
+
link_type: TaskLinkType;
|
|
12
|
+
};
|
|
4
13
|
export type GetTasksDto = {
|
|
5
14
|
search?: string | null;
|
|
6
15
|
page: number;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How one task is linked to another. A `child` link makes the linked task a subtask of the
|
|
3
|
+
* task it hangs off (a task has one parent at most); a `related` link has no direction and
|
|
4
|
+
* shows on both tasks.
|
|
5
|
+
*/
|
|
6
|
+
export declare enum TaskLinkType {
|
|
7
|
+
CHILD = "child",
|
|
8
|
+
RELATED = "related"
|
|
9
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TaskLinkType = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* How one task is linked to another. A `child` link makes the linked task a subtask of the
|
|
6
|
+
* task it hangs off (a task has one parent at most); a `related` link has no direction and
|
|
7
|
+
* shows on both tasks.
|
|
8
|
+
*/
|
|
9
|
+
var TaskLinkType;
|
|
10
|
+
(function (TaskLinkType) {
|
|
11
|
+
TaskLinkType["CHILD"] = "child";
|
|
12
|
+
TaskLinkType["RELATED"] = "related";
|
|
13
|
+
})(TaskLinkType || (exports.TaskLinkType = TaskLinkType = {}));
|
|
14
|
+
;
|
package/dist/tasks/index.d.ts
CHANGED
|
@@ -7,6 +7,17 @@ export type TaskIdentity = {
|
|
|
7
7
|
mms_id: string;
|
|
8
8
|
name: string;
|
|
9
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* A task as another task's link shows it: enough for a row with its reference, name, priority
|
|
12
|
+
* and status, and a click through to it.
|
|
13
|
+
*/
|
|
14
|
+
export type LinkedTask = {
|
|
15
|
+
mms_id: string;
|
|
16
|
+
task_number: number;
|
|
17
|
+
name: string;
|
|
18
|
+
status: StatusEntity | null;
|
|
19
|
+
priority: number;
|
|
20
|
+
};
|
|
10
21
|
export type TaskSummary = {
|
|
11
22
|
mms_id: string;
|
|
12
23
|
/** Sequential per organization, starting at 1; the human and integration-facing reference. */
|
|
@@ -39,6 +50,12 @@ export type TaskEntity = {
|
|
|
39
50
|
assigned_to: UserIdentity | null;
|
|
40
51
|
project: ProjectIdentity | null;
|
|
41
52
|
client: ClientIdentity | null;
|
|
53
|
+
/** The task this one is a subtask of; null when it has none. */
|
|
54
|
+
parent: LinkedTask | null;
|
|
55
|
+
/** The tasks linked to this one as its subtasks. */
|
|
56
|
+
subtasks: LinkedTask[];
|
|
57
|
+
/** The tasks linked to this one as related, whichever task the link was made from. */
|
|
58
|
+
related: LinkedTask[];
|
|
42
59
|
archived: boolean;
|
|
43
60
|
archived_at: Date | null;
|
|
44
61
|
archived_by: UserIdentity | null;
|
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
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|