@voyant-travel/quotes-react 0.135.0 → 0.135.1

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.
@@ -11,7 +11,7 @@ export function usePipelineMutation() {
11
11
  const queryClient = useQueryClient();
12
12
  const createPipeline = useMutation({
13
13
  mutationFn: async (input) => {
14
- const { data } = await fetchWithValidation("/v1/quotes/pipelines", pipelineSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
14
+ const { data } = await fetchWithValidation("/v1/admin/quotes/pipelines", pipelineSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
15
15
  return data;
16
16
  },
17
17
  onSuccess: () => {
@@ -20,7 +20,7 @@ export function usePipelineMutation() {
20
20
  });
21
21
  const updatePipeline = useMutation({
22
22
  mutationFn: async ({ id, input }) => {
23
- const { data } = await fetchWithValidation(`/v1/quotes/pipelines/${id}`, pipelineSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
23
+ const { data } = await fetchWithValidation(`/v1/admin/quotes/pipelines/${id}`, pipelineSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
24
24
  return data;
25
25
  },
26
26
  onSuccess: (data) => {
@@ -30,7 +30,7 @@ export function usePipelineMutation() {
30
30
  });
31
31
  const removePipeline = useMutation({
32
32
  mutationFn: async (id) => {
33
- return fetchWithValidation(`/v1/quotes/pipelines/${id}`, deleteResponseSchema, { baseUrl, fetcher }, { method: "DELETE" });
33
+ return fetchWithValidation(`/v1/admin/quotes/pipelines/${id}`, deleteResponseSchema, { baseUrl, fetcher }, { method: "DELETE" });
34
34
  },
35
35
  onSuccess: (_data, id) => {
36
36
  void queryClient.invalidateQueries({ queryKey: quotesQueryKeys.pipelines() });
@@ -39,7 +39,7 @@ export function usePipelineMutation() {
39
39
  });
40
40
  const createStage = useMutation({
41
41
  mutationFn: async (input) => {
42
- const { data } = await fetchWithValidation("/v1/quotes/stages", stageSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
42
+ const { data } = await fetchWithValidation("/v1/admin/quotes/stages", stageSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
43
43
  return data;
44
44
  },
45
45
  onSuccess: () => {
@@ -48,7 +48,7 @@ export function usePipelineMutation() {
48
48
  });
49
49
  const updateStage = useMutation({
50
50
  mutationFn: async ({ id, input }) => {
51
- const { data } = await fetchWithValidation(`/v1/quotes/stages/${id}`, stageSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
51
+ const { data } = await fetchWithValidation(`/v1/admin/quotes/stages/${id}`, stageSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
52
52
  return data;
53
53
  },
54
54
  onSuccess: (data) => {
@@ -58,7 +58,7 @@ export function usePipelineMutation() {
58
58
  });
59
59
  const removeStage = useMutation({
60
60
  mutationFn: async (id) => {
61
- return fetchWithValidation(`/v1/quotes/stages/${id}`, deleteResponseSchema, { baseUrl, fetcher }, { method: "DELETE" });
61
+ return fetchWithValidation(`/v1/admin/quotes/stages/${id}`, deleteResponseSchema, { baseUrl, fetcher }, { method: "DELETE" });
62
62
  },
63
63
  onSuccess: (_data, id) => {
64
64
  void queryClient.invalidateQueries({ queryKey: quotesQueryKeys.stages() });
@@ -18,7 +18,7 @@ export function usePipelines(options = {}) {
18
18
  if (filters.offset !== undefined)
19
19
  params.set("offset", String(filters.offset));
20
20
  const qs = params.toString();
21
- return fetchWithValidation(`/v1/quotes/pipelines${qs ? `?${qs}` : ""}`, pipelineListResponse, {
21
+ return fetchWithValidation(`/v1/admin/quotes/pipelines${qs ? `?${qs}` : ""}`, pipelineListResponse, {
22
22
  baseUrl,
23
23
  fetcher,
24
24
  });
@@ -34,7 +34,7 @@ export function usePipeline(id, options = {}) {
34
34
  queryFn: async () => {
35
35
  if (!id)
36
36
  throw new Error("usePipeline requires an id");
37
- const { data } = await fetchWithValidation(`/v1/quotes/pipelines/${id}`, pipelineSingleResponse, { baseUrl, fetcher });
37
+ const { data } = await fetchWithValidation(`/v1/admin/quotes/pipelines/${id}`, pipelineSingleResponse, { baseUrl, fetcher });
38
38
  return data;
39
39
  },
40
40
  enabled: enabled && Boolean(id),
@@ -7,7 +7,7 @@ export interface CreateQuoteMediaInput {
7
7
  fileSize?: number | null;
8
8
  altText?: string | null;
9
9
  }
10
- /** Attach / remove quote media (the upload itself goes through `/v1/uploads`). */
10
+ /** Attach / remove quote media (the upload itself goes through `/v1/admin/uploads`). */
11
11
  export declare function useQuoteMediaMutation(): {
12
12
  create: import("@tanstack/react-query").UseMutationResult<{
13
13
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"use-quote-media-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-quote-media-mutation.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,qBAAqB;IACpC,SAAS,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,UAAU,CAAA;IAC1C,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACxB;AAED,kFAAkF;AAClF,wBAAgB,qBAAqB;;;;;;;;;;;;;;;iBASiB,MAAM;eAAS,qBAAqB;;;;;;;;;;;;;;;;iBAgBrC,MAAM;cAAQ,IAAI;;;YA0ClC,MAAM;iBAAW,MAAM;;EAY3D"}
1
+ {"version":3,"file":"use-quote-media-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-quote-media-mutation.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,qBAAqB;IACpC,SAAS,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,UAAU,CAAA;IAC1C,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACxB;AAED,wFAAwF;AACxF,wBAAgB,qBAAqB;;;;;;;;;;;;;;;iBASiB,MAAM;eAAS,qBAAqB;;;;;;;;;;;;;;;;iBAgBrC,MAAM;cAAQ,IAAI;;;YA0ClC,MAAM;iBAAW,MAAM;;EAY3D"}
@@ -4,7 +4,7 @@ import { fetchWithValidation } from "../client.js";
4
4
  import { useVoyantContext } from "../provider.js";
5
5
  import { quotesQueryKeys } from "../query-keys.js";
6
6
  import { quoteMediaSingleResponse, successEnvelope } from "../schemas.js";
7
- /** Attach / remove quote media (the upload itself goes through `/v1/uploads`). */
7
+ /** Attach / remove quote media (the upload itself goes through `/v1/admin/uploads`). */
8
8
  export function useQuoteMediaMutation() {
9
9
  const { baseUrl, fetcher } = useVoyantContext();
10
10
  const queryClient = useQueryClient();
@@ -13,19 +13,19 @@ export function useQuoteMediaMutation() {
13
13
  };
14
14
  const create = useMutation({
15
15
  mutationFn: async ({ quoteId, input }) => {
16
- const { data } = await fetchWithValidation(`/v1/quotes/quotes/${quoteId}/media`, quoteMediaSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
16
+ const { data } = await fetchWithValidation(`/v1/admin/quotes/quotes/${quoteId}/media`, quoteMediaSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
17
17
  return data;
18
18
  },
19
19
  onSuccess: (_data, vars) => invalidate(vars.quoteId),
20
20
  });
21
- // Upload a file to the deployment's media store (`/v1/uploads`), then attach
21
+ // Upload a file to the deployment's media store (`/v1/admin/uploads`), then attach
22
22
  // the resulting object to the quote. Multipart upload uses a raw cookie-auth
23
23
  // fetch (the shared JSON fetcher can't carry FormData).
24
24
  const upload = useMutation({
25
25
  mutationFn: async ({ quoteId, file }) => {
26
26
  const form = new FormData();
27
27
  form.append("file", file);
28
- const res = await fetch(`${baseUrl}/v1/uploads`, {
28
+ const res = await fetch(`${baseUrl}/v1/admin/uploads`, {
29
29
  method: "POST",
30
30
  body: form,
31
31
  credentials: "include",
@@ -38,7 +38,7 @@ export function useQuoteMediaMutation() {
38
38
  : uploaded.mimeType.startsWith("image/")
39
39
  ? "image"
40
40
  : "document";
41
- const { data } = await fetchWithValidation(`/v1/quotes/quotes/${quoteId}/media`, quoteMediaSingleResponse, { baseUrl, fetcher }, {
41
+ const { data } = await fetchWithValidation(`/v1/admin/quotes/quotes/${quoteId}/media`, quoteMediaSingleResponse, { baseUrl, fetcher }, {
42
42
  method: "POST",
43
43
  body: JSON.stringify({
44
44
  mediaType,
@@ -55,7 +55,7 @@ export function useQuoteMediaMutation() {
55
55
  });
56
56
  const remove = useMutation({
57
57
  mutationFn: async ({ id }) => {
58
- await fetchWithValidation(`/v1/quotes/quote-media/${id}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" });
58
+ await fetchWithValidation(`/v1/admin/quotes/quote-media/${id}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" });
59
59
  },
60
60
  onSuccess: (_data, vars) => invalidate(vars.quoteId),
61
61
  });
@@ -10,7 +10,7 @@ export function useQuoteMedia(quoteId, options = {}) {
10
10
  const { enabled = true } = options;
11
11
  return useQuery({
12
12
  queryKey: quotesQueryKeys.quoteMedia(quoteId ?? ""),
13
- queryFn: () => fetchWithValidation(`/v1/quotes/quotes/${quoteId}/media`, quoteMediaListResponse, {
13
+ queryFn: () => fetchWithValidation(`/v1/admin/quotes/quotes/${quoteId}/media`, quoteMediaListResponse, {
14
14
  baseUrl,
15
15
  fetcher,
16
16
  }),
@@ -11,7 +11,7 @@ export function useQuoteMutation() {
11
11
  const queryClient = useQueryClient();
12
12
  const create = useMutation({
13
13
  mutationFn: async (input) => {
14
- const { data } = await fetchWithValidation("/v1/quotes/quotes", quoteSingleResponse, {
14
+ const { data } = await fetchWithValidation("/v1/admin/quotes/quotes", quoteSingleResponse, {
15
15
  baseUrl,
16
16
  fetcher,
17
17
  }, { method: "POST", body: JSON.stringify(input) });
@@ -23,7 +23,7 @@ export function useQuoteMutation() {
23
23
  });
24
24
  const update = useMutation({
25
25
  mutationFn: async ({ id, input }) => {
26
- const { data } = await fetchWithValidation(`/v1/quotes/quotes/${id}`, quoteSingleResponse, {
26
+ const { data } = await fetchWithValidation(`/v1/admin/quotes/quotes/${id}`, quoteSingleResponse, {
27
27
  baseUrl,
28
28
  fetcher,
29
29
  }, { method: "PATCH", body: JSON.stringify(input) });
@@ -36,7 +36,7 @@ export function useQuoteMutation() {
36
36
  });
37
37
  const remove = useMutation({
38
38
  mutationFn: async (id) => {
39
- return fetchWithValidation(`/v1/quotes/quotes/${id}`, deleteResponseSchema, {
39
+ return fetchWithValidation(`/v1/admin/quotes/quotes/${id}`, deleteResponseSchema, {
40
40
  baseUrl,
41
41
  fetcher,
42
42
  }, { method: "DELETE" });
@@ -13,14 +13,14 @@ export function useQuoteParticipantMutation() {
13
13
  };
14
14
  const create = useMutation({
15
15
  mutationFn: async ({ quoteId, input, }) => {
16
- const { data } = await fetchWithValidation(`/v1/quotes/quotes/${quoteId}/participants`, quoteParticipantSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
16
+ const { data } = await fetchWithValidation(`/v1/admin/quotes/quotes/${quoteId}/participants`, quoteParticipantSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
17
17
  return data;
18
18
  },
19
19
  onSuccess: (_data, vars) => invalidate(vars.quoteId),
20
20
  });
21
21
  const remove = useMutation({
22
22
  mutationFn: async ({ id }) => {
23
- await fetchWithValidation(`/v1/quotes/quote-participants/${id}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" });
23
+ await fetchWithValidation(`/v1/admin/quotes/quote-participants/${id}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" });
24
24
  },
25
25
  onSuccess: (_data, vars) => invalidate(vars.quoteId),
26
26
  });
@@ -10,7 +10,7 @@ export function useQuoteParticipants(quoteId, options = {}) {
10
10
  const { enabled = true } = options;
11
11
  return useQuery({
12
12
  queryKey: quotesQueryKeys.quoteParticipants(quoteId ?? ""),
13
- queryFn: () => fetchWithValidation(`/v1/quotes/quotes/${quoteId}/participants`, quoteParticipantListResponse, { baseUrl, fetcher }),
13
+ queryFn: () => fetchWithValidation(`/v1/admin/quotes/quotes/${quoteId}/participants`, quoteParticipantListResponse, { baseUrl, fetcher }),
14
14
  enabled: enabled && Boolean(quoteId),
15
15
  });
16
16
  }
@@ -14,21 +14,21 @@ export function useQuoteProductMutation() {
14
14
  };
15
15
  const create = useMutation({
16
16
  mutationFn: async ({ quoteId, input }) => {
17
- const { data } = await fetchWithValidation(`/v1/quotes/quotes/${quoteId}/products`, quoteProductSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
17
+ const { data } = await fetchWithValidation(`/v1/admin/quotes/quotes/${quoteId}/products`, quoteProductSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
18
18
  return data;
19
19
  },
20
20
  onSuccess: (_data, vars) => invalidate(vars.quoteId),
21
21
  });
22
22
  const update = useMutation({
23
23
  mutationFn: async ({ id, input, }) => {
24
- const { data } = await fetchWithValidation(`/v1/quotes/quote-products/${id}`, quoteProductSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
24
+ const { data } = await fetchWithValidation(`/v1/admin/quotes/quote-products/${id}`, quoteProductSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
25
25
  return data;
26
26
  },
27
27
  onSuccess: (_data, vars) => invalidate(vars.quoteId),
28
28
  });
29
29
  const remove = useMutation({
30
30
  mutationFn: async ({ id }) => {
31
- await fetchWithValidation(`/v1/quotes/quote-products/${id}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" });
31
+ await fetchWithValidation(`/v1/admin/quotes/quote-products/${id}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" });
32
32
  },
33
33
  onSuccess: (_data, vars) => invalidate(vars.quoteId),
34
34
  });
@@ -10,7 +10,7 @@ export function useQuoteProducts(quoteId, options = {}) {
10
10
  const { enabled = true } = options;
11
11
  return useQuery({
12
12
  queryKey: quotesQueryKeys.quoteProducts(quoteId ?? ""),
13
- queryFn: () => fetchWithValidation(`/v1/quotes/quotes/${quoteId}/products`, quoteProductListResponse, {
13
+ queryFn: () => fetchWithValidation(`/v1/admin/quotes/quotes/${quoteId}/products`, quoteProductListResponse, {
14
14
  baseUrl,
15
15
  fetcher,
16
16
  }),
@@ -12,7 +12,7 @@ export function useQuoteVersionMutation() {
12
12
  const queryClient = useQueryClient();
13
13
  const create = useMutation({
14
14
  mutationFn: async ({ quoteId, input }) => {
15
- const { data } = await fetchWithValidation(`/v1/quotes/quotes/${quoteId}/versions`, quoteVersionSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
15
+ const { data } = await fetchWithValidation(`/v1/admin/quotes/quotes/${quoteId}/versions`, quoteVersionSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
16
16
  return data;
17
17
  },
18
18
  onSuccess: (_data, vars) => {
@@ -28,7 +28,7 @@ export function useQuoteVersionMutation() {
28
28
  // and supersedes the prior current version.
29
29
  const snapshot = useMutation({
30
30
  mutationFn: async ({ quoteId }) => {
31
- const { data } = await fetchWithValidation(`/v1/quotes/quotes/${quoteId}/versions/snapshot`, quoteVersionSingleResponse, { baseUrl, fetcher }, { method: "POST" });
31
+ const { data } = await fetchWithValidation(`/v1/admin/quotes/quotes/${quoteId}/versions/snapshot`, quoteVersionSingleResponse, { baseUrl, fetcher }, { method: "POST" });
32
32
  return data;
33
33
  },
34
34
  onSuccess: (_data, vars) => {
@@ -43,7 +43,7 @@ export function useQuoteVersionMutation() {
43
43
  // defaults that would clobber status/totals — see the service note).
44
44
  const setValidUntil = useMutation({
45
45
  mutationFn: async ({ id, validUntil }) => {
46
- const { data } = await fetchWithValidation(`/v1/quotes/quote-versions/${id}/validity`, quoteVersionSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify({ validUntil }) });
46
+ const { data } = await fetchWithValidation(`/v1/admin/quotes/quote-versions/${id}/validity`, quoteVersionSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify({ validUntil }) });
47
47
  return data;
48
48
  },
49
49
  onSuccess: (data) => {
@@ -79,7 +79,7 @@ export function useQuoteVersionMutation() {
79
79
  });
80
80
  const update = useMutation({
81
81
  mutationFn: async ({ id, input }) => {
82
- const { data } = await fetchWithValidation(`/v1/quotes/quote-versions/${id}`, quoteVersionSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
82
+ const { data } = await fetchWithValidation(`/v1/admin/quotes/quote-versions/${id}`, quoteVersionSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
83
83
  return data;
84
84
  },
85
85
  onSuccess: (data) => {
@@ -90,7 +90,7 @@ export function useQuoteVersionMutation() {
90
90
  });
91
91
  const remove = useMutation({
92
92
  mutationFn: async (id) => {
93
- return fetchWithValidation(`/v1/quotes/quote-versions/${id}`, deleteResponseSchema, { baseUrl, fetcher }, { method: "DELETE" });
93
+ return fetchWithValidation(`/v1/admin/quotes/quote-versions/${id}`, deleteResponseSchema, { baseUrl, fetcher }, { method: "DELETE" });
94
94
  },
95
95
  onSuccess: (_data, id) => {
96
96
  void queryClient.invalidateQueries({ queryKey: quotesQueryKeys.quoteVersions() });
@@ -99,7 +99,7 @@ export function useQuoteVersionMutation() {
99
99
  });
100
100
  const send = useMutation({
101
101
  mutationFn: async ({ id, input }) => {
102
- const { data } = await fetchWithValidation(`/v1/quotes/quote-versions/${id}/send`, quoteVersionSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input ?? {}) });
102
+ const { data } = await fetchWithValidation(`/v1/admin/quotes/quote-versions/${id}/send`, quoteVersionSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input ?? {}) });
103
103
  return data;
104
104
  },
105
105
  onSuccess: (data) => {
@@ -110,7 +110,7 @@ export function useQuoteVersionMutation() {
110
110
  });
111
111
  const view = useMutation({
112
112
  mutationFn: async (id) => {
113
- const { data } = await fetchWithValidation(`/v1/quotes/quote-versions/${id}/view`, quoteVersionSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify({}) });
113
+ const { data } = await fetchWithValidation(`/v1/admin/quotes/quote-versions/${id}/view`, quoteVersionSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify({}) });
114
114
  return data;
115
115
  },
116
116
  onSuccess: (data) => {
@@ -120,7 +120,7 @@ export function useQuoteVersionMutation() {
120
120
  });
121
121
  const decline = useMutation({
122
122
  mutationFn: async (id) => {
123
- const { data } = await fetchWithValidation(`/v1/quotes/quote-versions/${id}/decline`, quoteVersionSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify({}) });
123
+ const { data } = await fetchWithValidation(`/v1/admin/quotes/quote-versions/${id}/decline`, quoteVersionSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify({}) });
124
124
  return data;
125
125
  },
126
126
  onSuccess: (data) => {
@@ -131,7 +131,7 @@ export function useQuoteVersionMutation() {
131
131
  });
132
132
  const accept = useMutation({
133
133
  mutationFn: async (id) => {
134
- const { data } = await fetchWithValidation(`/v1/quotes/quote-versions/${id}/accept`, acceptQuoteVersionResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify({}) });
134
+ const { data } = await fetchWithValidation(`/v1/admin/quotes/quote-versions/${id}/accept`, acceptQuoteVersionResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify({}) });
135
135
  return data;
136
136
  },
137
137
  onSuccess: (data) => {
@@ -148,7 +148,7 @@ export function useQuoteVersionMutation() {
148
148
  });
149
149
  const expire = useMutation({
150
150
  mutationFn: async (input) => {
151
- const { data } = await fetchWithValidation("/v1/quotes/quote-versions/expire", quoteVersionArrayResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input ?? {}) });
151
+ const { data } = await fetchWithValidation("/v1/admin/quotes/quote-versions/expire", quoteVersionArrayResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input ?? {}) });
152
152
  return data;
153
153
  },
154
154
  onSuccess: (data) => {
@@ -163,7 +163,7 @@ export function useQuoteVersionMutation() {
163
163
  });
164
164
  const createLine = useMutation({
165
165
  mutationFn: async ({ quoteVersionId, input, }) => {
166
- const { data } = await fetchWithValidation(`/v1/quotes/quote-versions/${quoteVersionId}/lines`, quoteVersionLineSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
166
+ const { data } = await fetchWithValidation(`/v1/admin/quotes/quote-versions/${quoteVersionId}/lines`, quoteVersionLineSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
167
167
  return data;
168
168
  },
169
169
  onSuccess: (_data, vars) => {
@@ -177,7 +177,7 @@ export function useQuoteVersionMutation() {
177
177
  });
178
178
  const updateLine = useMutation({
179
179
  mutationFn: async ({ quoteVersionId: _quoteVersionId, lineId, input, }) => {
180
- const { data } = await fetchWithValidation(`/v1/quotes/quote-version-lines/${lineId}`, quoteVersionLineSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
180
+ const { data } = await fetchWithValidation(`/v1/admin/quotes/quote-version-lines/${lineId}`, quoteVersionLineSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
181
181
  return data;
182
182
  },
183
183
  onSuccess: (_data, vars) => {
@@ -191,7 +191,7 @@ export function useQuoteVersionMutation() {
191
191
  });
192
192
  const removeLine = useMutation({
193
193
  mutationFn: async ({ quoteVersionId: _quoteVersionId, lineId, }) => {
194
- return fetchWithValidation(`/v1/quotes/quote-version-lines/${lineId}`, deleteResponseSchema, { baseUrl, fetcher }, { method: "DELETE" });
194
+ return fetchWithValidation(`/v1/admin/quotes/quote-version-lines/${lineId}`, deleteResponseSchema, { baseUrl, fetcher }, { method: "DELETE" });
195
195
  },
196
196
  onSuccess: (_data, vars) => {
197
197
  void queryClient.invalidateQueries({
@@ -12,7 +12,7 @@ export function useQuoteVersion(id, options = {}) {
12
12
  queryFn: async () => {
13
13
  if (!id)
14
14
  throw new Error("useQuoteVersion requires an id");
15
- const { data } = await fetchWithValidation(`/v1/quotes/quote-versions/${id}`, quoteVersionSingleResponse, { baseUrl, fetcher });
15
+ const { data } = await fetchWithValidation(`/v1/admin/quotes/quote-versions/${id}`, quoteVersionSingleResponse, { baseUrl, fetcher });
16
16
  return data;
17
17
  },
18
18
  enabled: enabled && Boolean(id),
@@ -26,7 +26,7 @@ export function useQuoteVersionLines(quoteVersionId, options = {}) {
26
26
  queryFn: async () => {
27
27
  if (!quoteVersionId)
28
28
  throw new Error("useQuoteVersionLines requires a quoteVersionId");
29
- const { data } = await fetchWithValidation(`/v1/quotes/quote-versions/${quoteVersionId}/lines`, quoteVersionLineListResponse, { baseUrl, fetcher });
29
+ const { data } = await fetchWithValidation(`/v1/admin/quotes/quote-versions/${quoteVersionId}/lines`, quoteVersionLineListResponse, { baseUrl, fetcher });
30
30
  return data;
31
31
  },
32
32
  enabled: enabled && Boolean(quoteVersionId),
@@ -20,7 +20,7 @@ export function useQuoteVersions(options = {}) {
20
20
  if (filters.offset !== undefined)
21
21
  params.set("offset", String(filters.offset));
22
22
  const qs = params.toString();
23
- return fetchWithValidation(`/v1/quotes/quote-versions${qs ? `?${qs}` : ""}`, quoteVersionListResponse, { baseUrl, fetcher });
23
+ return fetchWithValidation(`/v1/admin/quotes/quote-versions${qs ? `?${qs}` : ""}`, quoteVersionListResponse, { baseUrl, fetcher });
24
24
  },
25
25
  enabled,
26
26
  });
@@ -1 +1 @@
1
- {"version":3,"file":"use-quote.d.ts","sourceRoot":"","sources":["../../src/hooks/use-quote.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,GAAE,eAAoB;;;;;;;;;;;;;;;;;;;;;;;;;UAgB7E"}
1
+ {"version":3,"file":"use-quote.d.ts","sourceRoot":"","sources":["../../src/hooks/use-quote.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,GAAE,eAAoB;;;;;;;;;;;;;;;;;;;;;;;;;UAoB7E"}
@@ -12,7 +12,7 @@ export function useQuote(id, options = {}) {
12
12
  queryFn: async () => {
13
13
  if (!id)
14
14
  throw new Error("useQuote requires an id");
15
- const { data } = await fetchWithValidation(`/v1/quotes/quotes/${id}`, quoteSingleResponse, {
15
+ const { data } = await fetchWithValidation(`/v1/admin/quotes/quotes/${id}`, quoteSingleResponse, {
16
16
  baseUrl,
17
17
  fetcher,
18
18
  });
@@ -1 +1 @@
1
- {"version":3,"file":"use-quotes.d.ts","sourceRoot":"","sources":["../../src/hooks/use-quotes.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,iBAAiB,EAAmB,MAAM,kBAAkB,CAAA;AAG1E,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;IACzD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,OAAO,GAAE,gBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAyBvD"}
1
+ {"version":3,"file":"use-quotes.d.ts","sourceRoot":"","sources":["../../src/hooks/use-quotes.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,iBAAiB,EAAmB,MAAM,kBAAkB,CAAA;AAG1E,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;IACzD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,OAAO,GAAE,gBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA6BvD"}
@@ -34,7 +34,7 @@ export function useQuotes(options = {}) {
34
34
  if (filters.offset !== undefined)
35
35
  params.set("offset", String(filters.offset));
36
36
  const qs = params.toString();
37
- return fetchWithValidation(`/v1/quotes/quotes${qs ? `?${qs}` : ""}`, quoteListResponse, {
37
+ return fetchWithValidation(`/v1/admin/quotes/quotes${qs ? `?${qs}` : ""}`, quoteListResponse, {
38
38
  baseUrl,
39
39
  fetcher,
40
40
  });
@@ -1 +1 @@
1
- {"version":3,"file":"use-stages.d.ts","sourceRoot":"","sources":["../../src/hooks/use-stages.ts"],"names":[],"mappings":"AAMA,OAAO,EAAmB,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAG1E,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;IACzD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,SAAS,CAAC,OAAO,GAAE,gBAAqB;;;;;;;;;;;;;;;;UAmBvD;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,GAAE,eAAoB;;;;;;;;;;;UAgB7E"}
1
+ {"version":3,"file":"use-stages.d.ts","sourceRoot":"","sources":["../../src/hooks/use-stages.ts"],"names":[],"mappings":"AAMA,OAAO,EAAmB,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAG1E,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;IACzD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,SAAS,CAAC,OAAO,GAAE,gBAAqB;;;;;;;;;;;;;;;;UAuBvD;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,GAAE,eAAoB;;;;;;;;;;;UAoB7E"}
@@ -18,7 +18,7 @@ export function useStages(options = {}) {
18
18
  if (filters.offset !== undefined)
19
19
  params.set("offset", String(filters.offset));
20
20
  const qs = params.toString();
21
- return fetchWithValidation(`/v1/quotes/stages${qs ? `?${qs}` : ""}`, stageListResponse, {
21
+ return fetchWithValidation(`/v1/admin/quotes/stages${qs ? `?${qs}` : ""}`, stageListResponse, {
22
22
  baseUrl,
23
23
  fetcher,
24
24
  });
@@ -34,7 +34,7 @@ export function useStage(id, options = {}) {
34
34
  queryFn: async () => {
35
35
  if (!id)
36
36
  throw new Error("useStage requires an id");
37
- const { data } = await fetchWithValidation(`/v1/quotes/stages/${id}`, stageSingleResponse, {
37
+ const { data } = await fetchWithValidation(`/v1/admin/quotes/stages/${id}`, stageSingleResponse, {
38
38
  baseUrl,
39
39
  fetcher,
40
40
  });
@@ -3,7 +3,7 @@ import { queryOptions } from "@tanstack/react-query";
3
3
  import { fetchWithValidation } from "./client.js";
4
4
  import { quotesQueryKeys } from "./query-keys.js";
5
5
  import { pipelineListResponse, pipelineSingleResponse, quoteListResponse, quoteSingleResponse, quoteVersionLineListResponse, quoteVersionListResponse, quoteVersionSingleResponse, stageListResponse, stageSingleResponse, } from "./schemas.js";
6
- const basePath = "/v1/quotes";
6
+ const basePath = "/v1/admin/quotes";
7
7
  export function getPipelinesQueryOptions(client, options = {}) {
8
8
  const { enabled: _enabled = true, ...filters } = options;
9
9
  return queryOptions({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voyant-travel/quotes-react",
3
- "version": "0.135.0",
3
+ "version": "0.135.1",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -74,10 +74,10 @@
74
74
  "react": "^19.0.0",
75
75
  "react-dom": "^19.0.0",
76
76
  "zod": "^4.0.0",
77
- "@voyant-travel/admin": "^0.115.2",
77
+ "@voyant-travel/admin": "^0.115.3",
78
78
  "@voyant-travel/auth-react": "^0.118.1",
79
- "@voyant-travel/quotes": "^0.123.5",
80
- "@voyant-travel/relationships-react": "^0.137.0",
79
+ "@voyant-travel/quotes": "^0.123.6",
80
+ "@voyant-travel/relationships-react": "^0.137.1",
81
81
  "@voyant-travel/ui": "^0.108.2"
82
82
  },
83
83
  "peerDependenciesMeta": {
@@ -95,8 +95,8 @@
95
95
  }
96
96
  },
97
97
  "dependencies": {
98
- "@voyant-travel/i18n": "^0.109.0",
99
98
  "@voyant-travel/react": "^0.104.1",
99
+ "@voyant-travel/i18n": "^0.109.0",
100
100
  "@voyant-travel/types": "^0.106.0",
101
101
  "@voyant-travel/utils": "^0.105.4"
102
102
  },
@@ -110,14 +110,14 @@
110
110
  "typescript": "^6.0.2",
111
111
  "vitest": "^4.1.2",
112
112
  "zod": "^4.3.6",
113
- "@voyant-travel/admin": "^0.115.2",
114
- "@voyant-travel/auth-react": "^0.118.1",
115
- "@voyant-travel/quotes": "^0.123.5",
116
113
  "@voyant-travel/i18n": "^0.109.0",
117
114
  "@voyant-travel/react": "^0.104.1",
118
- "@voyant-travel/relationships-react": "^0.137.0",
115
+ "@voyant-travel/admin": "^0.115.3",
119
116
  "@voyant-travel/ui": "^0.108.2",
120
- "@voyant-travel/voyant-typescript-config": "^0.1.0"
117
+ "@voyant-travel/voyant-typescript-config": "^0.1.0",
118
+ "@voyant-travel/auth-react": "^0.118.1",
119
+ "@voyant-travel/quotes": "^0.123.6",
120
+ "@voyant-travel/relationships-react": "^0.137.1"
121
121
  },
122
122
  "files": [
123
123
  "dist",
@@ -129,7 +129,7 @@
129
129
  "scripts": {
130
130
  "build": "tsc -p tsconfig.build.json",
131
131
  "clean": "rm -rf dist tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo",
132
- "typecheck": "tsc --noEmit",
132
+ "typecheck": "tsc -p tsconfig.typecheck.json",
133
133
  "lint": "biome check src/",
134
134
  "test": "vitest run --passWithNoTests"
135
135
  },