@voyantjs/suppliers-react 0.19.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hooks/use-supplier-mutation.d.ts +28 -0
- package/dist/hooks/use-supplier-mutation.d.ts.map +1 -1
- package/dist/hooks/use-supplier-mutation.js +1 -1
- package/dist/hooks/use-supplier.d.ts +12 -0
- package/dist/hooks/use-supplier.d.ts.map +1 -1
- package/dist/hooks/use-suppliers.d.ts +12 -0
- package/dist/hooks/use-suppliers.d.ts.map +1 -1
- package/dist/query-options.d.ts +96 -0
- package/dist/query-options.d.ts.map +1 -1
- package/dist/schemas.d.ts +63 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +14 -0
- package/package.json +5 -5
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type SupplierCustomerPaymentPolicy } from "../schemas.js";
|
|
1
2
|
export interface CreateSupplierInput {
|
|
2
3
|
name: string;
|
|
3
4
|
type: "hotel" | "transfer" | "guide" | "experience" | "airline" | "restaurant" | "other";
|
|
@@ -13,6 +14,9 @@ export interface CreateSupplierInput {
|
|
|
13
14
|
contactName?: string | null;
|
|
14
15
|
contactEmail?: string | null;
|
|
15
16
|
contactPhone?: string | null;
|
|
17
|
+
paymentTermsDays?: number | null;
|
|
18
|
+
reservationTimeoutMinutes?: number | null;
|
|
19
|
+
customerPaymentPolicy?: SupplierCustomerPaymentPolicy | null;
|
|
16
20
|
tags?: string[];
|
|
17
21
|
}
|
|
18
22
|
export type UpdateSupplierInput = Partial<CreateSupplierInput>;
|
|
@@ -36,6 +40,18 @@ export declare function useSupplierMutation(): {
|
|
|
36
40
|
tags: string[];
|
|
37
41
|
createdAt: string;
|
|
38
42
|
updatedAt: string;
|
|
43
|
+
paymentTermsDays?: number | null | undefined;
|
|
44
|
+
reservationTimeoutMinutes?: number | null | undefined;
|
|
45
|
+
customerPaymentPolicy?: {
|
|
46
|
+
deposit: {
|
|
47
|
+
kind: "none" | "percent" | "fixed_cents";
|
|
48
|
+
percent?: number | undefined;
|
|
49
|
+
amountCents?: number | undefined;
|
|
50
|
+
};
|
|
51
|
+
minDaysBeforeDepartureForDeposit: number;
|
|
52
|
+
balanceDueDaysBeforeDeparture: number;
|
|
53
|
+
balanceDueMinDaysFromNow: number;
|
|
54
|
+
} | null | undefined;
|
|
39
55
|
}, Error, CreateSupplierInput, unknown>;
|
|
40
56
|
update: import("@tanstack/react-query").UseMutationResult<{
|
|
41
57
|
id: string;
|
|
@@ -56,6 +72,18 @@ export declare function useSupplierMutation(): {
|
|
|
56
72
|
tags: string[];
|
|
57
73
|
createdAt: string;
|
|
58
74
|
updatedAt: string;
|
|
75
|
+
paymentTermsDays?: number | null | undefined;
|
|
76
|
+
reservationTimeoutMinutes?: number | null | undefined;
|
|
77
|
+
customerPaymentPolicy?: {
|
|
78
|
+
deposit: {
|
|
79
|
+
kind: "none" | "percent" | "fixed_cents";
|
|
80
|
+
percent?: number | undefined;
|
|
81
|
+
amountCents?: number | undefined;
|
|
82
|
+
};
|
|
83
|
+
minDaysBeforeDepartureForDeposit: number;
|
|
84
|
+
balanceDueDaysBeforeDeparture: number;
|
|
85
|
+
balanceDueMinDaysFromNow: number;
|
|
86
|
+
} | null | undefined;
|
|
59
87
|
}, Error, {
|
|
60
88
|
id: string;
|
|
61
89
|
input: UpdateSupplierInput;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-supplier-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-supplier-mutation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-supplier-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-supplier-mutation.ts"],"names":[],"mappings":"AAOA,OAAO,EAEL,KAAK,6BAA6B,EAEnC,MAAM,eAAe,CAAA;AAEtB,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,YAAY,GAAG,SAAS,GAAG,YAAY,GAAG,OAAO,CAAA;IACxF,MAAM,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAA;IAC1C,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC/B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,yBAAyB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzC,qBAAqB,CAAC,EAAE,6BAA6B,GAAG,IAAI,CAAA;IAC5D,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;CAChB;AAED,MAAM,MAAM,mBAAmB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAA;AAE9D,wBAAgB,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAqBS,MAAM;eAAS,mBAAmB;;;;;EAiC7E"}
|
|
@@ -3,7 +3,7 @@ import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
|
3
3
|
import { fetchWithValidation } from "../client.js";
|
|
4
4
|
import { useVoyantSuppliersContext } from "../provider.js";
|
|
5
5
|
import { suppliersQueryKeys } from "../query-keys.js";
|
|
6
|
-
import { deleteSuccessResponse, supplierDetailResponse } from "../schemas.js";
|
|
6
|
+
import { deleteSuccessResponse, supplierDetailResponse, } from "../schemas.js";
|
|
7
7
|
export function useSupplierMutation() {
|
|
8
8
|
const { baseUrl, fetcher } = useVoyantSuppliersContext();
|
|
9
9
|
const queryClient = useQueryClient();
|
|
@@ -21,6 +21,18 @@ export declare function useSupplier(id: string, options?: UseSupplierOptions): i
|
|
|
21
21
|
tags: string[];
|
|
22
22
|
createdAt: string;
|
|
23
23
|
updatedAt: string;
|
|
24
|
+
paymentTermsDays?: number | null | undefined;
|
|
25
|
+
reservationTimeoutMinutes?: number | null | undefined;
|
|
26
|
+
customerPaymentPolicy?: {
|
|
27
|
+
deposit: {
|
|
28
|
+
kind: "none" | "percent" | "fixed_cents";
|
|
29
|
+
percent?: number | undefined;
|
|
30
|
+
amountCents?: number | undefined;
|
|
31
|
+
};
|
|
32
|
+
minDaysBeforeDepartureForDeposit: number;
|
|
33
|
+
balanceDueDaysBeforeDeparture: number;
|
|
34
|
+
balanceDueMinDaysFromNow: number;
|
|
35
|
+
} | null | undefined;
|
|
24
36
|
};
|
|
25
37
|
}, Error>;
|
|
26
38
|
//# sourceMappingURL=use-supplier.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-supplier.d.ts","sourceRoot":"","sources":["../../src/hooks/use-supplier.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,kBAAuB
|
|
1
|
+
{"version":3,"file":"use-supplier.d.ts","sourceRoot":"","sources":["../../src/hooks/use-supplier.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,kBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAIvE"}
|
|
@@ -22,6 +22,18 @@ export declare function useSuppliers(options?: UseSuppliersOptions): import("@ta
|
|
|
22
22
|
tags: string[];
|
|
23
23
|
createdAt: string;
|
|
24
24
|
updatedAt: string;
|
|
25
|
+
paymentTermsDays?: number | null | undefined;
|
|
26
|
+
reservationTimeoutMinutes?: number | null | undefined;
|
|
27
|
+
customerPaymentPolicy?: {
|
|
28
|
+
deposit: {
|
|
29
|
+
kind: "none" | "percent" | "fixed_cents";
|
|
30
|
+
percent?: number | undefined;
|
|
31
|
+
amountCents?: number | undefined;
|
|
32
|
+
};
|
|
33
|
+
minDaysBeforeDepartureForDeposit: number;
|
|
34
|
+
balanceDueDaysBeforeDeparture: number;
|
|
35
|
+
balanceDueMinDaysFromNow: number;
|
|
36
|
+
} | null | undefined;
|
|
25
37
|
}[];
|
|
26
38
|
total: number;
|
|
27
39
|
limit: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-suppliers.d.ts","sourceRoot":"","sources":["../../src/hooks/use-suppliers.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAG5D,MAAM,WAAW,mBAAoB,SAAQ,oBAAoB;IAC/D,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,YAAY,CAAC,OAAO,GAAE,mBAAwB
|
|
1
|
+
{"version":3,"file":"use-suppliers.d.ts","sourceRoot":"","sources":["../../src/hooks/use-suppliers.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAG5D,MAAM,WAAW,mBAAoB,SAAQ,oBAAoB;IAC/D,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,YAAY,CAAC,OAAO,GAAE,mBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAI7D"}
|
package/dist/query-options.d.ts
CHANGED
|
@@ -20,6 +20,18 @@ export declare function getSuppliersQueryOptions(client: FetchWithValidationOpti
|
|
|
20
20
|
tags: string[];
|
|
21
21
|
createdAt: string;
|
|
22
22
|
updatedAt: string;
|
|
23
|
+
paymentTermsDays?: number | null | undefined;
|
|
24
|
+
reservationTimeoutMinutes?: number | null | undefined;
|
|
25
|
+
customerPaymentPolicy?: {
|
|
26
|
+
deposit: {
|
|
27
|
+
kind: "none" | "percent" | "fixed_cents";
|
|
28
|
+
percent?: number | undefined;
|
|
29
|
+
amountCents?: number | undefined;
|
|
30
|
+
};
|
|
31
|
+
minDaysBeforeDepartureForDeposit: number;
|
|
32
|
+
balanceDueDaysBeforeDeparture: number;
|
|
33
|
+
balanceDueMinDaysFromNow: number;
|
|
34
|
+
} | null | undefined;
|
|
23
35
|
}[];
|
|
24
36
|
total: number;
|
|
25
37
|
limit: number;
|
|
@@ -44,6 +56,18 @@ export declare function getSuppliersQueryOptions(client: FetchWithValidationOpti
|
|
|
44
56
|
tags: string[];
|
|
45
57
|
createdAt: string;
|
|
46
58
|
updatedAt: string;
|
|
59
|
+
paymentTermsDays?: number | null | undefined;
|
|
60
|
+
reservationTimeoutMinutes?: number | null | undefined;
|
|
61
|
+
customerPaymentPolicy?: {
|
|
62
|
+
deposit: {
|
|
63
|
+
kind: "none" | "percent" | "fixed_cents";
|
|
64
|
+
percent?: number | undefined;
|
|
65
|
+
amountCents?: number | undefined;
|
|
66
|
+
};
|
|
67
|
+
minDaysBeforeDepartureForDeposit: number;
|
|
68
|
+
balanceDueDaysBeforeDeparture: number;
|
|
69
|
+
balanceDueMinDaysFromNow: number;
|
|
70
|
+
} | null | undefined;
|
|
47
71
|
}[];
|
|
48
72
|
total: number;
|
|
49
73
|
limit: number;
|
|
@@ -69,6 +93,18 @@ export declare function getSuppliersQueryOptions(client: FetchWithValidationOpti
|
|
|
69
93
|
tags: string[];
|
|
70
94
|
createdAt: string;
|
|
71
95
|
updatedAt: string;
|
|
96
|
+
paymentTermsDays?: number | null | undefined;
|
|
97
|
+
reservationTimeoutMinutes?: number | null | undefined;
|
|
98
|
+
customerPaymentPolicy?: {
|
|
99
|
+
deposit: {
|
|
100
|
+
kind: "none" | "percent" | "fixed_cents";
|
|
101
|
+
percent?: number | undefined;
|
|
102
|
+
amountCents?: number | undefined;
|
|
103
|
+
};
|
|
104
|
+
minDaysBeforeDepartureForDeposit: number;
|
|
105
|
+
balanceDueDaysBeforeDeparture: number;
|
|
106
|
+
balanceDueMinDaysFromNow: number;
|
|
107
|
+
} | null | undefined;
|
|
72
108
|
}[];
|
|
73
109
|
total: number;
|
|
74
110
|
limit: number;
|
|
@@ -96,6 +132,18 @@ export declare function getSuppliersQueryOptions(client: FetchWithValidationOpti
|
|
|
96
132
|
tags: string[];
|
|
97
133
|
createdAt: string;
|
|
98
134
|
updatedAt: string;
|
|
135
|
+
paymentTermsDays?: number | null | undefined;
|
|
136
|
+
reservationTimeoutMinutes?: number | null | undefined;
|
|
137
|
+
customerPaymentPolicy?: {
|
|
138
|
+
deposit: {
|
|
139
|
+
kind: "none" | "percent" | "fixed_cents";
|
|
140
|
+
percent?: number | undefined;
|
|
141
|
+
amountCents?: number | undefined;
|
|
142
|
+
};
|
|
143
|
+
minDaysBeforeDepartureForDeposit: number;
|
|
144
|
+
balanceDueDaysBeforeDeparture: number;
|
|
145
|
+
balanceDueMinDaysFromNow: number;
|
|
146
|
+
} | null | undefined;
|
|
99
147
|
}[];
|
|
100
148
|
total: number;
|
|
101
149
|
limit: number;
|
|
@@ -124,6 +172,18 @@ export declare function getSupplierQueryOptions(client: FetchWithValidationOptio
|
|
|
124
172
|
tags: string[];
|
|
125
173
|
createdAt: string;
|
|
126
174
|
updatedAt: string;
|
|
175
|
+
paymentTermsDays?: number | null | undefined;
|
|
176
|
+
reservationTimeoutMinutes?: number | null | undefined;
|
|
177
|
+
customerPaymentPolicy?: {
|
|
178
|
+
deposit: {
|
|
179
|
+
kind: "none" | "percent" | "fixed_cents";
|
|
180
|
+
percent?: number | undefined;
|
|
181
|
+
amountCents?: number | undefined;
|
|
182
|
+
};
|
|
183
|
+
minDaysBeforeDepartureForDeposit: number;
|
|
184
|
+
balanceDueDaysBeforeDeparture: number;
|
|
185
|
+
balanceDueMinDaysFromNow: number;
|
|
186
|
+
} | null | undefined;
|
|
127
187
|
};
|
|
128
188
|
}, Error, {
|
|
129
189
|
data: {
|
|
@@ -145,6 +205,18 @@ export declare function getSupplierQueryOptions(client: FetchWithValidationOptio
|
|
|
145
205
|
tags: string[];
|
|
146
206
|
createdAt: string;
|
|
147
207
|
updatedAt: string;
|
|
208
|
+
paymentTermsDays?: number | null | undefined;
|
|
209
|
+
reservationTimeoutMinutes?: number | null | undefined;
|
|
210
|
+
customerPaymentPolicy?: {
|
|
211
|
+
deposit: {
|
|
212
|
+
kind: "none" | "percent" | "fixed_cents";
|
|
213
|
+
percent?: number | undefined;
|
|
214
|
+
amountCents?: number | undefined;
|
|
215
|
+
};
|
|
216
|
+
minDaysBeforeDepartureForDeposit: number;
|
|
217
|
+
balanceDueDaysBeforeDeparture: number;
|
|
218
|
+
balanceDueMinDaysFromNow: number;
|
|
219
|
+
} | null | undefined;
|
|
148
220
|
};
|
|
149
221
|
}, readonly ["voyant", "suppliers", "suppliers", "detail", string]>, "queryFn"> & {
|
|
150
222
|
queryFn?: import("@tanstack/react-query").QueryFunction<{
|
|
@@ -167,6 +239,18 @@ export declare function getSupplierQueryOptions(client: FetchWithValidationOptio
|
|
|
167
239
|
tags: string[];
|
|
168
240
|
createdAt: string;
|
|
169
241
|
updatedAt: string;
|
|
242
|
+
paymentTermsDays?: number | null | undefined;
|
|
243
|
+
reservationTimeoutMinutes?: number | null | undefined;
|
|
244
|
+
customerPaymentPolicy?: {
|
|
245
|
+
deposit: {
|
|
246
|
+
kind: "none" | "percent" | "fixed_cents";
|
|
247
|
+
percent?: number | undefined;
|
|
248
|
+
amountCents?: number | undefined;
|
|
249
|
+
};
|
|
250
|
+
minDaysBeforeDepartureForDeposit: number;
|
|
251
|
+
balanceDueDaysBeforeDeparture: number;
|
|
252
|
+
balanceDueMinDaysFromNow: number;
|
|
253
|
+
} | null | undefined;
|
|
170
254
|
};
|
|
171
255
|
}, readonly ["voyant", "suppliers", "suppliers", "detail", string], never> | undefined;
|
|
172
256
|
} & {
|
|
@@ -191,6 +275,18 @@ export declare function getSupplierQueryOptions(client: FetchWithValidationOptio
|
|
|
191
275
|
tags: string[];
|
|
192
276
|
createdAt: string;
|
|
193
277
|
updatedAt: string;
|
|
278
|
+
paymentTermsDays?: number | null | undefined;
|
|
279
|
+
reservationTimeoutMinutes?: number | null | undefined;
|
|
280
|
+
customerPaymentPolicy?: {
|
|
281
|
+
deposit: {
|
|
282
|
+
kind: "none" | "percent" | "fixed_cents";
|
|
283
|
+
percent?: number | undefined;
|
|
284
|
+
amountCents?: number | undefined;
|
|
285
|
+
};
|
|
286
|
+
minDaysBeforeDepartureForDeposit: number;
|
|
287
|
+
balanceDueDaysBeforeDeparture: number;
|
|
288
|
+
balanceDueMinDaysFromNow: number;
|
|
289
|
+
} | null | undefined;
|
|
194
290
|
};
|
|
195
291
|
};
|
|
196
292
|
[dataTagErrorSymbol]: Error;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-options.d.ts","sourceRoot":"","sources":["../src/query-options.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,0BAA0B,EAAuB,MAAM,aAAa,CAAA;AAClF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAenE,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,0BAA0B,EAClC,OAAO,GAAE,mBAAwB
|
|
1
|
+
{"version":3,"file":"query-options.d.ts","sourceRoot":"","sources":["../src/query-options.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,0BAA0B,EAAuB,MAAM,aAAa,CAAA;AAClF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAenE,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,0BAA0B,EAClC,OAAO,GAAE,mBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAalC;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,0BAA0B,EAAE,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKrF;AAED,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,0BAA0B,EAClC,UAAU,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOnB;AAED,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,0BAA0B,EAClC,UAAU,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOnB;AAED,wBAAgB,mCAAmC,CACjD,MAAM,EAAE,0BAA0B,EAClC,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWlB"}
|
package/dist/schemas.d.ts
CHANGED
|
@@ -34,6 +34,21 @@ export declare const rateUnitSchema: z.ZodEnum<{
|
|
|
34
34
|
per_vehicle: "per_vehicle";
|
|
35
35
|
flat: "flat";
|
|
36
36
|
}>;
|
|
37
|
+
export declare const supplierCustomerPaymentPolicySchema: z.ZodObject<{
|
|
38
|
+
deposit: z.ZodObject<{
|
|
39
|
+
kind: z.ZodEnum<{
|
|
40
|
+
none: "none";
|
|
41
|
+
percent: "percent";
|
|
42
|
+
fixed_cents: "fixed_cents";
|
|
43
|
+
}>;
|
|
44
|
+
percent: z.ZodOptional<z.ZodNumber>;
|
|
45
|
+
amountCents: z.ZodOptional<z.ZodNumber>;
|
|
46
|
+
}, z.core.$strip>;
|
|
47
|
+
minDaysBeforeDepartureForDeposit: z.ZodNumber;
|
|
48
|
+
balanceDueDaysBeforeDeparture: z.ZodNumber;
|
|
49
|
+
balanceDueMinDaysFromNow: z.ZodNumber;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
export type SupplierCustomerPaymentPolicy = z.infer<typeof supplierCustomerPaymentPolicySchema>;
|
|
37
52
|
export declare const supplierSchema: z.ZodObject<{
|
|
38
53
|
id: z.ZodString;
|
|
39
54
|
name: z.ZodString;
|
|
@@ -62,6 +77,22 @@ export declare const supplierSchema: z.ZodObject<{
|
|
|
62
77
|
contactName: z.ZodNullable<z.ZodString>;
|
|
63
78
|
contactEmail: z.ZodNullable<z.ZodString>;
|
|
64
79
|
contactPhone: z.ZodNullable<z.ZodString>;
|
|
80
|
+
paymentTermsDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
81
|
+
reservationTimeoutMinutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
82
|
+
customerPaymentPolicy: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
83
|
+
deposit: z.ZodObject<{
|
|
84
|
+
kind: z.ZodEnum<{
|
|
85
|
+
none: "none";
|
|
86
|
+
percent: "percent";
|
|
87
|
+
fixed_cents: "fixed_cents";
|
|
88
|
+
}>;
|
|
89
|
+
percent: z.ZodOptional<z.ZodNumber>;
|
|
90
|
+
amountCents: z.ZodOptional<z.ZodNumber>;
|
|
91
|
+
}, z.core.$strip>;
|
|
92
|
+
minDaysBeforeDepartureForDeposit: z.ZodNumber;
|
|
93
|
+
balanceDueDaysBeforeDeparture: z.ZodNumber;
|
|
94
|
+
balanceDueMinDaysFromNow: z.ZodNumber;
|
|
95
|
+
}, z.core.$strip>>>;
|
|
65
96
|
tags: z.ZodArray<z.ZodString>;
|
|
66
97
|
createdAt: z.ZodString;
|
|
67
98
|
updatedAt: z.ZodString;
|
|
@@ -146,6 +177,22 @@ export declare const supplierListResponse: z.ZodObject<{
|
|
|
146
177
|
contactName: z.ZodNullable<z.ZodString>;
|
|
147
178
|
contactEmail: z.ZodNullable<z.ZodString>;
|
|
148
179
|
contactPhone: z.ZodNullable<z.ZodString>;
|
|
180
|
+
paymentTermsDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
181
|
+
reservationTimeoutMinutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
182
|
+
customerPaymentPolicy: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
183
|
+
deposit: z.ZodObject<{
|
|
184
|
+
kind: z.ZodEnum<{
|
|
185
|
+
none: "none";
|
|
186
|
+
percent: "percent";
|
|
187
|
+
fixed_cents: "fixed_cents";
|
|
188
|
+
}>;
|
|
189
|
+
percent: z.ZodOptional<z.ZodNumber>;
|
|
190
|
+
amountCents: z.ZodOptional<z.ZodNumber>;
|
|
191
|
+
}, z.core.$strip>;
|
|
192
|
+
minDaysBeforeDepartureForDeposit: z.ZodNumber;
|
|
193
|
+
balanceDueDaysBeforeDeparture: z.ZodNumber;
|
|
194
|
+
balanceDueMinDaysFromNow: z.ZodNumber;
|
|
195
|
+
}, z.core.$strip>>>;
|
|
149
196
|
tags: z.ZodArray<z.ZodString>;
|
|
150
197
|
createdAt: z.ZodString;
|
|
151
198
|
updatedAt: z.ZodString;
|
|
@@ -183,6 +230,22 @@ export declare const supplierDetailResponse: z.ZodObject<{
|
|
|
183
230
|
contactName: z.ZodNullable<z.ZodString>;
|
|
184
231
|
contactEmail: z.ZodNullable<z.ZodString>;
|
|
185
232
|
contactPhone: z.ZodNullable<z.ZodString>;
|
|
233
|
+
paymentTermsDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
234
|
+
reservationTimeoutMinutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
235
|
+
customerPaymentPolicy: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
236
|
+
deposit: z.ZodObject<{
|
|
237
|
+
kind: z.ZodEnum<{
|
|
238
|
+
none: "none";
|
|
239
|
+
percent: "percent";
|
|
240
|
+
fixed_cents: "fixed_cents";
|
|
241
|
+
}>;
|
|
242
|
+
percent: z.ZodOptional<z.ZodNumber>;
|
|
243
|
+
amountCents: z.ZodOptional<z.ZodNumber>;
|
|
244
|
+
}, z.core.$strip>;
|
|
245
|
+
minDaysBeforeDepartureForDeposit: z.ZodNumber;
|
|
246
|
+
balanceDueDaysBeforeDeparture: z.ZodNumber;
|
|
247
|
+
balanceDueMinDaysFromNow: z.ZodNumber;
|
|
248
|
+
}, z.core.$strip>>>;
|
|
186
249
|
tags: z.ZodArray<z.ZodString>;
|
|
187
250
|
createdAt: z.ZodString;
|
|
188
251
|
updatedAt: 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,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC;;;;;iBAM7D,CAAA;AAEJ,eAAO,MAAM,kBAAkB;;;;;;;;EAQ7B,CAAA;AAEF,eAAO,MAAM,oBAAoB;;;;EAA4C,CAAA;AAE7E,eAAO,MAAM,iBAAiB;;;;;;;EAO5B,CAAA;AAEF,eAAO,MAAM,cAAc;;;;;;EAMzB,CAAA;AAEF,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC;;;;;iBAM7D,CAAA;AAEJ,eAAO,MAAM,kBAAkB;;;;;;;;EAQ7B,CAAA;AAEF,eAAO,MAAM,oBAAoB;;;;EAA4C,CAAA;AAE7E,eAAO,MAAM,iBAAiB;;;;;;;EAO5B,CAAA;AAEF,eAAO,MAAM,cAAc;;;;;;EAMzB,CAAA;AAQF,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;iBAK9C,CAAA;AAEF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAA;AAE/F,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAsBzB,CAAA;AAEF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AAErD,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;iBAYhC,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEnE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;iBAa7B,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAE7D,eAAO,MAAM,kBAAkB;;;;;;iBAM7B,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAE7D,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAoC,CAAA;AACrE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAqC,CAAA;AACxE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;iBAA4C,CAAA;AAChF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;iBAAqD,CAAA;AAC1F,eAAO,MAAM,oBAAoB;;;;;;;;iBAAyC,CAAA;AAC1E,eAAO,MAAM,qBAAqB;;;;;;;;iBAAkD,CAAA;AACpF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;iBAAyC,CAAA;AAC1E,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;iBAAkD,CAAA;AACpF,eAAO,MAAM,qBAAqB;;iBAAqC,CAAA"}
|
package/dist/schemas.js
CHANGED
|
@@ -30,6 +30,17 @@ export const rateUnitSchema = z.enum([
|
|
|
30
30
|
"per_vehicle",
|
|
31
31
|
"flat",
|
|
32
32
|
]);
|
|
33
|
+
const depositRuleClientSchema = z.object({
|
|
34
|
+
kind: z.enum(["none", "percent", "fixed_cents"]),
|
|
35
|
+
percent: z.number().min(0).max(100).optional(),
|
|
36
|
+
amountCents: z.number().int().min(0).optional(),
|
|
37
|
+
});
|
|
38
|
+
export const supplierCustomerPaymentPolicySchema = z.object({
|
|
39
|
+
deposit: depositRuleClientSchema,
|
|
40
|
+
minDaysBeforeDepartureForDeposit: z.number().int().min(0),
|
|
41
|
+
balanceDueDaysBeforeDeparture: z.number().int().min(0),
|
|
42
|
+
balanceDueMinDaysFromNow: z.number().int().min(0),
|
|
43
|
+
});
|
|
33
44
|
export const supplierSchema = z.object({
|
|
34
45
|
id: z.string(),
|
|
35
46
|
name: z.string(),
|
|
@@ -46,6 +57,9 @@ export const supplierSchema = z.object({
|
|
|
46
57
|
contactName: z.string().nullable(),
|
|
47
58
|
contactEmail: z.string().nullable(),
|
|
48
59
|
contactPhone: z.string().nullable(),
|
|
60
|
+
paymentTermsDays: z.number().int().nullable().optional(),
|
|
61
|
+
reservationTimeoutMinutes: z.number().int().nullable().optional(),
|
|
62
|
+
customerPaymentPolicy: supplierCustomerPaymentPolicySchema.nullable().optional(),
|
|
49
63
|
tags: z.array(z.string()),
|
|
50
64
|
createdAt: z.string(),
|
|
51
65
|
updatedAt: z.string(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyantjs/suppliers-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.0",
|
|
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/suppliers": "0.
|
|
44
|
+
"@voyantjs/suppliers": "0.21.0"
|
|
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/suppliers": "0.
|
|
56
|
-
"@voyantjs/react": "0.
|
|
55
|
+
"@voyantjs/suppliers": "0.21.0",
|
|
56
|
+
"@voyantjs/react": "0.21.0",
|
|
57
57
|
"@voyantjs/voyant-typescript-config": "0.1.0"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@voyantjs/react": "0.
|
|
60
|
+
"@voyantjs/react": "0.21.0"
|
|
61
61
|
},
|
|
62
62
|
"files": [
|
|
63
63
|
"dist"
|