@voyantjs/crm 0.106.0 → 0.107.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/README.md +3 -3
- package/dist/booking-extension.d.ts +7 -7
- package/dist/booking-extension.d.ts.map +1 -1
- package/dist/booking-extension.js +8 -5
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/routes/activities.d.ts +2 -2
- package/dist/routes/custom-fields.d.ts +6 -6
- package/dist/routes/index.d.ts +518 -51
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/index.js +2 -2
- package/dist/routes/pipelines.d.ts +4 -4
- package/dist/routes/quote-versions.d.ts +746 -0
- package/dist/routes/quote-versions.d.ts.map +1 -0
- package/dist/routes/quote-versions.js +175 -0
- package/dist/routes/quotes.d.ts +161 -53
- package/dist/routes/quotes.d.ts.map +1 -1
- package/dist/routes/quotes.js +29 -11
- package/dist/schema-activities.d.ts +6 -6
- package/dist/schema-relations.d.ts +19 -18
- package/dist/schema-relations.d.ts.map +1 -1
- package/dist/schema-relations.js +38 -31
- package/dist/schema-sales.d.ts +206 -87
- package/dist/schema-sales.d.ts.map +1 -1
- package/dist/schema-sales.js +62 -50
- package/dist/schema-shared.d.ts +3 -3
- package/dist/schema-shared.d.ts.map +1 -1
- package/dist/schema-shared.js +5 -16
- package/dist/schema-signals.d.ts +1 -1
- package/dist/schema-signals.js +1 -1
- package/dist/service/accounts-merge.js +10 -10
- package/dist/service/accounts-people.js +1 -1
- package/dist/service/accounts-shared.d.ts +4 -1
- package/dist/service/accounts-shared.d.ts.map +1 -1
- package/dist/service/accounts-shared.js +20 -6
- package/dist/service/activities.d.ts +6 -6
- package/dist/service/custom-fields.d.ts +6 -6
- package/dist/service/index.d.ts +338 -139
- package/dist/service/index.d.ts.map +1 -1
- package/dist/service/index.js +2 -2
- package/dist/service/pipelines.d.ts +4 -4
- package/dist/service/quote-versions.d.ts +674 -0
- package/dist/service/quote-versions.d.ts.map +1 -0
- package/dist/service/quote-versions.js +399 -0
- package/dist/service/quotes.d.ts +426 -94
- package/dist/service/quotes.d.ts.map +1 -1
- package/dist/service/quotes.js +63 -22
- package/package.json +7 -7
- package/dist/routes/opportunities.d.ts +0 -387
- package/dist/routes/opportunities.d.ts.map +0 -1
- package/dist/routes/opportunities.js +0 -70
- package/dist/service/opportunities.d.ts +0 -822
- package/dist/service/opportunities.d.ts.map +0 -1
- package/dist/service/opportunities.js +0 -117
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @voyantjs/crm
|
|
2
2
|
|
|
3
|
-
CRM module for Voyant. People and organizations are the canonical person/company entities across the workspace. Includes pipelines,
|
|
3
|
+
CRM module for Voyant. People and organizations are the canonical person/company entities across the workspace. Includes pipelines, Quotes, Quote Versions, activities, custom fields, notes, communications, segments, and CSV import/export.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
@@ -25,8 +25,8 @@ const app = createApp({
|
|
|
25
25
|
- **People** (`pers`) — canonical person record; syncs inline contact fields (email, phone, website) to `identity` module, while addresses are managed as dedicated identity address resources
|
|
26
26
|
- **Organizations** (`org`) — canonical company record
|
|
27
27
|
- **Pipelines** + **Stages** (`pipe`, `stg`) — sales funnels
|
|
28
|
-
- **
|
|
29
|
-
- **
|
|
28
|
+
- **Quotes** (`quot`, `qprt`, `qprd`) — sales artifacts attached to people/orgs
|
|
29
|
+
- **Quote Versions** + **Quote Version lines** (`qver`, `qtln`)
|
|
30
30
|
- **Activities** (`act`, `actl`, `actp`) — tasks, calls, meetings, emails
|
|
31
31
|
- **Custom fields** (`cfdf`, `cfvl`)
|
|
32
32
|
- **Notes** — person (`pnot`), organization (`onot`)
|
|
@@ -22,8 +22,8 @@ export declare const bookingCrmDetails: import("drizzle-orm/pg-core").PgTableWit
|
|
|
22
22
|
identity: undefined;
|
|
23
23
|
generated: undefined;
|
|
24
24
|
}, {}, {}>;
|
|
25
|
-
|
|
26
|
-
name: "
|
|
25
|
+
quoteId: import("drizzle-orm/pg-core").PgColumn<{
|
|
26
|
+
name: "quote_id";
|
|
27
27
|
tableName: "booking_crm_details";
|
|
28
28
|
dataType: "string";
|
|
29
29
|
columnType: "PgText";
|
|
@@ -39,8 +39,8 @@ export declare const bookingCrmDetails: import("drizzle-orm/pg-core").PgTableWit
|
|
|
39
39
|
identity: undefined;
|
|
40
40
|
generated: undefined;
|
|
41
41
|
}, {}, {}>;
|
|
42
|
-
|
|
43
|
-
name: "
|
|
42
|
+
quoteVersionId: import("drizzle-orm/pg-core").PgColumn<{
|
|
43
|
+
name: "quote_version_id";
|
|
44
44
|
tableName: "booking_crm_details";
|
|
45
45
|
dataType: "string";
|
|
46
46
|
columnType: "PgText";
|
|
@@ -96,14 +96,14 @@ export declare const bookingCrmDetails: import("drizzle-orm/pg-core").PgTableWit
|
|
|
96
96
|
export type BookingCrmDetail = typeof bookingCrmDetails.$inferSelect;
|
|
97
97
|
export type NewBookingCrmDetail = typeof bookingCrmDetails.$inferInsert;
|
|
98
98
|
declare const bookingCrmDetailSchema: z.ZodObject<{
|
|
99
|
-
opportunityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
100
99
|
quoteId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
100
|
+
quoteVersionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
101
101
|
}, z.core.$strip>;
|
|
102
102
|
export declare const bookingCrmExtensionService: {
|
|
103
103
|
get(db: PostgresJsDatabase, bookingId: string): Promise<{
|
|
104
104
|
bookingId: string;
|
|
105
|
-
opportunityId: string | null;
|
|
106
105
|
quoteId: string | null;
|
|
106
|
+
quoteVersionId: string | null;
|
|
107
107
|
createdAt: Date;
|
|
108
108
|
updatedAt: Date;
|
|
109
109
|
} | null>;
|
|
@@ -111,8 +111,8 @@ export declare const bookingCrmExtensionService: {
|
|
|
111
111
|
createdAt: Date;
|
|
112
112
|
updatedAt: Date;
|
|
113
113
|
bookingId: string;
|
|
114
|
-
opportunityId: string | null;
|
|
115
114
|
quoteId: string | null;
|
|
115
|
+
quoteVersionId: string | null;
|
|
116
116
|
} | null>;
|
|
117
117
|
remove(db: PostgresJsDatabase, bookingId: string): Promise<{
|
|
118
118
|
bookingId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"booking-extension.d.ts","sourceRoot":"","sources":["../src/booking-extension.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAG1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAEjE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"booking-extension.d.ts","sourceRoot":"","sources":["../src/booking-extension.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAG1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAEjE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAa7B,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG,OAAO,iBAAiB,CAAC,YAAY,CAAA;AACpE,MAAM,MAAM,mBAAmB,GAAG,OAAO,iBAAiB,CAAC,YAAY,CAAA;AAIvE,QAAA,MAAM,sBAAsB;;;iBAG1B,CAAA;AAIF,eAAO,MAAM,0BAA0B;YACvB,kBAAkB,aAAa,MAAM;;;;;;;eAU7C,kBAAkB,aACX,MAAM,QACX,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC;;;;;;;eAqB7B,kBAAkB,aAAa,MAAM;;;CAOvD,CAAA;AA0CD,eAAO,MAAM,mBAAmB,EAAE,aAGjC,CAAA"}
|
|
@@ -6,15 +6,18 @@ import { z } from "zod";
|
|
|
6
6
|
// ---------- schema ----------
|
|
7
7
|
export const bookingCrmDetails = pgTable("booking_crm_details", {
|
|
8
8
|
bookingId: text("booking_id").primaryKey(),
|
|
9
|
-
opportunityId: text("opportunity_id"),
|
|
10
9
|
quoteId: text("quote_id"),
|
|
10
|
+
quoteVersionId: text("quote_version_id"),
|
|
11
11
|
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
12
12
|
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
|
13
|
-
}, (t) => [
|
|
13
|
+
}, (t) => [
|
|
14
|
+
index("idx_bcd_quote").on(t.quoteId),
|
|
15
|
+
index("idx_bcd_quote_version").on(t.quoteVersionId),
|
|
16
|
+
]);
|
|
14
17
|
// ---------- validation ----------
|
|
15
18
|
const bookingCrmDetailSchema = z.object({
|
|
16
|
-
opportunityId: z.string().optional().nullable(),
|
|
17
19
|
quoteId: z.string().optional().nullable(),
|
|
20
|
+
quoteVersionId: z.string().optional().nullable(),
|
|
18
21
|
});
|
|
19
22
|
// ---------- service ----------
|
|
20
23
|
export const bookingCrmExtensionService = {
|
|
@@ -31,14 +34,14 @@ export const bookingCrmExtensionService = {
|
|
|
31
34
|
.insert(bookingCrmDetails)
|
|
32
35
|
.values({
|
|
33
36
|
bookingId,
|
|
34
|
-
opportunityId: data.opportunityId ?? null,
|
|
35
37
|
quoteId: data.quoteId ?? null,
|
|
38
|
+
quoteVersionId: data.quoteVersionId ?? null,
|
|
36
39
|
})
|
|
37
40
|
.onConflictDoUpdate({
|
|
38
41
|
target: bookingCrmDetails.bookingId,
|
|
39
42
|
set: {
|
|
40
|
-
opportunityId: data.opportunityId ?? null,
|
|
41
43
|
quoteId: data.quoteId ?? null,
|
|
44
|
+
quoteVersionId: data.quoteVersionId ?? null,
|
|
42
45
|
updatedAt: new Date(),
|
|
43
46
|
},
|
|
44
47
|
})
|
package/dist/index.d.ts
CHANGED
|
@@ -22,14 +22,16 @@ export { crmBookingExtension } from "./booking-extension.js";
|
|
|
22
22
|
export type { CustomerSignalCreatedEvent, CustomerSignalCreatedIntake } from "./events.js";
|
|
23
23
|
export type { CrmRouteRuntime, CrmRouteRuntimeOptions, ResolveCrmKmsProvider, } from "./route-runtime.js";
|
|
24
24
|
export { buildCrmRouteRuntime, CRM_ROUTE_RUNTIME_CONTAINER_KEY, } from "./route-runtime.js";
|
|
25
|
-
export type { Activity, ActivityLink, ActivityParticipant, CommunicationLogEntry, CustomerSignal, CustomFieldDefinition, CustomFieldValue, NewActivity, NewActivityLink, NewActivityParticipant, NewCommunicationLogEntry, NewCustomerSignal, NewCustomFieldDefinition, NewCustomFieldValue,
|
|
26
|
-
export { activities, activityLinks, activityParticipants, communicationLog, customerSignalKindEnum, customerSignalSourceEnum, customerSignalStatusEnum, customerSignals, customFieldDefinitions, customFieldValues,
|
|
25
|
+
export type { Activity, ActivityLink, ActivityParticipant, CommunicationLogEntry, CustomerSignal, CustomFieldDefinition, CustomFieldValue, NewActivity, NewActivityLink, NewActivityParticipant, NewCommunicationLogEntry, NewCustomerSignal, NewCustomFieldDefinition, NewCustomFieldValue, NewOrganization, NewOrganizationNote, NewPerson, NewPersonDocument, NewPersonNote, NewPersonRelationship, NewPipeline, NewQuote, NewQuoteParticipant, NewQuoteProduct, NewQuoteVersion, NewQuoteVersionLine, NewSegment, NewSegmentMember, NewStage, Organization, OrganizationNote, Person, PersonDocument, PersonNote, PersonRelationship, Pipeline, Quote, QuoteParticipant, QuoteProduct, QuoteVersion, QuoteVersionLine, Segment, SegmentMember, Stage, } from "./schema.js";
|
|
26
|
+
export { activities, activityLinks, activityParticipants, communicationLog, customerSignalKindEnum, customerSignalSourceEnum, customerSignalStatusEnum, customerSignals, customFieldDefinitions, customFieldValues, organizationNotes, organizations, people, personDocuments, personDocumentTypeEnum, personNotes, personRelationshipKindEnum, personRelationships, pipelines, quoteParticipants, quoteProducts, quotes, quoteVersionLines, quoteVersions, segmentMembers, segments, stages, } from "./schema.js";
|
|
27
27
|
export type { CreateCustomerSignalInput, CustomerSignalListQuery, UpdateCustomerSignalInput, } from "./service/customer-signals.js";
|
|
28
28
|
export { customerSignalsService } from "./service/customer-signals.js";
|
|
29
29
|
export type { CreatePersonDocumentInput, PersonDocumentListQuery, PersonDocumentType, PersonTravelSnapshot, UpdatePersonDocumentInput, } from "./service/person-documents.js";
|
|
30
30
|
export { personDocumentNumberPlaintextSchema, personDocumentsService, personPiiBlobPlaintextSchema, } from "./service/person-documents.js";
|
|
31
31
|
export type { CreatePersonRelationshipInput, PersonRelationshipKind, PersonRelationshipListQuery, UpdatePersonRelationshipInput, } from "./service/person-relationships.js";
|
|
32
32
|
export { personRelationshipsService } from "./service/person-relationships.js";
|
|
33
|
-
export {
|
|
33
|
+
export type { AcceptQuoteVersionResult } from "./service/quote-versions.js";
|
|
34
|
+
export { QuoteVersionConflictError } from "./service/quote-versions.js";
|
|
35
|
+
export { acceptQuoteVersionSchema, activityListQuerySchema, applyTripSnapshotQuoteVersionLineSchema, applyTripSnapshotToQuoteVersionSchema, communicationChannelSchema, communicationDirectionSchema, communicationListQuerySchema, customerSignalKindSchema, customerSignalListQuerySchema, customerSignalPrioritySchema, customerSignalSourceSchema, customerSignalStatusSchema, customFieldDefinitionListQuerySchema, customFieldValueListQuerySchema, declineQuoteVersionSchema, expireQuoteVersionsSchema, insertActivityLinkSchema, insertActivityParticipantSchema, insertActivitySchema, insertCommunicationLogSchema, insertCustomerSignalSchema, insertCustomFieldDefinitionSchema, insertOrganizationNoteSchema, insertOrganizationSchema, insertPersonDocumentFromPlaintextSchema, insertPersonDocumentSchema, insertPersonNoteSchema, insertPersonRelationshipSchema, insertPersonSchema, insertPipelineSchema, insertQuoteParticipantSchema, insertQuoteProductSchema, insertQuoteSchema, insertQuoteVersionLineSchema, insertQuoteVersionSchema, insertSegmentSchema, insertStageSchema, organizationListQuerySchema, personDocumentListQuerySchema, personDocumentTypeSchema, personListQuerySchema, personRelationshipKindSchema, personRelationshipListQuerySchema, pipelineListQuerySchema, quoteListQuerySchema, quoteVersionListQuerySchema, relationTypeSchema, resolveCustomerSignalSchema, sendQuoteVersionSchema, stageListQuerySchema, updateActivitySchema, updateCustomerSignalSchema, updateCustomFieldDefinitionSchema, updateOrganizationSchema, updatePersonDocumentFromPlaintextSchema, updatePersonDocumentSchema, updatePersonProfilePiiSchema, updatePersonRelationshipSchema, updatePersonSchema, updatePipelineSchema, updateQuoteProductSchema, updateQuoteSchema, updateQuoteVersionLineSchema, updateQuoteVersionSchema, updateStageSchema, upsertCustomFieldValueSchema, } from "./validation.js";
|
|
34
36
|
export { CUSTOMER_SIGNAL_CREATED_EVENT, crmService, emitCustomerSignalCreated };
|
|
35
37
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EAAE,6BAA6B,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AACtF,OAAO,EAGL,KAAK,sBAAsB,EAC5B,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAE/C,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAElD,eAAO,MAAM,cAAc,EAAE,kBAK5B,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,kBAKlC,CAAA;AAED,eAAO,MAAM,SAAS,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,EAC5B,wBAAwB,EACxB,iBAAiB,EACjB,4BAA4B,EAC5B,wBAAwB,EACxB,mBAAmB,EACnB,iBAAiB,EACjB,2BAA2B,EAC3B,6BAA6B,EAC7B,wBAAwB,EACxB,qBAAqB,EACrB,4BAA4B,EAC5B,iCAAiC,EACjC,uBAAuB,EACvB,oBAAoB,EACpB,2BAA2B,EAC3B,kBAAkB,EAClB,2BAA2B,EAC3B,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,EACpB,0BAA0B,EAC1B,iCAAiC,EACjC,wBAAwB,EACxB,uCAAuC,EACvC,0BAA0B,EAC1B,4BAA4B,EAC5B,8BAA8B,EAC9B,kBAAkB,EAClB,oBAAoB,EACpB,wBAAwB,EACxB,iBAAiB,EACjB,4BAA4B,EAC5B,wBAAwB,EACxB,iBAAiB,EACjB,4BAA4B,GAC7B,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,6BAA6B,EAAE,UAAU,EAAE,yBAAyB,EAAE,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -44,9 +44,10 @@ export function createCrmHonoModule(options = {}) {
|
|
|
44
44
|
export const crmHonoModule = createCrmHonoModule();
|
|
45
45
|
export { crmBookingExtension } from "./booking-extension.js";
|
|
46
46
|
export { buildCrmRouteRuntime, CRM_ROUTE_RUNTIME_CONTAINER_KEY, } from "./route-runtime.js";
|
|
47
|
-
export { activities, activityLinks, activityParticipants, communicationLog, customerSignalKindEnum, customerSignalSourceEnum, customerSignalStatusEnum, customerSignals, customFieldDefinitions, customFieldValues,
|
|
47
|
+
export { activities, activityLinks, activityParticipants, communicationLog, customerSignalKindEnum, customerSignalSourceEnum, customerSignalStatusEnum, customerSignals, customFieldDefinitions, customFieldValues, organizationNotes, organizations, people, personDocuments, personDocumentTypeEnum, personNotes, personRelationshipKindEnum, personRelationships, pipelines, quoteParticipants, quoteProducts, quotes, quoteVersionLines, quoteVersions, segmentMembers, segments, stages, } from "./schema.js";
|
|
48
48
|
export { customerSignalsService } from "./service/customer-signals.js";
|
|
49
49
|
export { personDocumentNumberPlaintextSchema, personDocumentsService, personPiiBlobPlaintextSchema, } from "./service/person-documents.js";
|
|
50
50
|
export { personRelationshipsService } from "./service/person-relationships.js";
|
|
51
|
-
export {
|
|
51
|
+
export { QuoteVersionConflictError } from "./service/quote-versions.js";
|
|
52
|
+
export { acceptQuoteVersionSchema, activityListQuerySchema, applyTripSnapshotQuoteVersionLineSchema, applyTripSnapshotToQuoteVersionSchema, communicationChannelSchema, communicationDirectionSchema, communicationListQuerySchema, customerSignalKindSchema, customerSignalListQuerySchema, customerSignalPrioritySchema, customerSignalSourceSchema, customerSignalStatusSchema, customFieldDefinitionListQuerySchema, customFieldValueListQuerySchema, declineQuoteVersionSchema, expireQuoteVersionsSchema, insertActivityLinkSchema, insertActivityParticipantSchema, insertActivitySchema, insertCommunicationLogSchema, insertCustomerSignalSchema, insertCustomFieldDefinitionSchema, insertOrganizationNoteSchema, insertOrganizationSchema, insertPersonDocumentFromPlaintextSchema, insertPersonDocumentSchema, insertPersonNoteSchema, insertPersonRelationshipSchema, insertPersonSchema, insertPipelineSchema, insertQuoteParticipantSchema, insertQuoteProductSchema, insertQuoteSchema, insertQuoteVersionLineSchema, insertQuoteVersionSchema, insertSegmentSchema, insertStageSchema, organizationListQuerySchema, personDocumentListQuerySchema, personDocumentTypeSchema, personListQuerySchema, personRelationshipKindSchema, personRelationshipListQuerySchema, pipelineListQuerySchema, quoteListQuerySchema, quoteVersionListQuerySchema, relationTypeSchema, resolveCustomerSignalSchema, sendQuoteVersionSchema, stageListQuerySchema, updateActivitySchema, updateCustomerSignalSchema, updateCustomFieldDefinitionSchema, updateOrganizationSchema, updatePersonDocumentFromPlaintextSchema, updatePersonDocumentSchema, updatePersonProfilePiiSchema, updatePersonRelationshipSchema, updatePersonSchema, updatePipelineSchema, updateQuoteProductSchema, updateQuoteSchema, updateQuoteVersionLineSchema, updateQuoteVersionSchema, updateStageSchema, upsertCustomFieldValueSchema, } from "./validation.js";
|
|
52
53
|
export { CUSTOMER_SIGNAL_CREATED_EVENT, crmService, emitCustomerSignalCreated };
|
|
@@ -168,7 +168,7 @@ export declare const activityRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
168
168
|
data: {
|
|
169
169
|
id: string;
|
|
170
170
|
activityId: string;
|
|
171
|
-
entityType: "organization" | "person" | "
|
|
171
|
+
entityType: "organization" | "person" | "quote" | "activity";
|
|
172
172
|
entityId: string;
|
|
173
173
|
role: "primary" | "related";
|
|
174
174
|
createdAt: string;
|
|
@@ -191,7 +191,7 @@ export declare const activityRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
191
191
|
id: string;
|
|
192
192
|
createdAt: string;
|
|
193
193
|
role: "primary" | "related";
|
|
194
|
-
entityType: "organization" | "person" | "
|
|
194
|
+
entityType: "organization" | "person" | "quote" | "activity";
|
|
195
195
|
entityId: string;
|
|
196
196
|
activityId: string;
|
|
197
197
|
} | undefined;
|
|
@@ -12,7 +12,7 @@ export declare const customFieldRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
12
12
|
output: {
|
|
13
13
|
data: {
|
|
14
14
|
id: string;
|
|
15
|
-
entityType: "organization" | "person" | "
|
|
15
|
+
entityType: "organization" | "person" | "quote" | "activity";
|
|
16
16
|
key: string;
|
|
17
17
|
label: string;
|
|
18
18
|
fieldType: "boolean" | "json" | "date" | "text" | "set" | "enum" | "phone" | "varchar" | "double" | "monetary" | "address";
|
|
@@ -47,7 +47,7 @@ export declare const customFieldRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
47
47
|
createdAt: string;
|
|
48
48
|
key: string;
|
|
49
49
|
updatedAt: string;
|
|
50
|
-
entityType: "organization" | "person" | "
|
|
50
|
+
entityType: "organization" | "person" | "quote" | "activity";
|
|
51
51
|
label: string;
|
|
52
52
|
fieldType: "boolean" | "json" | "date" | "text" | "set" | "enum" | "phone" | "varchar" | "double" | "monetary" | "address";
|
|
53
53
|
isRequired: boolean;
|
|
@@ -80,7 +80,7 @@ export declare const customFieldRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
80
80
|
output: {
|
|
81
81
|
data: {
|
|
82
82
|
id: string;
|
|
83
|
-
entityType: "organization" | "person" | "
|
|
83
|
+
entityType: "organization" | "person" | "quote" | "activity";
|
|
84
84
|
key: string;
|
|
85
85
|
label: string;
|
|
86
86
|
fieldType: "boolean" | "json" | "date" | "text" | "set" | "enum" | "phone" | "varchar" | "double" | "monetary" | "address";
|
|
@@ -120,7 +120,7 @@ export declare const customFieldRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
120
120
|
output: {
|
|
121
121
|
data: {
|
|
122
122
|
id: string;
|
|
123
|
-
entityType: "organization" | "person" | "
|
|
123
|
+
entityType: "organization" | "person" | "quote" | "activity";
|
|
124
124
|
key: string;
|
|
125
125
|
label: string;
|
|
126
126
|
fieldType: "boolean" | "json" | "date" | "text" | "set" | "enum" | "phone" | "varchar" | "double" | "monetary" | "address";
|
|
@@ -172,7 +172,7 @@ export declare const customFieldRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
172
172
|
data: {
|
|
173
173
|
id: string;
|
|
174
174
|
definitionId: string;
|
|
175
|
-
entityType: "organization" | "person" | "
|
|
175
|
+
entityType: "organization" | "person" | "quote" | "activity";
|
|
176
176
|
entityId: string;
|
|
177
177
|
textValue: string | null;
|
|
178
178
|
numberValue: number | null;
|
|
@@ -207,7 +207,7 @@ export declare const customFieldRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
207
207
|
id: string;
|
|
208
208
|
createdAt: string;
|
|
209
209
|
updatedAt: string;
|
|
210
|
-
entityType: "organization" | "person" | "
|
|
210
|
+
entityType: "organization" | "person" | "quote" | "activity";
|
|
211
211
|
entityId: string;
|
|
212
212
|
definitionId: string;
|
|
213
213
|
textValue: string | null;
|