@voyantjs/crm-react 0.26.3 → 0.26.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/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +3 -0
- package/dist/hooks/use-customer-signal-mutation.d.ts +89 -0
- package/dist/hooks/use-customer-signal-mutation.d.ts.map +1 -0
- package/dist/hooks/use-customer-signal-mutation.js +66 -0
- package/dist/hooks/use-customer-signal.d.ts +23 -0
- package/dist/hooks/use-customer-signal.d.ts.map +1 -0
- package/dist/hooks/use-customer-signal.js +20 -0
- package/dist/hooks/use-customer-signals.d.ts +55 -0
- package/dist/hooks/use-customer-signals.d.ts.map +1 -0
- package/dist/hooks/use-customer-signals.js +50 -0
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/query-keys.d.ts +14 -0
- package/dist/query-keys.d.ts.map +1 -1
- package/dist/query-keys.js +4 -0
- package/dist/schemas.d.ts +192 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +45 -0
- package/package.json +5 -5
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
export { type UseCustomerSignalOptions, useCustomerSignal, } from "./use-customer-signal.js";
|
|
2
|
+
export { type CreateCustomerSignalInput, type CustomerSignalPriority, type UpdateCustomerSignalInput, useCustomerSignalMutation, } from "./use-customer-signal-mutation.js";
|
|
3
|
+
export { type UseCustomerSignalsForPersonOptions, type UseCustomerSignalsOptions, useCustomerSignals, useCustomerSignalsForPerson, } from "./use-customer-signals.js";
|
|
1
4
|
export { useOrganization } from "./use-organization.js";
|
|
2
5
|
export { type CreateOrganizationInput, type UpdateOrganizationInput, useOrganizationMutation, } from "./use-organization-mutation.js";
|
|
3
6
|
export { type UseOrganizationsOptions, useOrganizations } from "./use-organizations.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,uBAAuB,GACxB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,KAAK,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACvF,OAAO,EAAE,KAAK,gBAAgB,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAClE,OAAO,EAAE,KAAK,gBAAgB,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAClE,OAAO,EACL,KAAK,sCAAsC,EAC3C,KAAK,yBAAyB,EAC9B,KAAK,sCAAsC,EAC3C,KAAK,yBAAyB,EAC9B,yBAAyB,GAC1B,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EACL,KAAK,yBAAyB,EAC9B,kBAAkB,GACnB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,2BAA2B,EAChC,iBAAiB,GAClB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EACL,KAAK,6BAA6B,EAClC,KAAK,6BAA6B,EAClC,6BAA6B,GAC9B,MAAM,uCAAuC,CAAA;AAC9C,OAAO,EACL,KAAK,6BAA6B,EAClC,sBAAsB,GACvB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EACL,KAAK,8BAA8B,EACnC,uBAAuB,GACxB,MAAM,iCAAiC,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,iBAAiB,GAClB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,yBAAyB,GAC1B,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EACL,KAAK,kCAAkC,EACvC,KAAK,yBAAyB,EAC9B,kBAAkB,EAClB,2BAA2B,GAC5B,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,uBAAuB,GACxB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,KAAK,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACvF,OAAO,EAAE,KAAK,gBAAgB,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAClE,OAAO,EAAE,KAAK,gBAAgB,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAClE,OAAO,EACL,KAAK,sCAAsC,EAC3C,KAAK,yBAAyB,EAC9B,KAAK,sCAAsC,EAC3C,KAAK,yBAAyB,EAC9B,yBAAyB,GAC1B,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EACL,KAAK,yBAAyB,EAC9B,kBAAkB,GACnB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,2BAA2B,EAChC,iBAAiB,GAClB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EACL,KAAK,6BAA6B,EAClC,KAAK,6BAA6B,EAClC,6BAA6B,GAC9B,MAAM,uCAAuC,CAAA;AAC9C,OAAO,EACL,KAAK,6BAA6B,EAClC,sBAAsB,GACvB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EACL,KAAK,8BAA8B,EACnC,uBAAuB,GACxB,MAAM,iCAAiC,CAAA"}
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
export { useCustomerSignal, } from "./use-customer-signal.js";
|
|
2
|
+
export { useCustomerSignalMutation, } from "./use-customer-signal-mutation.js";
|
|
3
|
+
export { useCustomerSignals, useCustomerSignalsForPerson, } from "./use-customer-signals.js";
|
|
1
4
|
export { useOrganization } from "./use-organization.js";
|
|
2
5
|
export { useOrganizationMutation, } from "./use-organization-mutation.js";
|
|
3
6
|
export { useOrganizations } from "./use-organizations.js";
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { type CustomerSignalKind, type CustomerSignalSource, type CustomerSignalStatus } from "../schemas.js";
|
|
2
|
+
export type CustomerSignalPriority = "low" | "normal" | "high" | "urgent";
|
|
3
|
+
export interface CreateCustomerSignalInput {
|
|
4
|
+
personId: string;
|
|
5
|
+
kind: CustomerSignalKind;
|
|
6
|
+
source: CustomerSignalSource;
|
|
7
|
+
productId?: string | null;
|
|
8
|
+
optionUnitId?: string | null;
|
|
9
|
+
status?: CustomerSignalStatus;
|
|
10
|
+
priority?: CustomerSignalPriority;
|
|
11
|
+
notes?: string | null;
|
|
12
|
+
tags?: string[];
|
|
13
|
+
assignedToUserId?: string | null;
|
|
14
|
+
/** ISO datetime string. */
|
|
15
|
+
followUpAt?: string | null;
|
|
16
|
+
resolvedBookingId?: string | null;
|
|
17
|
+
sourceSubmissionId?: string | null;
|
|
18
|
+
metadata?: Record<string, unknown> | null;
|
|
19
|
+
}
|
|
20
|
+
export type UpdateCustomerSignalInput = Partial<Omit<CreateCustomerSignalInput, "personId">>;
|
|
21
|
+
export declare function useCustomerSignalMutation(): {
|
|
22
|
+
create: import("@tanstack/react-query").UseMutationResult<{
|
|
23
|
+
id: string;
|
|
24
|
+
personId: string;
|
|
25
|
+
productId: string | null;
|
|
26
|
+
optionUnitId: string | null;
|
|
27
|
+
kind: "wishlist" | "notify" | "inquiry" | "request_offer" | "referral";
|
|
28
|
+
source: "phone" | "website" | "form" | "admin" | "abandoned_cart" | "booking";
|
|
29
|
+
status: "new" | "contacted" | "qualified" | "converted" | "lost" | "expired";
|
|
30
|
+
priority: string;
|
|
31
|
+
notes: string | null;
|
|
32
|
+
tags: string[];
|
|
33
|
+
assignedToUserId: string | null;
|
|
34
|
+
followUpAt: string | null;
|
|
35
|
+
resolvedBookingId: string | null;
|
|
36
|
+
sourceSubmissionId: string | null;
|
|
37
|
+
metadata: Record<string, unknown> | null;
|
|
38
|
+
createdAt: string;
|
|
39
|
+
updatedAt: string;
|
|
40
|
+
}, Error, CreateCustomerSignalInput, unknown>;
|
|
41
|
+
update: import("@tanstack/react-query").UseMutationResult<{
|
|
42
|
+
id: string;
|
|
43
|
+
personId: string;
|
|
44
|
+
productId: string | null;
|
|
45
|
+
optionUnitId: string | null;
|
|
46
|
+
kind: "wishlist" | "notify" | "inquiry" | "request_offer" | "referral";
|
|
47
|
+
source: "phone" | "website" | "form" | "admin" | "abandoned_cart" | "booking";
|
|
48
|
+
status: "new" | "contacted" | "qualified" | "converted" | "lost" | "expired";
|
|
49
|
+
priority: string;
|
|
50
|
+
notes: string | null;
|
|
51
|
+
tags: string[];
|
|
52
|
+
assignedToUserId: string | null;
|
|
53
|
+
followUpAt: string | null;
|
|
54
|
+
resolvedBookingId: string | null;
|
|
55
|
+
sourceSubmissionId: string | null;
|
|
56
|
+
metadata: Record<string, unknown> | null;
|
|
57
|
+
createdAt: string;
|
|
58
|
+
updatedAt: string;
|
|
59
|
+
}, Error, {
|
|
60
|
+
id: string;
|
|
61
|
+
input: UpdateCustomerSignalInput;
|
|
62
|
+
}, unknown>;
|
|
63
|
+
remove: import("@tanstack/react-query").UseMutationResult<{
|
|
64
|
+
success: boolean;
|
|
65
|
+
}, Error, string, unknown>;
|
|
66
|
+
resolve: import("@tanstack/react-query").UseMutationResult<{
|
|
67
|
+
id: string;
|
|
68
|
+
personId: string;
|
|
69
|
+
productId: string | null;
|
|
70
|
+
optionUnitId: string | null;
|
|
71
|
+
kind: "wishlist" | "notify" | "inquiry" | "request_offer" | "referral";
|
|
72
|
+
source: "phone" | "website" | "form" | "admin" | "abandoned_cart" | "booking";
|
|
73
|
+
status: "new" | "contacted" | "qualified" | "converted" | "lost" | "expired";
|
|
74
|
+
priority: string;
|
|
75
|
+
notes: string | null;
|
|
76
|
+
tags: string[];
|
|
77
|
+
assignedToUserId: string | null;
|
|
78
|
+
followUpAt: string | null;
|
|
79
|
+
resolvedBookingId: string | null;
|
|
80
|
+
sourceSubmissionId: string | null;
|
|
81
|
+
metadata: Record<string, unknown> | null;
|
|
82
|
+
createdAt: string;
|
|
83
|
+
updatedAt: string;
|
|
84
|
+
}, Error, {
|
|
85
|
+
id: string;
|
|
86
|
+
bookingId: string;
|
|
87
|
+
}, unknown>;
|
|
88
|
+
};
|
|
89
|
+
//# sourceMappingURL=use-customer-signal-mutation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-customer-signal-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-customer-signal-mutation.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EAE1B,MAAM,eAAe,CAAA;AAEtB,MAAM,MAAM,sBAAsB,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAA;AAEzE,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,kBAAkB,CAAA;IACxB,MAAM,EAAE,oBAAoB,CAAA;IAC5B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,MAAM,CAAC,EAAE,oBAAoB,CAAA;IAC7B,QAAQ,CAAC,EAAE,sBAAsB,CAAA;IACjC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,2BAA2B;IAC3B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;CAC1C;AAED,MAAM,MAAM,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE,UAAU,CAAC,CAAC,CAAA;AAI5F,wBAAgB,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAgCG,MAAM;eAAS,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;YAmCpC,MAAM;mBAAa,MAAM;;EAiBxE"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { fetchWithValidation } from "../client.js";
|
|
5
|
+
import { useVoyantContext } from "../provider.js";
|
|
6
|
+
import { crmQueryKeys } from "../query-keys.js";
|
|
7
|
+
import { customerSignalSingleResponse, } from "../schemas.js";
|
|
8
|
+
const deleteResponseSchema = z.object({ success: z.boolean() });
|
|
9
|
+
export function useCustomerSignalMutation() {
|
|
10
|
+
const { baseUrl, fetcher } = useVoyantContext();
|
|
11
|
+
const queryClient = useQueryClient();
|
|
12
|
+
const invalidateLists = () => {
|
|
13
|
+
void queryClient.invalidateQueries({ queryKey: crmQueryKeys.customerSignals() });
|
|
14
|
+
};
|
|
15
|
+
const invalidatePerson = (personId) => {
|
|
16
|
+
if (personId) {
|
|
17
|
+
void queryClient.invalidateQueries({
|
|
18
|
+
queryKey: crmQueryKeys.customerSignalsByPerson(personId),
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
const create = useMutation({
|
|
23
|
+
mutationFn: async (input) => {
|
|
24
|
+
const { data } = await fetchWithValidation("/v1/crm/customer-signals", customerSignalSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
25
|
+
return data;
|
|
26
|
+
},
|
|
27
|
+
onSuccess: (data) => {
|
|
28
|
+
invalidateLists();
|
|
29
|
+
invalidatePerson(data.personId);
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
const update = useMutation({
|
|
33
|
+
mutationFn: async ({ id, input }) => {
|
|
34
|
+
const { data } = await fetchWithValidation(`/v1/crm/customer-signals/${id}`, customerSignalSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
|
|
35
|
+
return data;
|
|
36
|
+
},
|
|
37
|
+
onSuccess: (data) => {
|
|
38
|
+
invalidateLists();
|
|
39
|
+
invalidatePerson(data.personId);
|
|
40
|
+
queryClient.setQueryData(crmQueryKeys.customerSignal(data.id), data);
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
const remove = useMutation({
|
|
44
|
+
mutationFn: async (id) => fetchWithValidation(`/v1/crm/customer-signals/${id}`, deleteResponseSchema, { baseUrl, fetcher }, { method: "DELETE" }),
|
|
45
|
+
onSuccess: (_data, id) => {
|
|
46
|
+
invalidateLists();
|
|
47
|
+
queryClient.removeQueries({ queryKey: crmQueryKeys.customerSignal(id) });
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
/**
|
|
51
|
+
* Closes the loop: marks a signal as `converted` and records the
|
|
52
|
+
* booking it became. The caller has already created the booking.
|
|
53
|
+
*/
|
|
54
|
+
const resolve = useMutation({
|
|
55
|
+
mutationFn: async ({ id, bookingId }) => {
|
|
56
|
+
const { data } = await fetchWithValidation(`/v1/crm/customer-signals/${id}/resolve`, customerSignalSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify({ bookingId }) });
|
|
57
|
+
return data;
|
|
58
|
+
},
|
|
59
|
+
onSuccess: (data) => {
|
|
60
|
+
invalidateLists();
|
|
61
|
+
invalidatePerson(data.personId);
|
|
62
|
+
queryClient.setQueryData(crmQueryKeys.customerSignal(data.id), data);
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
return { create, update, remove, resolve };
|
|
66
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface UseCustomerSignalOptions {
|
|
2
|
+
enabled?: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare function useCustomerSignal(id: string | undefined, options?: UseCustomerSignalOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
5
|
+
id: string;
|
|
6
|
+
personId: string;
|
|
7
|
+
productId: string | null;
|
|
8
|
+
optionUnitId: string | null;
|
|
9
|
+
kind: "wishlist" | "notify" | "inquiry" | "request_offer" | "referral";
|
|
10
|
+
source: "phone" | "website" | "form" | "admin" | "abandoned_cart" | "booking";
|
|
11
|
+
status: "new" | "contacted" | "qualified" | "converted" | "lost" | "expired";
|
|
12
|
+
priority: string;
|
|
13
|
+
notes: string | null;
|
|
14
|
+
tags: string[];
|
|
15
|
+
assignedToUserId: string | null;
|
|
16
|
+
followUpAt: string | null;
|
|
17
|
+
resolvedBookingId: string | null;
|
|
18
|
+
sourceSubmissionId: string | null;
|
|
19
|
+
metadata: Record<string, unknown> | null;
|
|
20
|
+
createdAt: string;
|
|
21
|
+
updatedAt: string;
|
|
22
|
+
}, Error>;
|
|
23
|
+
//# sourceMappingURL=use-customer-signal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-customer-signal.d.ts","sourceRoot":"","sources":["../../src/hooks/use-customer-signal.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,wBAAwB;IACvC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,GAAE,wBAA6B;;;;;;;;;;;;;;;;;;UAiB/F"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { fetchWithValidation } from "../client.js";
|
|
4
|
+
import { useVoyantContext } from "../provider.js";
|
|
5
|
+
import { crmQueryKeys } from "../query-keys.js";
|
|
6
|
+
import { customerSignalSingleResponse } from "../schemas.js";
|
|
7
|
+
export function useCustomerSignal(id, options = {}) {
|
|
8
|
+
const { baseUrl, fetcher } = useVoyantContext();
|
|
9
|
+
const { enabled = true } = options;
|
|
10
|
+
return useQuery({
|
|
11
|
+
queryKey: crmQueryKeys.customerSignal(id ?? ""),
|
|
12
|
+
queryFn: async () => {
|
|
13
|
+
if (!id)
|
|
14
|
+
throw new Error("useCustomerSignal requires an id");
|
|
15
|
+
const { data } = await fetchWithValidation(`/v1/crm/customer-signals/${id}`, customerSignalSingleResponse, { baseUrl, fetcher });
|
|
16
|
+
return data;
|
|
17
|
+
},
|
|
18
|
+
enabled: enabled && Boolean(id),
|
|
19
|
+
});
|
|
20
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type CustomerSignalsListFilters } from "../query-keys.js";
|
|
2
|
+
export interface UseCustomerSignalsOptions extends CustomerSignalsListFilters {
|
|
3
|
+
enabled?: boolean;
|
|
4
|
+
}
|
|
5
|
+
/** Top-level paginated list with optional filters. */
|
|
6
|
+
export declare function useCustomerSignals(options?: UseCustomerSignalsOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
7
|
+
data: {
|
|
8
|
+
id: string;
|
|
9
|
+
personId: string;
|
|
10
|
+
productId: string | null;
|
|
11
|
+
optionUnitId: string | null;
|
|
12
|
+
kind: "wishlist" | "notify" | "inquiry" | "request_offer" | "referral";
|
|
13
|
+
source: "phone" | "website" | "form" | "admin" | "abandoned_cart" | "booking";
|
|
14
|
+
status: "new" | "contacted" | "qualified" | "converted" | "lost" | "expired";
|
|
15
|
+
priority: string;
|
|
16
|
+
notes: string | null;
|
|
17
|
+
tags: string[];
|
|
18
|
+
assignedToUserId: string | null;
|
|
19
|
+
followUpAt: string | null;
|
|
20
|
+
resolvedBookingId: string | null;
|
|
21
|
+
sourceSubmissionId: string | null;
|
|
22
|
+
metadata: Record<string, unknown> | null;
|
|
23
|
+
createdAt: string;
|
|
24
|
+
updatedAt: string;
|
|
25
|
+
}[];
|
|
26
|
+
total: number;
|
|
27
|
+
limit: number;
|
|
28
|
+
offset: number;
|
|
29
|
+
}, Error>;
|
|
30
|
+
export interface UseCustomerSignalsForPersonOptions {
|
|
31
|
+
enabled?: boolean;
|
|
32
|
+
}
|
|
33
|
+
/** Convenience: chronological list of signals for a single person. */
|
|
34
|
+
export declare function useCustomerSignalsForPerson(personId: string | undefined, options?: UseCustomerSignalsForPersonOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
35
|
+
data: {
|
|
36
|
+
id: string;
|
|
37
|
+
personId: string;
|
|
38
|
+
productId: string | null;
|
|
39
|
+
optionUnitId: string | null;
|
|
40
|
+
kind: "wishlist" | "notify" | "inquiry" | "request_offer" | "referral";
|
|
41
|
+
source: "phone" | "website" | "form" | "admin" | "abandoned_cart" | "booking";
|
|
42
|
+
status: "new" | "contacted" | "qualified" | "converted" | "lost" | "expired";
|
|
43
|
+
priority: string;
|
|
44
|
+
notes: string | null;
|
|
45
|
+
tags: string[];
|
|
46
|
+
assignedToUserId: string | null;
|
|
47
|
+
followUpAt: string | null;
|
|
48
|
+
resolvedBookingId: string | null;
|
|
49
|
+
sourceSubmissionId: string | null;
|
|
50
|
+
metadata: Record<string, unknown> | null;
|
|
51
|
+
createdAt: string;
|
|
52
|
+
updatedAt: string;
|
|
53
|
+
}[];
|
|
54
|
+
}, Error>;
|
|
55
|
+
//# sourceMappingURL=use-customer-signals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-customer-signals.d.ts","sourceRoot":"","sources":["../../src/hooks/use-customer-signals.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,0BAA0B,EAAgB,MAAM,kBAAkB,CAAA;AAGhF,MAAM,WAAW,yBAA0B,SAAQ,0BAA0B;IAC3E,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,sDAAsD;AACtD,wBAAgB,kBAAkB,CAAC,OAAO,GAAE,yBAA8B;;;;;;;;;;;;;;;;;;;;;;;UAyBzE;AAED,MAAM,WAAW,kCAAkC;IACjD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,sEAAsE;AACtE,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,OAAO,GAAE,kCAAuC;;;;;;;;;;;;;;;;;;;;UAiBjD"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { fetchWithValidation } from "../client.js";
|
|
4
|
+
import { useVoyantContext } from "../provider.js";
|
|
5
|
+
import { crmQueryKeys } from "../query-keys.js";
|
|
6
|
+
import { customerSignalListByPersonResponse, customerSignalListResponse } from "../schemas.js";
|
|
7
|
+
/** Top-level paginated list with optional filters. */
|
|
8
|
+
export function useCustomerSignals(options = {}) {
|
|
9
|
+
const { baseUrl, fetcher } = useVoyantContext();
|
|
10
|
+
const { enabled = true, ...filters } = options;
|
|
11
|
+
return useQuery({
|
|
12
|
+
queryKey: crmQueryKeys.customerSignalsList(filters),
|
|
13
|
+
queryFn: () => {
|
|
14
|
+
const params = new URLSearchParams();
|
|
15
|
+
if (filters.personId)
|
|
16
|
+
params.set("personId", filters.personId);
|
|
17
|
+
if (filters.assignedToUserId)
|
|
18
|
+
params.set("assignedToUserId", filters.assignedToUserId);
|
|
19
|
+
if (filters.status)
|
|
20
|
+
params.set("status", filters.status);
|
|
21
|
+
if (filters.kind)
|
|
22
|
+
params.set("kind", filters.kind);
|
|
23
|
+
if (filters.productId)
|
|
24
|
+
params.set("productId", filters.productId);
|
|
25
|
+
if (filters.search)
|
|
26
|
+
params.set("search", filters.search);
|
|
27
|
+
if (filters.limit !== undefined)
|
|
28
|
+
params.set("limit", String(filters.limit));
|
|
29
|
+
if (filters.offset !== undefined)
|
|
30
|
+
params.set("offset", String(filters.offset));
|
|
31
|
+
const qs = params.toString();
|
|
32
|
+
return fetchWithValidation(`/v1/crm/customer-signals${qs ? `?${qs}` : ""}`, customerSignalListResponse, { baseUrl, fetcher });
|
|
33
|
+
},
|
|
34
|
+
enabled,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
/** Convenience: chronological list of signals for a single person. */
|
|
38
|
+
export function useCustomerSignalsForPerson(personId, options = {}) {
|
|
39
|
+
const { baseUrl, fetcher } = useVoyantContext();
|
|
40
|
+
const { enabled = true } = options;
|
|
41
|
+
return useQuery({
|
|
42
|
+
queryKey: crmQueryKeys.customerSignalsByPerson(personId ?? ""),
|
|
43
|
+
queryFn: async () => {
|
|
44
|
+
if (!personId)
|
|
45
|
+
throw new Error("useCustomerSignalsForPerson requires a personId");
|
|
46
|
+
return fetchWithValidation(`/v1/crm/people/${personId}/signals`, customerSignalListByPersonResponse, { baseUrl, fetcher });
|
|
47
|
+
},
|
|
48
|
+
enabled: enabled && Boolean(personId),
|
|
49
|
+
});
|
|
50
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,9 @@ export { defaultFetcher, fetchWithValidation, VoyantApiError, type VoyantFetcher
|
|
|
2
2
|
export { type UseActivitiesOptions, useActivities, } from "./hooks/use-activities.js";
|
|
3
3
|
export { type UseActivityOptions, useActivity, useActivityLinks, } from "./hooks/use-activity.js";
|
|
4
4
|
export { type CreateActivityInput, type CreateActivityLinkInput, type UpdateActivityInput, useActivityMutation, } from "./hooks/use-activity-mutation.js";
|
|
5
|
+
export { type UseCustomerSignalOptions, useCustomerSignal, } from "./hooks/use-customer-signal.js";
|
|
6
|
+
export { type CreateCustomerSignalInput, type CustomerSignalPriority, type UpdateCustomerSignalInput, useCustomerSignalMutation, } from "./hooks/use-customer-signal-mutation.js";
|
|
7
|
+
export { type UseCustomerSignalsForPersonOptions, type UseCustomerSignalsOptions, useCustomerSignals, useCustomerSignalsForPerson, } from "./hooks/use-customer-signals.js";
|
|
5
8
|
export { type UseOpportunitiesOptions, useOpportunities, } from "./hooks/use-opportunities.js";
|
|
6
9
|
export { type UseOpportunityOptions, useOpportunity, } from "./hooks/use-opportunity.js";
|
|
7
10
|
export { type CreateOpportunityInput, type UpdateOpportunityInput, useOpportunityMutation, } from "./hooks/use-opportunity-mutation.js";
|
|
@@ -23,7 +26,7 @@ export { type CreateQuoteInput, type CreateQuoteLineInput, type UpdateQuoteInput
|
|
|
23
26
|
export { type UseQuotesOptions, useQuotes, } from "./hooks/use-quotes.js";
|
|
24
27
|
export { type UseStageOptions, type UseStagesOptions, useStage, useStages, } from "./hooks/use-stages.js";
|
|
25
28
|
export { useVoyantContext, type VoyantContextValue, VoyantProvider, type VoyantProviderProps, } from "./provider.js";
|
|
26
|
-
export { type ActivitiesListFilters, crmQueryKeys, type OpportunitiesListFilters, type OrganizationsListFilters, type PeopleListFilters, type PersonDocumentsListFilters, type PersonRelationshipsListFilters, type PipelinesListFilters, type QuotesListFilters, type StagesListFilters, } from "./query-keys.js";
|
|
29
|
+
export { type ActivitiesListFilters, type CustomerSignalsListFilters, crmQueryKeys, type OpportunitiesListFilters, type OrganizationsListFilters, type PeopleListFilters, type PersonDocumentsListFilters, type PersonRelationshipsListFilters, type PipelinesListFilters, type QuotesListFilters, type StagesListFilters, } from "./query-keys.js";
|
|
27
30
|
export { getActivitiesQueryOptions, getOpportunitiesQueryOptions, getOpportunityQueryOptions, getOrganizationQueryOptions, getOrganizationsQueryOptions, getPeopleQueryOptions, getPersonActivitiesQueryOptions, getPersonNotesQueryOptions, getPersonOpportunitiesQueryOptions, getPersonQueryOptions, getPipelineQueryOptions, getPipelinesQueryOptions, getQuoteLinesQueryOptions, getQuoteQueryOptions, getQuotesQueryOptions, getStageQueryOptions, getStagesQueryOptions, } from "./query-options.js";
|
|
28
|
-
export { type ActivityLinkRecord, type ActivityRecord, activityLinkRecordSchema, activityRecordSchema, type KmsEnvelopeRecord, kmsEnvelopeRecordSchema, type OpportunityRecord, type OrganizationRecord, opportunityRecordSchema, organizationRecordSchema, type PersonDocumentRecord, type PersonDocumentType, type PersonNoteRecord, type PersonRecord, type PersonRelationshipKind, type PersonRelationshipRecord, type PersonTravelSnapshotRecord, type PipelineRecord, personDocumentRecordSchema, personDocumentTypeSchema, personNoteRecordSchema, personRecordSchema, personRelationshipKindSchema, personRelationshipRecordSchema, personTravelSnapshotSchema, pipelineRecordSchema, type QuoteLineRecord, type QuoteRecord, quoteLineRecordSchema, quoteRecordSchema, type StageRecord, stageRecordSchema, } from "./schemas.js";
|
|
31
|
+
export { type ActivityLinkRecord, type ActivityRecord, activityLinkRecordSchema, activityRecordSchema, type CustomerSignalKind, type CustomerSignalRecord, type CustomerSignalSource, type CustomerSignalStatus, customerSignalKindSchema, customerSignalRecordSchema, customerSignalSourceSchema, customerSignalStatusSchema, type KmsEnvelopeRecord, kmsEnvelopeRecordSchema, type OpportunityRecord, type OrganizationRecord, opportunityRecordSchema, organizationRecordSchema, type PersonDocumentRecord, type PersonDocumentType, type PersonNoteRecord, type PersonRecord, type PersonRelationshipKind, type PersonRelationshipRecord, type PersonTravelSnapshotRecord, type PipelineRecord, personDocumentRecordSchema, personDocumentTypeSchema, personNoteRecordSchema, personRecordSchema, personRelationshipKindSchema, personRelationshipRecordSchema, personTravelSnapshotSchema, pipelineRecordSchema, type QuoteLineRecord, type QuoteRecord, quoteLineRecordSchema, quoteRecordSchema, type StageRecord, stageRecordSchema, } from "./schemas.js";
|
|
29
32
|
//# 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,EACL,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,KAAK,aAAa,GACnB,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,KAAK,oBAAoB,EACzB,aAAa,GACd,MAAM,2BAA2B,CAAA;AAClC,OAAO,EACL,KAAK,kBAAkB,EACvB,WAAW,EACX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BAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,wBAAwB,EACxB,oBAAoB,EACpB,KAAK,iBAAiB,EACtB,uBAAuB,EACvB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,uBAAuB,EACvB,wBAAwB,EACxB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,cAAc,EACnB,0BAA0B,EAC1B,wBAAwB,EACxB,sBAAsB,EACtB,kBAAkB,EAClB,4BAA4B,EAC5B,8BAA8B,EAC9B,0BAA0B,EAC1B,oBAAoB,EACpB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,KAAK,WAAW,EAChB,iBAAiB,GAClB,MAAM,cAAc,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,KAAK,aAAa,GACnB,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,KAAK,oBAAoB,EACzB,aAAa,GACd,MAAM,2BAA2B,CAAA;AAClC,OAAO,EACL,KAAK,kBAAkB,EACvB,WAAW,EACX,gBAAgB,GACjB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,mBAAmB,GACpB,MAAM,kCAAkC,CAAA;AACzC,OAAO,EACL,KAAK,wBAAwB,EAC7B,iBAAiB,GAClB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACL,KAA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B,qBAAqB,EACrB,+BAA+B,EAC/B,0BAA0B,EAC1B,kCAAkC,EAClC,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,wBAAwB,EACxB,oBAAoB,EACpB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,wBAAwB,EACxB,0BAA0B,EAC1B,0BAA0B,EAC1B,0BAA0B,EAC1B,KAAK,iBAAiB,EACtB,uBAAuB,EACvB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,uBAAuB,EACvB,wBAAwB,EACxB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,cAAc,EACnB,0BAA0B,EAC1B,wBAAwB,EACxB,sBAAsB,EACtB,kBAAkB,EAClB,4BAA4B,EAC5B,8BAA8B,EAC9B,0BAA0B,EAC1B,oBAAoB,EACpB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,KAAK,WAAW,EAChB,iBAAiB,GAClB,MAAM,cAAc,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -2,6 +2,9 @@ export { defaultFetcher, fetchWithValidation, VoyantApiError, } from "./client.j
|
|
|
2
2
|
export { useActivities, } from "./hooks/use-activities.js";
|
|
3
3
|
export { useActivity, useActivityLinks, } from "./hooks/use-activity.js";
|
|
4
4
|
export { useActivityMutation, } from "./hooks/use-activity-mutation.js";
|
|
5
|
+
export { useCustomerSignal, } from "./hooks/use-customer-signal.js";
|
|
6
|
+
export { useCustomerSignalMutation, } from "./hooks/use-customer-signal-mutation.js";
|
|
7
|
+
export { useCustomerSignals, useCustomerSignalsForPerson, } from "./hooks/use-customer-signals.js";
|
|
5
8
|
export { useOpportunities, } from "./hooks/use-opportunities.js";
|
|
6
9
|
export { useOpportunity, } from "./hooks/use-opportunity.js";
|
|
7
10
|
export { useOpportunityMutation, } from "./hooks/use-opportunity-mutation.js";
|
|
@@ -25,4 +28,4 @@ export { useStage, useStages, } from "./hooks/use-stages.js";
|
|
|
25
28
|
export { useVoyantContext, VoyantProvider, } from "./provider.js";
|
|
26
29
|
export { crmQueryKeys, } from "./query-keys.js";
|
|
27
30
|
export { getActivitiesQueryOptions, getOpportunitiesQueryOptions, getOpportunityQueryOptions, getOrganizationQueryOptions, getOrganizationsQueryOptions, getPeopleQueryOptions, getPersonActivitiesQueryOptions, getPersonNotesQueryOptions, getPersonOpportunitiesQueryOptions, getPersonQueryOptions, getPipelineQueryOptions, getPipelinesQueryOptions, getQuoteLinesQueryOptions, getQuoteQueryOptions, getQuotesQueryOptions, getStageQueryOptions, getStagesQueryOptions, } from "./query-options.js";
|
|
28
|
-
export { activityLinkRecordSchema, activityRecordSchema, kmsEnvelopeRecordSchema, opportunityRecordSchema, organizationRecordSchema, personDocumentRecordSchema, personDocumentTypeSchema, personNoteRecordSchema, personRecordSchema, personRelationshipKindSchema, personRelationshipRecordSchema, personTravelSnapshotSchema, pipelineRecordSchema, quoteLineRecordSchema, quoteRecordSchema, stageRecordSchema, } from "./schemas.js";
|
|
31
|
+
export { activityLinkRecordSchema, activityRecordSchema, customerSignalKindSchema, customerSignalRecordSchema, customerSignalSourceSchema, customerSignalStatusSchema, kmsEnvelopeRecordSchema, opportunityRecordSchema, organizationRecordSchema, personDocumentRecordSchema, personDocumentTypeSchema, personNoteRecordSchema, personRecordSchema, personRelationshipKindSchema, personRelationshipRecordSchema, personTravelSnapshotSchema, pipelineRecordSchema, quoteLineRecordSchema, quoteRecordSchema, stageRecordSchema, } from "./schemas.js";
|
package/dist/query-keys.d.ts
CHANGED
|
@@ -56,6 +56,16 @@ export interface QuotesListFilters {
|
|
|
56
56
|
limit?: number | undefined;
|
|
57
57
|
offset?: number | undefined;
|
|
58
58
|
}
|
|
59
|
+
export interface CustomerSignalsListFilters {
|
|
60
|
+
personId?: string | undefined;
|
|
61
|
+
assignedToUserId?: string | undefined;
|
|
62
|
+
status?: string | undefined;
|
|
63
|
+
kind?: string | undefined;
|
|
64
|
+
productId?: string | undefined;
|
|
65
|
+
search?: string | undefined;
|
|
66
|
+
limit?: number | undefined;
|
|
67
|
+
offset?: number | undefined;
|
|
68
|
+
}
|
|
59
69
|
export interface PersonRelationshipsListFilters {
|
|
60
70
|
kind?: string | undefined;
|
|
61
71
|
direction?: "from" | "to" | "both" | undefined;
|
|
@@ -77,6 +87,10 @@ export declare const crmQueryKeys: {
|
|
|
77
87
|
readonly personDocument: (id: string) => readonly ["voyant", "crm", "person-documents", "detail", string];
|
|
78
88
|
readonly personTravelSnapshot: (personId: string) => readonly ["voyant", "crm", "people", "detail", string, "travel-snapshot"];
|
|
79
89
|
readonly personRelationships: (personId: string, filters?: PersonRelationshipsListFilters) => readonly ["voyant", "crm", "people", "detail", string, "relationships", PersonRelationshipsListFilters];
|
|
90
|
+
readonly customerSignals: () => readonly ["voyant", "crm", "customer-signals"];
|
|
91
|
+
readonly customerSignalsList: (filters: CustomerSignalsListFilters) => readonly ["voyant", "crm", "customer-signals", "list", CustomerSignalsListFilters];
|
|
92
|
+
readonly customerSignal: (id: string) => readonly ["voyant", "crm", "customer-signals", "detail", string];
|
|
93
|
+
readonly customerSignalsByPerson: (personId: string) => readonly ["voyant", "crm", "people", "detail", string, "signals"];
|
|
80
94
|
readonly organizations: () => readonly ["voyant", "crm", "organizations"];
|
|
81
95
|
readonly organizationsList: (filters: OrganizationsListFilters) => readonly ["voyant", "crm", "organizations", "list", OrganizationsListFilters];
|
|
82
96
|
readonly organization: (id: string) => readonly ["voyant", "crm", "organizations", "detail", string];
|
package/dist/query-keys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ID,iBAAiB;0BAC1B,MAAM;yCACS,MAAM,YAAW,0BAA0B;kCAElD,MAAM;8CACM,MAAM;6CAEP,MAAM,YAAW,8BAA8B;;4CAGhD,0BAA0B;kCAEpC,MAAM;iDACS,MAAM;;0CAIb,wBAAwB;gCAElC,MAAM;;0CAGI,wBAAwB;+BAEnC,MAAM;;sCAGC,oBAAoB;4BAE9B,MAAM;;mCAGC,iBAAiB;yBAC3B,MAAM;;uCAGQ,qBAAqB;4BAEhC,MAAM;yCACO,MAAM;;mCAGZ,iBAAiB;yBAC3B,MAAM;mCACI,MAAM;CACpB,CAAA"}
|
package/dist/query-keys.js
CHANGED
|
@@ -11,6 +11,10 @@ export const crmQueryKeys = {
|
|
|
11
11
|
personDocument: (id) => [...crmQueryKeys.all, "person-documents", "detail", id],
|
|
12
12
|
personTravelSnapshot: (personId) => [...crmQueryKeys.person(personId), "travel-snapshot"],
|
|
13
13
|
personRelationships: (personId, filters = {}) => [...crmQueryKeys.person(personId), "relationships", filters],
|
|
14
|
+
customerSignals: () => [...crmQueryKeys.all, "customer-signals"],
|
|
15
|
+
customerSignalsList: (filters) => [...crmQueryKeys.customerSignals(), "list", filters],
|
|
16
|
+
customerSignal: (id) => [...crmQueryKeys.customerSignals(), "detail", id],
|
|
17
|
+
customerSignalsByPerson: (personId) => [...crmQueryKeys.person(personId), "signals"],
|
|
14
18
|
organizations: () => [...crmQueryKeys.all, "organizations"],
|
|
15
19
|
organizationsList: (filters) => [...crmQueryKeys.organizations(), "list", filters],
|
|
16
20
|
organization: (id) => [...crmQueryKeys.organizations(), "detail", id],
|
package/dist/schemas.d.ts
CHANGED
|
@@ -563,6 +563,198 @@ export declare const personDocumentSingleResponse: z.ZodObject<{
|
|
|
563
563
|
updatedAt: z.ZodString;
|
|
564
564
|
}, z.core.$strip>;
|
|
565
565
|
}, z.core.$strip>;
|
|
566
|
+
export declare const customerSignalKindSchema: z.ZodEnum<{
|
|
567
|
+
wishlist: "wishlist";
|
|
568
|
+
notify: "notify";
|
|
569
|
+
inquiry: "inquiry";
|
|
570
|
+
request_offer: "request_offer";
|
|
571
|
+
referral: "referral";
|
|
572
|
+
}>;
|
|
573
|
+
export declare const customerSignalSourceSchema: z.ZodEnum<{
|
|
574
|
+
phone: "phone";
|
|
575
|
+
website: "website";
|
|
576
|
+
form: "form";
|
|
577
|
+
admin: "admin";
|
|
578
|
+
abandoned_cart: "abandoned_cart";
|
|
579
|
+
booking: "booking";
|
|
580
|
+
}>;
|
|
581
|
+
export declare const customerSignalStatusSchema: z.ZodEnum<{
|
|
582
|
+
new: "new";
|
|
583
|
+
contacted: "contacted";
|
|
584
|
+
qualified: "qualified";
|
|
585
|
+
converted: "converted";
|
|
586
|
+
lost: "lost";
|
|
587
|
+
expired: "expired";
|
|
588
|
+
}>;
|
|
589
|
+
export type CustomerSignalKind = z.infer<typeof customerSignalKindSchema>;
|
|
590
|
+
export type CustomerSignalSource = z.infer<typeof customerSignalSourceSchema>;
|
|
591
|
+
export type CustomerSignalStatus = z.infer<typeof customerSignalStatusSchema>;
|
|
592
|
+
export declare const customerSignalRecordSchema: z.ZodObject<{
|
|
593
|
+
id: z.ZodString;
|
|
594
|
+
personId: z.ZodString;
|
|
595
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
596
|
+
optionUnitId: z.ZodNullable<z.ZodString>;
|
|
597
|
+
kind: z.ZodEnum<{
|
|
598
|
+
wishlist: "wishlist";
|
|
599
|
+
notify: "notify";
|
|
600
|
+
inquiry: "inquiry";
|
|
601
|
+
request_offer: "request_offer";
|
|
602
|
+
referral: "referral";
|
|
603
|
+
}>;
|
|
604
|
+
source: z.ZodEnum<{
|
|
605
|
+
phone: "phone";
|
|
606
|
+
website: "website";
|
|
607
|
+
form: "form";
|
|
608
|
+
admin: "admin";
|
|
609
|
+
abandoned_cart: "abandoned_cart";
|
|
610
|
+
booking: "booking";
|
|
611
|
+
}>;
|
|
612
|
+
status: z.ZodEnum<{
|
|
613
|
+
new: "new";
|
|
614
|
+
contacted: "contacted";
|
|
615
|
+
qualified: "qualified";
|
|
616
|
+
converted: "converted";
|
|
617
|
+
lost: "lost";
|
|
618
|
+
expired: "expired";
|
|
619
|
+
}>;
|
|
620
|
+
priority: z.ZodString;
|
|
621
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
622
|
+
tags: z.ZodArray<z.ZodString>;
|
|
623
|
+
assignedToUserId: z.ZodNullable<z.ZodString>;
|
|
624
|
+
followUpAt: z.ZodNullable<z.ZodString>;
|
|
625
|
+
resolvedBookingId: z.ZodNullable<z.ZodString>;
|
|
626
|
+
sourceSubmissionId: z.ZodNullable<z.ZodString>;
|
|
627
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
628
|
+
createdAt: z.ZodString;
|
|
629
|
+
updatedAt: z.ZodString;
|
|
630
|
+
}, z.core.$strip>;
|
|
631
|
+
export type CustomerSignalRecord = z.infer<typeof customerSignalRecordSchema>;
|
|
632
|
+
export declare const customerSignalListResponse: z.ZodObject<{
|
|
633
|
+
data: z.ZodArray<z.ZodObject<{
|
|
634
|
+
id: z.ZodString;
|
|
635
|
+
personId: z.ZodString;
|
|
636
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
637
|
+
optionUnitId: z.ZodNullable<z.ZodString>;
|
|
638
|
+
kind: z.ZodEnum<{
|
|
639
|
+
wishlist: "wishlist";
|
|
640
|
+
notify: "notify";
|
|
641
|
+
inquiry: "inquiry";
|
|
642
|
+
request_offer: "request_offer";
|
|
643
|
+
referral: "referral";
|
|
644
|
+
}>;
|
|
645
|
+
source: z.ZodEnum<{
|
|
646
|
+
phone: "phone";
|
|
647
|
+
website: "website";
|
|
648
|
+
form: "form";
|
|
649
|
+
admin: "admin";
|
|
650
|
+
abandoned_cart: "abandoned_cart";
|
|
651
|
+
booking: "booking";
|
|
652
|
+
}>;
|
|
653
|
+
status: z.ZodEnum<{
|
|
654
|
+
new: "new";
|
|
655
|
+
contacted: "contacted";
|
|
656
|
+
qualified: "qualified";
|
|
657
|
+
converted: "converted";
|
|
658
|
+
lost: "lost";
|
|
659
|
+
expired: "expired";
|
|
660
|
+
}>;
|
|
661
|
+
priority: z.ZodString;
|
|
662
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
663
|
+
tags: z.ZodArray<z.ZodString>;
|
|
664
|
+
assignedToUserId: z.ZodNullable<z.ZodString>;
|
|
665
|
+
followUpAt: z.ZodNullable<z.ZodString>;
|
|
666
|
+
resolvedBookingId: z.ZodNullable<z.ZodString>;
|
|
667
|
+
sourceSubmissionId: z.ZodNullable<z.ZodString>;
|
|
668
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
669
|
+
createdAt: z.ZodString;
|
|
670
|
+
updatedAt: z.ZodString;
|
|
671
|
+
}, z.core.$strip>>;
|
|
672
|
+
total: z.ZodNumber;
|
|
673
|
+
limit: z.ZodNumber;
|
|
674
|
+
offset: z.ZodNumber;
|
|
675
|
+
}, z.core.$strip>;
|
|
676
|
+
export declare const customerSignalListByPersonResponse: z.ZodObject<{
|
|
677
|
+
data: z.ZodArray<z.ZodObject<{
|
|
678
|
+
id: z.ZodString;
|
|
679
|
+
personId: z.ZodString;
|
|
680
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
681
|
+
optionUnitId: z.ZodNullable<z.ZodString>;
|
|
682
|
+
kind: z.ZodEnum<{
|
|
683
|
+
wishlist: "wishlist";
|
|
684
|
+
notify: "notify";
|
|
685
|
+
inquiry: "inquiry";
|
|
686
|
+
request_offer: "request_offer";
|
|
687
|
+
referral: "referral";
|
|
688
|
+
}>;
|
|
689
|
+
source: z.ZodEnum<{
|
|
690
|
+
phone: "phone";
|
|
691
|
+
website: "website";
|
|
692
|
+
form: "form";
|
|
693
|
+
admin: "admin";
|
|
694
|
+
abandoned_cart: "abandoned_cart";
|
|
695
|
+
booking: "booking";
|
|
696
|
+
}>;
|
|
697
|
+
status: z.ZodEnum<{
|
|
698
|
+
new: "new";
|
|
699
|
+
contacted: "contacted";
|
|
700
|
+
qualified: "qualified";
|
|
701
|
+
converted: "converted";
|
|
702
|
+
lost: "lost";
|
|
703
|
+
expired: "expired";
|
|
704
|
+
}>;
|
|
705
|
+
priority: z.ZodString;
|
|
706
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
707
|
+
tags: z.ZodArray<z.ZodString>;
|
|
708
|
+
assignedToUserId: z.ZodNullable<z.ZodString>;
|
|
709
|
+
followUpAt: z.ZodNullable<z.ZodString>;
|
|
710
|
+
resolvedBookingId: z.ZodNullable<z.ZodString>;
|
|
711
|
+
sourceSubmissionId: z.ZodNullable<z.ZodString>;
|
|
712
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
713
|
+
createdAt: z.ZodString;
|
|
714
|
+
updatedAt: z.ZodString;
|
|
715
|
+
}, z.core.$strip>>;
|
|
716
|
+
}, z.core.$strip>;
|
|
717
|
+
export declare const customerSignalSingleResponse: z.ZodObject<{
|
|
718
|
+
data: z.ZodObject<{
|
|
719
|
+
id: z.ZodString;
|
|
720
|
+
personId: z.ZodString;
|
|
721
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
722
|
+
optionUnitId: z.ZodNullable<z.ZodString>;
|
|
723
|
+
kind: z.ZodEnum<{
|
|
724
|
+
wishlist: "wishlist";
|
|
725
|
+
notify: "notify";
|
|
726
|
+
inquiry: "inquiry";
|
|
727
|
+
request_offer: "request_offer";
|
|
728
|
+
referral: "referral";
|
|
729
|
+
}>;
|
|
730
|
+
source: z.ZodEnum<{
|
|
731
|
+
phone: "phone";
|
|
732
|
+
website: "website";
|
|
733
|
+
form: "form";
|
|
734
|
+
admin: "admin";
|
|
735
|
+
abandoned_cart: "abandoned_cart";
|
|
736
|
+
booking: "booking";
|
|
737
|
+
}>;
|
|
738
|
+
status: z.ZodEnum<{
|
|
739
|
+
new: "new";
|
|
740
|
+
contacted: "contacted";
|
|
741
|
+
qualified: "qualified";
|
|
742
|
+
converted: "converted";
|
|
743
|
+
lost: "lost";
|
|
744
|
+
expired: "expired";
|
|
745
|
+
}>;
|
|
746
|
+
priority: z.ZodString;
|
|
747
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
748
|
+
tags: z.ZodArray<z.ZodString>;
|
|
749
|
+
assignedToUserId: z.ZodNullable<z.ZodString>;
|
|
750
|
+
followUpAt: z.ZodNullable<z.ZodString>;
|
|
751
|
+
resolvedBookingId: z.ZodNullable<z.ZodString>;
|
|
752
|
+
sourceSubmissionId: z.ZodNullable<z.ZodString>;
|
|
753
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
754
|
+
createdAt: z.ZodString;
|
|
755
|
+
updatedAt: z.ZodString;
|
|
756
|
+
}, z.core.$strip>;
|
|
757
|
+
}, z.core.$strip>;
|
|
566
758
|
export declare const personRelationshipKindSchema: z.ZodEnum<{
|
|
567
759
|
other: "other";
|
|
568
760
|
spouse: "spouse";
|
package/dist/schemas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;GAIG;AAEH,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC;;;;;iBAM7D,CAAA;AAEJ,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC;;iBAA6B,CAAA;AAE3F,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC;;iBAAsC,CAAA;AAElG,eAAO,MAAM,eAAe;;iBAAqC,CAAA;AAEjE;;;;;GAKG;AAEH;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;;kBAAkD,CAAA;AAEtF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAA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BAAoC,CAAA;AAEpE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;iBAYhC,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEnE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;iBAAsC,CAAA;AACxE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;iBAAwC,CAAA"}
|
package/dist/schemas.js
CHANGED
|
@@ -190,6 +190,51 @@ export const personDocumentRecordSchema = z.object({
|
|
|
190
190
|
});
|
|
191
191
|
export const personDocumentListResponse = listEnvelope(personDocumentRecordSchema);
|
|
192
192
|
export const personDocumentSingleResponse = singleEnvelope(personDocumentRecordSchema);
|
|
193
|
+
export const customerSignalKindSchema = z.enum([
|
|
194
|
+
"wishlist",
|
|
195
|
+
"notify",
|
|
196
|
+
"inquiry",
|
|
197
|
+
"request_offer",
|
|
198
|
+
"referral",
|
|
199
|
+
]);
|
|
200
|
+
export const customerSignalSourceSchema = z.enum([
|
|
201
|
+
"form",
|
|
202
|
+
"phone",
|
|
203
|
+
"admin",
|
|
204
|
+
"abandoned_cart",
|
|
205
|
+
"website",
|
|
206
|
+
"booking",
|
|
207
|
+
]);
|
|
208
|
+
export const customerSignalStatusSchema = z.enum([
|
|
209
|
+
"new",
|
|
210
|
+
"contacted",
|
|
211
|
+
"qualified",
|
|
212
|
+
"converted",
|
|
213
|
+
"lost",
|
|
214
|
+
"expired",
|
|
215
|
+
]);
|
|
216
|
+
export const customerSignalRecordSchema = z.object({
|
|
217
|
+
id: z.string(),
|
|
218
|
+
personId: z.string(),
|
|
219
|
+
productId: z.string().nullable(),
|
|
220
|
+
optionUnitId: z.string().nullable(),
|
|
221
|
+
kind: customerSignalKindSchema,
|
|
222
|
+
source: customerSignalSourceSchema,
|
|
223
|
+
status: customerSignalStatusSchema,
|
|
224
|
+
priority: z.string(),
|
|
225
|
+
notes: z.string().nullable(),
|
|
226
|
+
tags: z.array(z.string()),
|
|
227
|
+
assignedToUserId: z.string().nullable(),
|
|
228
|
+
followUpAt: z.string().nullable(),
|
|
229
|
+
resolvedBookingId: z.string().nullable(),
|
|
230
|
+
sourceSubmissionId: z.string().nullable(),
|
|
231
|
+
metadata: z.record(z.string(), z.unknown()).nullable(),
|
|
232
|
+
createdAt: z.string(),
|
|
233
|
+
updatedAt: z.string(),
|
|
234
|
+
});
|
|
235
|
+
export const customerSignalListResponse = paginatedEnvelope(customerSignalRecordSchema);
|
|
236
|
+
export const customerSignalListByPersonResponse = listEnvelope(customerSignalRecordSchema);
|
|
237
|
+
export const customerSignalSingleResponse = singleEnvelope(customerSignalRecordSchema);
|
|
193
238
|
export const personRelationshipKindSchema = z.enum([
|
|
194
239
|
"spouse",
|
|
195
240
|
"partner",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyantjs/crm-react",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.4",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"react": "^19.0.0",
|
|
42
42
|
"react-dom": "^19.0.0",
|
|
43
43
|
"zod": "^4.0.0",
|
|
44
|
-
"@voyantjs/crm": "0.26.
|
|
44
|
+
"@voyantjs/crm": "0.26.4"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@tanstack/react-query": "^5.96.2",
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
"typescript": "^6.0.2",
|
|
53
53
|
"vitest": "^4.1.2",
|
|
54
54
|
"zod": "^4.3.6",
|
|
55
|
-
"@voyantjs/crm": "0.26.
|
|
56
|
-
"@voyantjs/react": "0.26.
|
|
55
|
+
"@voyantjs/crm": "0.26.4",
|
|
56
|
+
"@voyantjs/react": "0.26.4",
|
|
57
57
|
"@voyantjs/voyant-typescript-config": "0.1.0"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@voyantjs/react": "0.26.
|
|
60
|
+
"@voyantjs/react": "0.26.4"
|
|
61
61
|
},
|
|
62
62
|
"files": [
|
|
63
63
|
"dist"
|