@voyantjs/crm-react 0.26.2 → 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 +5 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +5 -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/hooks/use-person-relationship-mutation.d.ts +60 -0
- package/dist/hooks/use-person-relationship-mutation.d.ts.map +1 -0
- package/dist/hooks/use-person-relationship-mutation.js +40 -0
- package/dist/hooks/use-person-relationships.d.ts +26 -0
- package/dist/hooks/use-person-relationships.d.ts.map +1 -0
- package/dist/hooks/use-person-relationships.js +34 -0
- package/dist/index.d.ts +7 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/query-keys.d.ts +21 -0
- package/dist/query-keys.d.ts.map +1 -1
- package/dist/query-keys.js +5 -0
- package/dist/schemas.d.ts +325 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +74 -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";
|
|
@@ -6,5 +9,7 @@ export { type UsePersonOptions, usePerson } from "./use-person.js";
|
|
|
6
9
|
export { type CreatePersonDocumentFromPlaintextInput, type CreatePersonDocumentInput, type UpdatePersonDocumentFromPlaintextInput, type UpdatePersonDocumentInput, usePersonDocumentMutation, } from "./use-person-document-mutation.js";
|
|
7
10
|
export { type UsePersonDocumentsOptions, usePersonDocuments, } from "./use-person-documents.js";
|
|
8
11
|
export { type CreatePersonInput, type UpdatePersonInput, type UpdatePersonProfilePiiInput, usePersonMutation, } from "./use-person-mutation.js";
|
|
12
|
+
export { type CreatePersonRelationshipInput, type UpdatePersonRelationshipInput, usePersonRelationshipMutation, } from "./use-person-relationship-mutation.js";
|
|
13
|
+
export { type UsePersonRelationshipsOptions, usePersonRelationships, } from "./use-person-relationships.js";
|
|
9
14
|
export { type UsePersonTravelSnapshotOptions, usePersonTravelSnapshot, } from "./use-person-travel-snapshot.js";
|
|
10
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -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,EA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,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";
|
|
@@ -6,4 +9,6 @@ export { usePerson } from "./use-person.js";
|
|
|
6
9
|
export { usePersonDocumentMutation, } from "./use-person-document-mutation.js";
|
|
7
10
|
export { usePersonDocuments, } from "./use-person-documents.js";
|
|
8
11
|
export { usePersonMutation, } from "./use-person-mutation.js";
|
|
12
|
+
export { usePersonRelationshipMutation, } from "./use-person-relationship-mutation.js";
|
|
13
|
+
export { usePersonRelationships, } from "./use-person-relationships.js";
|
|
9
14
|
export { usePersonTravelSnapshot, } from "./use-person-travel-snapshot.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
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type PersonRelationshipKind } from "../schemas.js";
|
|
2
|
+
export interface CreatePersonRelationshipInput {
|
|
3
|
+
toPersonId: string;
|
|
4
|
+
kind: PersonRelationshipKind;
|
|
5
|
+
/** When set, the route auto-writes the symmetric edge. */
|
|
6
|
+
inverseKind?: PersonRelationshipKind | null;
|
|
7
|
+
startDate?: string | null;
|
|
8
|
+
endDate?: string | null;
|
|
9
|
+
isPrimary?: boolean;
|
|
10
|
+
notes?: string | null;
|
|
11
|
+
metadata?: Record<string, unknown> | null;
|
|
12
|
+
/** Pass `false` to skip the symmetric edge even if `inverseKind` is set. */
|
|
13
|
+
autoInverse?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface UpdatePersonRelationshipInput {
|
|
16
|
+
kind?: PersonRelationshipKind;
|
|
17
|
+
inverseKind?: PersonRelationshipKind | null;
|
|
18
|
+
startDate?: string | null;
|
|
19
|
+
endDate?: string | null;
|
|
20
|
+
isPrimary?: boolean;
|
|
21
|
+
notes?: string | null;
|
|
22
|
+
metadata?: Record<string, unknown> | null;
|
|
23
|
+
}
|
|
24
|
+
export declare function usePersonRelationshipMutation(personId: string | undefined): {
|
|
25
|
+
create: import("@tanstack/react-query").UseMutationResult<{
|
|
26
|
+
id: string;
|
|
27
|
+
fromPersonId: string;
|
|
28
|
+
toPersonId: string;
|
|
29
|
+
kind: "other" | "spouse" | "partner" | "parent" | "child" | "sibling" | "guardian" | "ward" | "emergency_contact" | "friend" | "travel_companion";
|
|
30
|
+
inverseKind: "other" | "spouse" | "partner" | "parent" | "child" | "sibling" | "guardian" | "ward" | "emergency_contact" | "friend" | "travel_companion" | null;
|
|
31
|
+
startDate: string | null;
|
|
32
|
+
endDate: string | null;
|
|
33
|
+
isPrimary: boolean;
|
|
34
|
+
notes: string | null;
|
|
35
|
+
metadata: Record<string, unknown> | null;
|
|
36
|
+
createdAt: string;
|
|
37
|
+
updatedAt: string;
|
|
38
|
+
}, Error, CreatePersonRelationshipInput, unknown>;
|
|
39
|
+
update: import("@tanstack/react-query").UseMutationResult<{
|
|
40
|
+
id: string;
|
|
41
|
+
fromPersonId: string;
|
|
42
|
+
toPersonId: string;
|
|
43
|
+
kind: "other" | "spouse" | "partner" | "parent" | "child" | "sibling" | "guardian" | "ward" | "emergency_contact" | "friend" | "travel_companion";
|
|
44
|
+
inverseKind: "other" | "spouse" | "partner" | "parent" | "child" | "sibling" | "guardian" | "ward" | "emergency_contact" | "friend" | "travel_companion" | null;
|
|
45
|
+
startDate: string | null;
|
|
46
|
+
endDate: string | null;
|
|
47
|
+
isPrimary: boolean;
|
|
48
|
+
notes: string | null;
|
|
49
|
+
metadata: Record<string, unknown> | null;
|
|
50
|
+
createdAt: string;
|
|
51
|
+
updatedAt: string;
|
|
52
|
+
}, Error, {
|
|
53
|
+
id: string;
|
|
54
|
+
input: UpdatePersonRelationshipInput;
|
|
55
|
+
}, unknown>;
|
|
56
|
+
remove: import("@tanstack/react-query").UseMutationResult<{
|
|
57
|
+
success: boolean;
|
|
58
|
+
}, Error, string, unknown>;
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=use-person-relationship-mutation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-person-relationship-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-person-relationship-mutation.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,sBAAsB,EAAoC,MAAM,eAAe,CAAA;AAE7F,MAAM,WAAW,6BAA6B;IAC5C,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,sBAAsB,CAAA;IAC5B,0DAA0D;IAC1D,WAAW,CAAC,EAAE,sBAAsB,GAAG,IAAI,CAAA;IAC3C,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;IACzC,4EAA4E;IAC5E,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED,MAAM,WAAW,6BAA6B;IAC5C,IAAI,CAAC,EAAE,sBAAsB,CAAA;IAC7B,WAAW,CAAC,EAAE,sBAAsB,GAAG,IAAI,CAAA;IAC3C,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;CAC1C;AAID,wBAAgB,6BAA6B,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA2B9B,MAAM;eAAS,6BAA6B;;;;;EAwBvF"}
|
|
@@ -0,0 +1,40 @@
|
|
|
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 { personRelationshipSingleResponse } from "../schemas.js";
|
|
8
|
+
const deleteResponseSchema = z.object({ success: z.boolean() });
|
|
9
|
+
export function usePersonRelationshipMutation(personId) {
|
|
10
|
+
const { baseUrl, fetcher } = useVoyantContext();
|
|
11
|
+
const queryClient = useQueryClient();
|
|
12
|
+
const invalidate = () => {
|
|
13
|
+
if (personId) {
|
|
14
|
+
void queryClient.invalidateQueries({
|
|
15
|
+
queryKey: [...crmQueryKeys.person(personId), "relationships"],
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
const create = useMutation({
|
|
20
|
+
mutationFn: async (input) => {
|
|
21
|
+
if (!personId)
|
|
22
|
+
throw new Error("usePersonRelationshipMutation requires a personId");
|
|
23
|
+
const { data } = await fetchWithValidation(`/v1/crm/people/${personId}/relationships`, personRelationshipSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
24
|
+
return data;
|
|
25
|
+
},
|
|
26
|
+
onSuccess: invalidate,
|
|
27
|
+
});
|
|
28
|
+
const update = useMutation({
|
|
29
|
+
mutationFn: async ({ id, input }) => {
|
|
30
|
+
const { data } = await fetchWithValidation(`/v1/crm/person-relationships/${id}`, personRelationshipSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
|
|
31
|
+
return data;
|
|
32
|
+
},
|
|
33
|
+
onSuccess: invalidate,
|
|
34
|
+
});
|
|
35
|
+
const remove = useMutation({
|
|
36
|
+
mutationFn: async (id) => fetchWithValidation(`/v1/crm/person-relationships/${id}`, deleteResponseSchema, { baseUrl, fetcher }, { method: "DELETE" }),
|
|
37
|
+
onSuccess: invalidate,
|
|
38
|
+
});
|
|
39
|
+
return { create, update, remove };
|
|
40
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type PersonRelationshipsListFilters } from "../query-keys.js";
|
|
2
|
+
export interface UsePersonRelationshipsOptions extends PersonRelationshipsListFilters {
|
|
3
|
+
enabled?: boolean;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Lists relationships for a person. Default direction `both` returns
|
|
7
|
+
* the union of incoming and outgoing edges — the typical "Jane's
|
|
8
|
+
* family" UI shape.
|
|
9
|
+
*/
|
|
10
|
+
export declare function usePersonRelationships(personId: string | undefined, options?: UsePersonRelationshipsOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
11
|
+
data: {
|
|
12
|
+
id: string;
|
|
13
|
+
fromPersonId: string;
|
|
14
|
+
toPersonId: string;
|
|
15
|
+
kind: "other" | "spouse" | "partner" | "parent" | "child" | "sibling" | "guardian" | "ward" | "emergency_contact" | "friend" | "travel_companion";
|
|
16
|
+
inverseKind: "other" | "spouse" | "partner" | "parent" | "child" | "sibling" | "guardian" | "ward" | "emergency_contact" | "friend" | "travel_companion" | null;
|
|
17
|
+
startDate: string | null;
|
|
18
|
+
endDate: string | null;
|
|
19
|
+
isPrimary: boolean;
|
|
20
|
+
notes: string | null;
|
|
21
|
+
metadata: Record<string, unknown> | null;
|
|
22
|
+
createdAt: string;
|
|
23
|
+
updatedAt: string;
|
|
24
|
+
}[];
|
|
25
|
+
}, Error>;
|
|
26
|
+
//# sourceMappingURL=use-person-relationships.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-person-relationships.d.ts","sourceRoot":"","sources":["../../src/hooks/use-person-relationships.ts"],"names":[],"mappings":"AAMA,OAAO,EAAgB,KAAK,8BAA8B,EAAE,MAAM,kBAAkB,CAAA;AAGpF,MAAM,WAAW,6BAA8B,SAAQ,8BAA8B;IACnF,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,OAAO,GAAE,6BAAkC;;;;;;;;;;;;;;;UAuB5C"}
|
|
@@ -0,0 +1,34 @@
|
|
|
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 { personRelationshipListResponse } from "../schemas.js";
|
|
7
|
+
/**
|
|
8
|
+
* Lists relationships for a person. Default direction `both` returns
|
|
9
|
+
* the union of incoming and outgoing edges — the typical "Jane's
|
|
10
|
+
* family" UI shape.
|
|
11
|
+
*/
|
|
12
|
+
export function usePersonRelationships(personId, options = {}) {
|
|
13
|
+
const { baseUrl, fetcher } = useVoyantContext();
|
|
14
|
+
const { enabled = true, ...filters } = options;
|
|
15
|
+
return useQuery({
|
|
16
|
+
queryKey: crmQueryKeys.personRelationships(personId ?? "", filters),
|
|
17
|
+
queryFn: async () => {
|
|
18
|
+
if (!personId)
|
|
19
|
+
throw new Error("usePersonRelationships requires a personId");
|
|
20
|
+
const params = new URLSearchParams();
|
|
21
|
+
if (filters.kind)
|
|
22
|
+
params.set("kind", filters.kind);
|
|
23
|
+
if (filters.direction)
|
|
24
|
+
params.set("direction", filters.direction);
|
|
25
|
+
if (filters.limit !== undefined)
|
|
26
|
+
params.set("limit", String(filters.limit));
|
|
27
|
+
if (filters.offset !== undefined)
|
|
28
|
+
params.set("offset", String(filters.offset));
|
|
29
|
+
const qs = params.toString();
|
|
30
|
+
return fetchWithValidation(`/v1/crm/people/${personId}/relationships${qs ? `?${qs}` : ""}`, personRelationshipListResponse, { baseUrl, fetcher });
|
|
31
|
+
},
|
|
32
|
+
enabled: enabled && Boolean(personId),
|
|
33
|
+
});
|
|
34
|
+
}
|
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";
|
|
@@ -13,6 +16,8 @@ export { type UsePersonOptions, usePerson } from "./hooks/use-person.js";
|
|
|
13
16
|
export { type CreatePersonDocumentFromPlaintextInput, type CreatePersonDocumentInput, type UpdatePersonDocumentFromPlaintextInput, type UpdatePersonDocumentInput, usePersonDocumentMutation, } from "./hooks/use-person-document-mutation.js";
|
|
14
17
|
export { type UsePersonDocumentsOptions, usePersonDocuments, } from "./hooks/use-person-documents.js";
|
|
15
18
|
export { type CreatePersonInput, type UpdatePersonInput, type UpdatePersonProfilePiiInput, usePersonMutation, } from "./hooks/use-person-mutation.js";
|
|
19
|
+
export { type CreatePersonRelationshipInput, type UpdatePersonRelationshipInput, usePersonRelationshipMutation, } from "./hooks/use-person-relationship-mutation.js";
|
|
20
|
+
export { type UsePersonRelationshipsOptions, usePersonRelationships, } from "./hooks/use-person-relationships.js";
|
|
16
21
|
export { type UsePersonTravelSnapshotOptions, usePersonTravelSnapshot, } from "./hooks/use-person-travel-snapshot.js";
|
|
17
22
|
export { type CreatePipelineInput, type CreateStageInput, type UpdatePipelineInput, type UpdateStageInput, usePipelineMutation, } from "./hooks/use-pipeline-mutation.js";
|
|
18
23
|
export { type UsePipelineOptions, type UsePipelinesOptions, usePipeline, usePipelines, } from "./hooks/use-pipelines.js";
|
|
@@ -21,7 +26,7 @@ export { type CreateQuoteInput, type CreateQuoteLineInput, type UpdateQuoteInput
|
|
|
21
26
|
export { type UseQuotesOptions, useQuotes, } from "./hooks/use-quotes.js";
|
|
22
27
|
export { type UseStageOptions, type UseStagesOptions, useStage, useStages, } from "./hooks/use-stages.js";
|
|
23
28
|
export { useVoyantContext, type VoyantContextValue, VoyantProvider, type VoyantProviderProps, } from "./provider.js";
|
|
24
|
-
export { type ActivitiesListFilters, crmQueryKeys, type OpportunitiesListFilters, type OrganizationsListFilters, type PeopleListFilters, type PersonDocumentsListFilters, 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";
|
|
25
30
|
export { getActivitiesQueryOptions, getOpportunitiesQueryOptions, getOpportunityQueryOptions, getOrganizationQueryOptions, getOrganizationsQueryOptions, getPeopleQueryOptions, getPersonActivitiesQueryOptions, getPersonNotesQueryOptions, getPersonOpportunitiesQueryOptions, getPersonQueryOptions, getPipelineQueryOptions, getPipelinesQueryOptions, getQuoteLinesQueryOptions, getQuoteQueryOptions, getQuotesQueryOptions, getStageQueryOptions, getStagesQueryOptions, } from "./query-options.js";
|
|
26
|
-
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 PersonTravelSnapshotRecord, type PipelineRecord, personDocumentRecordSchema, personDocumentTypeSchema, personNoteRecordSchema, personRecordSchema, 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";
|
|
27
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,gBAAgB,GACjB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,m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EACvB,wBAAwB,EACxB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,0BAA0B,EAC/B,KAAK,cAAc,EACnB,0BAA0B,EAC1B,wBAAwB,EACxB,sBAAsB,EACtB,kBAAkB,EAClB,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,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,yBAAyB,GAC1B,MAAM,yCAAyC,CAAA;AAChD,OAAO,EACL,KAAK,kCAAkC,EACvC,KAAK,yBAAyB,EAC9B,kBAAkB,EAClB,2BAA2B,GAC5B,MAAM,iCAAiC,CAAA;AACxC,OAAO,EACL,KAAK,uBAAuB,EAC5B,gBAAgB,GACjB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EACL,KAAK,qBAAqB,EAC1B,cAAc,GACf,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAC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,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";
|
|
@@ -13,6 +16,8 @@ export { usePerson } from "./hooks/use-person.js";
|
|
|
13
16
|
export { usePersonDocumentMutation, } from "./hooks/use-person-document-mutation.js";
|
|
14
17
|
export { usePersonDocuments, } from "./hooks/use-person-documents.js";
|
|
15
18
|
export { usePersonMutation, } from "./hooks/use-person-mutation.js";
|
|
19
|
+
export { usePersonRelationshipMutation, } from "./hooks/use-person-relationship-mutation.js";
|
|
20
|
+
export { usePersonRelationships, } from "./hooks/use-person-relationships.js";
|
|
16
21
|
export { usePersonTravelSnapshot, } from "./hooks/use-person-travel-snapshot.js";
|
|
17
22
|
export { usePipelineMutation, } from "./hooks/use-pipeline-mutation.js";
|
|
18
23
|
export { usePipeline, usePipelines, } from "./hooks/use-pipelines.js";
|
|
@@ -23,4 +28,4 @@ export { useStage, useStages, } from "./hooks/use-stages.js";
|
|
|
23
28
|
export { useVoyantContext, VoyantProvider, } from "./provider.js";
|
|
24
29
|
export { crmQueryKeys, } from "./query-keys.js";
|
|
25
30
|
export { getActivitiesQueryOptions, getOpportunitiesQueryOptions, getOpportunityQueryOptions, getOrganizationQueryOptions, getOrganizationsQueryOptions, getPeopleQueryOptions, getPersonActivitiesQueryOptions, getPersonNotesQueryOptions, getPersonOpportunitiesQueryOptions, getPersonQueryOptions, getPipelineQueryOptions, getPipelinesQueryOptions, getQuoteLinesQueryOptions, getQuoteQueryOptions, getQuotesQueryOptions, getStageQueryOptions, getStagesQueryOptions, } from "./query-options.js";
|
|
26
|
-
export { activityLinkRecordSchema, activityRecordSchema, kmsEnvelopeRecordSchema, opportunityRecordSchema, organizationRecordSchema, personDocumentRecordSchema, personDocumentTypeSchema, personNoteRecordSchema, personRecordSchema, 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,22 @@ 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
|
+
}
|
|
69
|
+
export interface PersonRelationshipsListFilters {
|
|
70
|
+
kind?: string | undefined;
|
|
71
|
+
direction?: "from" | "to" | "both" | undefined;
|
|
72
|
+
limit?: number | undefined;
|
|
73
|
+
offset?: number | undefined;
|
|
74
|
+
}
|
|
59
75
|
export interface PersonDocumentsListFilters {
|
|
60
76
|
type?: string | undefined;
|
|
61
77
|
expiringBefore?: string | undefined;
|
|
@@ -70,6 +86,11 @@ export declare const crmQueryKeys: {
|
|
|
70
86
|
readonly personDocuments: (personId: string, filters?: PersonDocumentsListFilters) => readonly ["voyant", "crm", "people", "detail", string, "documents", PersonDocumentsListFilters];
|
|
71
87
|
readonly personDocument: (id: string) => readonly ["voyant", "crm", "person-documents", "detail", string];
|
|
72
88
|
readonly personTravelSnapshot: (personId: string) => readonly ["voyant", "crm", "people", "detail", string, "travel-snapshot"];
|
|
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"];
|
|
73
94
|
readonly organizations: () => readonly ["voyant", "crm", "organizations"];
|
|
74
95
|
readonly organizationsList: (filters: OrganizationsListFilters) => readonly ["voyant", "crm", "organizations", "list", OrganizationsListFilters];
|
|
75
96
|
readonly organization: (id: string) => readonly ["voyant", "crm", "organizations", "detail", string];
|
package/dist/query-keys.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-keys.d.ts","sourceRoot":"","sources":["../src/query-keys.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACnC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC5B;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC5B;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;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CAAA;CAC5B;AAED,eAAO,MAAM,YAAY;;;mCAID,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
|
@@ -10,6 +10,11 @@ export const crmQueryKeys = {
|
|
|
10
10
|
personDocuments: (personId, filters = {}) => [...crmQueryKeys.person(personId), "documents", filters],
|
|
11
11
|
personDocument: (id) => [...crmQueryKeys.all, "person-documents", "detail", id],
|
|
12
12
|
personTravelSnapshot: (personId) => [...crmQueryKeys.person(personId), "travel-snapshot"],
|
|
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"],
|
|
13
18
|
organizations: () => [...crmQueryKeys.all, "organizations"],
|
|
14
19
|
organizationsList: (filters) => [...crmQueryKeys.organizations(), "list", filters],
|
|
15
20
|
organization: (id) => [...crmQueryKeys.organizations(), "detail", id],
|
package/dist/schemas.d.ts
CHANGED
|
@@ -563,6 +563,331 @@ 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>;
|
|
758
|
+
export declare const personRelationshipKindSchema: z.ZodEnum<{
|
|
759
|
+
other: "other";
|
|
760
|
+
spouse: "spouse";
|
|
761
|
+
partner: "partner";
|
|
762
|
+
parent: "parent";
|
|
763
|
+
child: "child";
|
|
764
|
+
sibling: "sibling";
|
|
765
|
+
guardian: "guardian";
|
|
766
|
+
ward: "ward";
|
|
767
|
+
emergency_contact: "emergency_contact";
|
|
768
|
+
friend: "friend";
|
|
769
|
+
travel_companion: "travel_companion";
|
|
770
|
+
}>;
|
|
771
|
+
export type PersonRelationshipKind = z.infer<typeof personRelationshipKindSchema>;
|
|
772
|
+
export declare const personRelationshipRecordSchema: z.ZodObject<{
|
|
773
|
+
id: z.ZodString;
|
|
774
|
+
fromPersonId: z.ZodString;
|
|
775
|
+
toPersonId: z.ZodString;
|
|
776
|
+
kind: z.ZodEnum<{
|
|
777
|
+
other: "other";
|
|
778
|
+
spouse: "spouse";
|
|
779
|
+
partner: "partner";
|
|
780
|
+
parent: "parent";
|
|
781
|
+
child: "child";
|
|
782
|
+
sibling: "sibling";
|
|
783
|
+
guardian: "guardian";
|
|
784
|
+
ward: "ward";
|
|
785
|
+
emergency_contact: "emergency_contact";
|
|
786
|
+
friend: "friend";
|
|
787
|
+
travel_companion: "travel_companion";
|
|
788
|
+
}>;
|
|
789
|
+
inverseKind: z.ZodNullable<z.ZodEnum<{
|
|
790
|
+
other: "other";
|
|
791
|
+
spouse: "spouse";
|
|
792
|
+
partner: "partner";
|
|
793
|
+
parent: "parent";
|
|
794
|
+
child: "child";
|
|
795
|
+
sibling: "sibling";
|
|
796
|
+
guardian: "guardian";
|
|
797
|
+
ward: "ward";
|
|
798
|
+
emergency_contact: "emergency_contact";
|
|
799
|
+
friend: "friend";
|
|
800
|
+
travel_companion: "travel_companion";
|
|
801
|
+
}>>;
|
|
802
|
+
startDate: z.ZodNullable<z.ZodString>;
|
|
803
|
+
endDate: z.ZodNullable<z.ZodString>;
|
|
804
|
+
isPrimary: z.ZodBoolean;
|
|
805
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
806
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
807
|
+
createdAt: z.ZodString;
|
|
808
|
+
updatedAt: z.ZodString;
|
|
809
|
+
}, z.core.$strip>;
|
|
810
|
+
export type PersonRelationshipRecord = z.infer<typeof personRelationshipRecordSchema>;
|
|
811
|
+
export declare const personRelationshipListResponse: z.ZodObject<{
|
|
812
|
+
data: z.ZodArray<z.ZodObject<{
|
|
813
|
+
id: z.ZodString;
|
|
814
|
+
fromPersonId: z.ZodString;
|
|
815
|
+
toPersonId: z.ZodString;
|
|
816
|
+
kind: z.ZodEnum<{
|
|
817
|
+
other: "other";
|
|
818
|
+
spouse: "spouse";
|
|
819
|
+
partner: "partner";
|
|
820
|
+
parent: "parent";
|
|
821
|
+
child: "child";
|
|
822
|
+
sibling: "sibling";
|
|
823
|
+
guardian: "guardian";
|
|
824
|
+
ward: "ward";
|
|
825
|
+
emergency_contact: "emergency_contact";
|
|
826
|
+
friend: "friend";
|
|
827
|
+
travel_companion: "travel_companion";
|
|
828
|
+
}>;
|
|
829
|
+
inverseKind: z.ZodNullable<z.ZodEnum<{
|
|
830
|
+
other: "other";
|
|
831
|
+
spouse: "spouse";
|
|
832
|
+
partner: "partner";
|
|
833
|
+
parent: "parent";
|
|
834
|
+
child: "child";
|
|
835
|
+
sibling: "sibling";
|
|
836
|
+
guardian: "guardian";
|
|
837
|
+
ward: "ward";
|
|
838
|
+
emergency_contact: "emergency_contact";
|
|
839
|
+
friend: "friend";
|
|
840
|
+
travel_companion: "travel_companion";
|
|
841
|
+
}>>;
|
|
842
|
+
startDate: z.ZodNullable<z.ZodString>;
|
|
843
|
+
endDate: z.ZodNullable<z.ZodString>;
|
|
844
|
+
isPrimary: z.ZodBoolean;
|
|
845
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
846
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
847
|
+
createdAt: z.ZodString;
|
|
848
|
+
updatedAt: z.ZodString;
|
|
849
|
+
}, z.core.$strip>>;
|
|
850
|
+
}, z.core.$strip>;
|
|
851
|
+
export declare const personRelationshipSingleResponse: z.ZodObject<{
|
|
852
|
+
data: z.ZodObject<{
|
|
853
|
+
id: z.ZodString;
|
|
854
|
+
fromPersonId: z.ZodString;
|
|
855
|
+
toPersonId: z.ZodString;
|
|
856
|
+
kind: z.ZodEnum<{
|
|
857
|
+
other: "other";
|
|
858
|
+
spouse: "spouse";
|
|
859
|
+
partner: "partner";
|
|
860
|
+
parent: "parent";
|
|
861
|
+
child: "child";
|
|
862
|
+
sibling: "sibling";
|
|
863
|
+
guardian: "guardian";
|
|
864
|
+
ward: "ward";
|
|
865
|
+
emergency_contact: "emergency_contact";
|
|
866
|
+
friend: "friend";
|
|
867
|
+
travel_companion: "travel_companion";
|
|
868
|
+
}>;
|
|
869
|
+
inverseKind: z.ZodNullable<z.ZodEnum<{
|
|
870
|
+
other: "other";
|
|
871
|
+
spouse: "spouse";
|
|
872
|
+
partner: "partner";
|
|
873
|
+
parent: "parent";
|
|
874
|
+
child: "child";
|
|
875
|
+
sibling: "sibling";
|
|
876
|
+
guardian: "guardian";
|
|
877
|
+
ward: "ward";
|
|
878
|
+
emergency_contact: "emergency_contact";
|
|
879
|
+
friend: "friend";
|
|
880
|
+
travel_companion: "travel_companion";
|
|
881
|
+
}>>;
|
|
882
|
+
startDate: z.ZodNullable<z.ZodString>;
|
|
883
|
+
endDate: z.ZodNullable<z.ZodString>;
|
|
884
|
+
isPrimary: z.ZodBoolean;
|
|
885
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
886
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
887
|
+
createdAt: z.ZodString;
|
|
888
|
+
updatedAt: z.ZodString;
|
|
889
|
+
}, z.core.$strip>;
|
|
890
|
+
}, z.core.$strip>;
|
|
566
891
|
export declare const personTravelSnapshotSchema: z.ZodObject<{
|
|
567
892
|
dateOfBirth: z.ZodNullable<z.ZodString>;
|
|
568
893
|
dietaryRequirements: z.ZodNullable<z.ZodString>;
|
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,CA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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);
|
|
238
|
+
export const personRelationshipKindSchema = z.enum([
|
|
239
|
+
"spouse",
|
|
240
|
+
"partner",
|
|
241
|
+
"parent",
|
|
242
|
+
"child",
|
|
243
|
+
"sibling",
|
|
244
|
+
"guardian",
|
|
245
|
+
"ward",
|
|
246
|
+
"emergency_contact",
|
|
247
|
+
"friend",
|
|
248
|
+
"travel_companion",
|
|
249
|
+
"other",
|
|
250
|
+
]);
|
|
251
|
+
export const personRelationshipRecordSchema = z.object({
|
|
252
|
+
id: z.string(),
|
|
253
|
+
fromPersonId: z.string(),
|
|
254
|
+
toPersonId: z.string(),
|
|
255
|
+
kind: personRelationshipKindSchema,
|
|
256
|
+
inverseKind: personRelationshipKindSchema.nullable(),
|
|
257
|
+
startDate: z.string().nullable(),
|
|
258
|
+
endDate: z.string().nullable(),
|
|
259
|
+
isPrimary: z.boolean(),
|
|
260
|
+
notes: z.string().nullable(),
|
|
261
|
+
metadata: z.record(z.string(), z.unknown()).nullable(),
|
|
262
|
+
createdAt: z.string(),
|
|
263
|
+
updatedAt: z.string(),
|
|
264
|
+
});
|
|
265
|
+
export const personRelationshipListResponse = listEnvelope(personRelationshipRecordSchema);
|
|
266
|
+
export const personRelationshipSingleResponse = singleEnvelope(personRelationshipRecordSchema);
|
|
193
267
|
export const personTravelSnapshotSchema = z.object({
|
|
194
268
|
dateOfBirth: z.string().nullable(),
|
|
195
269
|
dietaryRequirements: z.string().nullable(),
|
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"
|