@arascreative/erp-api-client 1.1.0 → 2.0.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/index.d.mts +837 -1
- package/dist/index.d.ts +837 -1
- package/dist/index.js +643 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +566 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -9,6 +9,15 @@ var ConsumeBatchSourceType = {
|
|
|
9
9
|
DAMAGED: "DAMAGED",
|
|
10
10
|
INTERNAL_USE: "INTERNAL_USE"
|
|
11
11
|
};
|
|
12
|
+
var ProductClassification = {
|
|
13
|
+
Physical: "Physical",
|
|
14
|
+
Digital: "Digital"
|
|
15
|
+
};
|
|
16
|
+
var ProductStatus = {
|
|
17
|
+
Tes: "Tes",
|
|
18
|
+
Live: "Live",
|
|
19
|
+
Archived: "Archived"
|
|
20
|
+
};
|
|
12
21
|
var SourceTypeEnum = {
|
|
13
22
|
PURCHASE: "PURCHASE",
|
|
14
23
|
CUSTOMER_RETURN: "CUSTOMER_RETURN",
|
|
@@ -174,6 +183,238 @@ function useSearchAddresses(params, options, queryClient) {
|
|
|
174
183
|
query.queryKey = queryOptions.queryKey;
|
|
175
184
|
return query;
|
|
176
185
|
}
|
|
186
|
+
var createProduct = (createProductRequest, options) => {
|
|
187
|
+
return axios.post(`/api/catalog/products`, createProductRequest, options);
|
|
188
|
+
};
|
|
189
|
+
var getCreateProductMutationOptions = (options) => {
|
|
190
|
+
const mutationKey = ["createProduct"];
|
|
191
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, axios: void 0 };
|
|
192
|
+
const mutationFn = (props) => {
|
|
193
|
+
const { data } = props ?? {};
|
|
194
|
+
return createProduct(data, axiosOptions);
|
|
195
|
+
};
|
|
196
|
+
return { mutationFn, ...mutationOptions };
|
|
197
|
+
};
|
|
198
|
+
var useCreateProduct = (options, queryClient) => {
|
|
199
|
+
const mutationOptions = getCreateProductMutationOptions(options);
|
|
200
|
+
return useMutation(mutationOptions, queryClient);
|
|
201
|
+
};
|
|
202
|
+
var listProducts = (params, options) => {
|
|
203
|
+
return axios.get(`/api/catalog/products`, {
|
|
204
|
+
...options,
|
|
205
|
+
params: { ...params, ...options?.params }
|
|
206
|
+
});
|
|
207
|
+
};
|
|
208
|
+
var getListProductsQueryKey = (params) => {
|
|
209
|
+
return [`/api/catalog/products`, ...params ? [params] : []];
|
|
210
|
+
};
|
|
211
|
+
var getListProductsQueryOptions = (params, options) => {
|
|
212
|
+
const { query: queryOptions, axios: axiosOptions } = options ?? {};
|
|
213
|
+
const queryKey = queryOptions?.queryKey ?? getListProductsQueryKey(params);
|
|
214
|
+
const queryFn = ({ signal }) => listProducts(params, { signal, ...axiosOptions });
|
|
215
|
+
return { queryKey, queryFn, ...queryOptions };
|
|
216
|
+
};
|
|
217
|
+
function useListProducts(params, options, queryClient) {
|
|
218
|
+
const queryOptions = getListProductsQueryOptions(params, options);
|
|
219
|
+
const query = useQuery(queryOptions, queryClient);
|
|
220
|
+
query.queryKey = queryOptions.queryKey;
|
|
221
|
+
return query;
|
|
222
|
+
}
|
|
223
|
+
var getProduct = (id, options) => {
|
|
224
|
+
return axios.get(`/api/catalog/products/${id}`, options);
|
|
225
|
+
};
|
|
226
|
+
var getGetProductQueryKey = (id) => {
|
|
227
|
+
return [`/api/catalog/products/${id}`];
|
|
228
|
+
};
|
|
229
|
+
var getGetProductQueryOptions = (id, options) => {
|
|
230
|
+
const { query: queryOptions, axios: axiosOptions } = options ?? {};
|
|
231
|
+
const queryKey = queryOptions?.queryKey ?? getGetProductQueryKey(id);
|
|
232
|
+
const queryFn = ({ signal }) => getProduct(id, { signal, ...axiosOptions });
|
|
233
|
+
return { queryKey, queryFn, enabled: !!id, ...queryOptions };
|
|
234
|
+
};
|
|
235
|
+
function useGetProduct(id, options, queryClient) {
|
|
236
|
+
const queryOptions = getGetProductQueryOptions(id, options);
|
|
237
|
+
const query = useQuery(queryOptions, queryClient);
|
|
238
|
+
query.queryKey = queryOptions.queryKey;
|
|
239
|
+
return query;
|
|
240
|
+
}
|
|
241
|
+
var updateProduct = (id, updateProductRequest, options) => {
|
|
242
|
+
return axios.put(`/api/catalog/products/${id}`, updateProductRequest, options);
|
|
243
|
+
};
|
|
244
|
+
var getUpdateProductMutationOptions = (options) => {
|
|
245
|
+
const mutationKey = ["updateProduct"];
|
|
246
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, axios: void 0 };
|
|
247
|
+
const mutationFn = (props) => {
|
|
248
|
+
const { id, data } = props ?? {};
|
|
249
|
+
return updateProduct(id, data, axiosOptions);
|
|
250
|
+
};
|
|
251
|
+
return { mutationFn, ...mutationOptions };
|
|
252
|
+
};
|
|
253
|
+
var useUpdateProduct = (options, queryClient) => {
|
|
254
|
+
const mutationOptions = getUpdateProductMutationOptions(options);
|
|
255
|
+
return useMutation(mutationOptions, queryClient);
|
|
256
|
+
};
|
|
257
|
+
var deleteProduct = (id, options) => {
|
|
258
|
+
return axios.delete(`/api/catalog/products/${id}`, options);
|
|
259
|
+
};
|
|
260
|
+
var getDeleteProductMutationOptions = (options) => {
|
|
261
|
+
const mutationKey = ["deleteProduct"];
|
|
262
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, axios: void 0 };
|
|
263
|
+
const mutationFn = (props) => {
|
|
264
|
+
const { id } = props ?? {};
|
|
265
|
+
return deleteProduct(id, axiosOptions);
|
|
266
|
+
};
|
|
267
|
+
return { mutationFn, ...mutationOptions };
|
|
268
|
+
};
|
|
269
|
+
var useDeleteProduct = (options, queryClient) => {
|
|
270
|
+
const mutationOptions = getDeleteProductMutationOptions(options);
|
|
271
|
+
return useMutation(mutationOptions, queryClient);
|
|
272
|
+
};
|
|
273
|
+
var createVariant = (productId, createVariantRequest, options) => {
|
|
274
|
+
return axios.post(`/api/catalog/products/${productId}/variants`, createVariantRequest, options);
|
|
275
|
+
};
|
|
276
|
+
var getCreateVariantMutationOptions = (options) => {
|
|
277
|
+
const mutationKey = ["createVariant"];
|
|
278
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, axios: void 0 };
|
|
279
|
+
const mutationFn = (props) => {
|
|
280
|
+
const { productId, data } = props ?? {};
|
|
281
|
+
return createVariant(productId, data, axiosOptions);
|
|
282
|
+
};
|
|
283
|
+
return { mutationFn, ...mutationOptions };
|
|
284
|
+
};
|
|
285
|
+
var useCreateVariant = (options, queryClient) => {
|
|
286
|
+
const mutationOptions = getCreateVariantMutationOptions(options);
|
|
287
|
+
return useMutation(mutationOptions, queryClient);
|
|
288
|
+
};
|
|
289
|
+
var listVariants = (productId, params, options) => {
|
|
290
|
+
return axios.get(`/api/catalog/products/${productId}/variants`, {
|
|
291
|
+
...options,
|
|
292
|
+
params: { ...params, ...options?.params }
|
|
293
|
+
});
|
|
294
|
+
};
|
|
295
|
+
var getListVariantsQueryKey = (productId, params) => {
|
|
296
|
+
return [`/api/catalog/products/${productId}/variants`, ...params ? [params] : []];
|
|
297
|
+
};
|
|
298
|
+
var getListVariantsQueryOptions = (productId, params, options) => {
|
|
299
|
+
const { query: queryOptions, axios: axiosOptions } = options ?? {};
|
|
300
|
+
const queryKey = queryOptions?.queryKey ?? getListVariantsQueryKey(productId, params);
|
|
301
|
+
const queryFn = ({ signal }) => listVariants(productId, params, { signal, ...axiosOptions });
|
|
302
|
+
return { queryKey, queryFn, enabled: !!productId, ...queryOptions };
|
|
303
|
+
};
|
|
304
|
+
function useListVariants(productId, params, options, queryClient) {
|
|
305
|
+
const queryOptions = getListVariantsQueryOptions(productId, params, options);
|
|
306
|
+
const query = useQuery(queryOptions, queryClient);
|
|
307
|
+
query.queryKey = queryOptions.queryKey;
|
|
308
|
+
return query;
|
|
309
|
+
}
|
|
310
|
+
var getVariant = (productId, id, options) => {
|
|
311
|
+
return axios.get(`/api/catalog/products/${productId}/variants/${id}`, options);
|
|
312
|
+
};
|
|
313
|
+
var getGetVariantQueryKey = (productId, id) => {
|
|
314
|
+
return [`/api/catalog/products/${productId}/variants/${id}`];
|
|
315
|
+
};
|
|
316
|
+
var getGetVariantQueryOptions = (productId, id, options) => {
|
|
317
|
+
const { query: queryOptions, axios: axiosOptions } = options ?? {};
|
|
318
|
+
const queryKey = queryOptions?.queryKey ?? getGetVariantQueryKey(productId, id);
|
|
319
|
+
const queryFn = ({ signal }) => getVariant(productId, id, { signal, ...axiosOptions });
|
|
320
|
+
return { queryKey, queryFn, enabled: !!(productId && id), ...queryOptions };
|
|
321
|
+
};
|
|
322
|
+
function useGetVariant(productId, id, options, queryClient) {
|
|
323
|
+
const queryOptions = getGetVariantQueryOptions(productId, id, options);
|
|
324
|
+
const query = useQuery(queryOptions, queryClient);
|
|
325
|
+
query.queryKey = queryOptions.queryKey;
|
|
326
|
+
return query;
|
|
327
|
+
}
|
|
328
|
+
var updateVariant = (productId, id, updateVariantRequest, options) => {
|
|
329
|
+
return axios.put(
|
|
330
|
+
`/api/catalog/products/${productId}/variants/${id}`,
|
|
331
|
+
updateVariantRequest,
|
|
332
|
+
options
|
|
333
|
+
);
|
|
334
|
+
};
|
|
335
|
+
var getUpdateVariantMutationOptions = (options) => {
|
|
336
|
+
const mutationKey = ["updateVariant"];
|
|
337
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, axios: void 0 };
|
|
338
|
+
const mutationFn = (props) => {
|
|
339
|
+
const { productId, id, data } = props ?? {};
|
|
340
|
+
return updateVariant(productId, id, data, axiosOptions);
|
|
341
|
+
};
|
|
342
|
+
return { mutationFn, ...mutationOptions };
|
|
343
|
+
};
|
|
344
|
+
var useUpdateVariant = (options, queryClient) => {
|
|
345
|
+
const mutationOptions = getUpdateVariantMutationOptions(options);
|
|
346
|
+
return useMutation(mutationOptions, queryClient);
|
|
347
|
+
};
|
|
348
|
+
var deleteVariant = (productId, id, options) => {
|
|
349
|
+
return axios.delete(`/api/catalog/products/${productId}/variants/${id}`, options);
|
|
350
|
+
};
|
|
351
|
+
var getDeleteVariantMutationOptions = (options) => {
|
|
352
|
+
const mutationKey = ["deleteVariant"];
|
|
353
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, axios: void 0 };
|
|
354
|
+
const mutationFn = (props) => {
|
|
355
|
+
const { productId, id } = props ?? {};
|
|
356
|
+
return deleteVariant(productId, id, axiosOptions);
|
|
357
|
+
};
|
|
358
|
+
return { mutationFn, ...mutationOptions };
|
|
359
|
+
};
|
|
360
|
+
var useDeleteVariant = (options, queryClient) => {
|
|
361
|
+
const mutationOptions = getDeleteVariantMutationOptions(options);
|
|
362
|
+
return useMutation(mutationOptions, queryClient);
|
|
363
|
+
};
|
|
364
|
+
var getVariantPricing = (variantId, options) => {
|
|
365
|
+
return axios.get(`/api/catalog/variants/${variantId}/pricing`, options);
|
|
366
|
+
};
|
|
367
|
+
var getGetVariantPricingQueryKey = (variantId) => {
|
|
368
|
+
return [`/api/catalog/variants/${variantId}/pricing`];
|
|
369
|
+
};
|
|
370
|
+
var getGetVariantPricingQueryOptions = (variantId, options) => {
|
|
371
|
+
const { query: queryOptions, axios: axiosOptions } = options ?? {};
|
|
372
|
+
const queryKey = queryOptions?.queryKey ?? getGetVariantPricingQueryKey(variantId);
|
|
373
|
+
const queryFn = ({ signal }) => getVariantPricing(variantId, { signal, ...axiosOptions });
|
|
374
|
+
return { queryKey, queryFn, enabled: !!variantId, ...queryOptions };
|
|
375
|
+
};
|
|
376
|
+
function useGetVariantPricing(variantId, options, queryClient) {
|
|
377
|
+
const queryOptions = getGetVariantPricingQueryOptions(variantId, options);
|
|
378
|
+
const query = useQuery(queryOptions, queryClient);
|
|
379
|
+
query.queryKey = queryOptions.queryKey;
|
|
380
|
+
return query;
|
|
381
|
+
}
|
|
382
|
+
var upsertVariantPricing = (variantId, upsertVariantPricingRequest, options) => {
|
|
383
|
+
return axios.put(
|
|
384
|
+
`/api/catalog/variants/${variantId}/pricing`,
|
|
385
|
+
upsertVariantPricingRequest,
|
|
386
|
+
options
|
|
387
|
+
);
|
|
388
|
+
};
|
|
389
|
+
var getUpsertVariantPricingMutationOptions = (options) => {
|
|
390
|
+
const mutationKey = ["upsertVariantPricing"];
|
|
391
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, axios: void 0 };
|
|
392
|
+
const mutationFn = (props) => {
|
|
393
|
+
const { variantId, data } = props ?? {};
|
|
394
|
+
return upsertVariantPricing(variantId, data, axiosOptions);
|
|
395
|
+
};
|
|
396
|
+
return { mutationFn, ...mutationOptions };
|
|
397
|
+
};
|
|
398
|
+
var useUpsertVariantPricing = (options, queryClient) => {
|
|
399
|
+
const mutationOptions = getUpsertVariantPricingMutationOptions(options);
|
|
400
|
+
return useMutation(mutationOptions, queryClient);
|
|
401
|
+
};
|
|
402
|
+
var deleteVariantPricing = (variantId, options) => {
|
|
403
|
+
return axios.delete(`/api/catalog/variants/${variantId}/pricing`, options);
|
|
404
|
+
};
|
|
405
|
+
var getDeleteVariantPricingMutationOptions = (options) => {
|
|
406
|
+
const mutationKey = ["deleteVariantPricing"];
|
|
407
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, axios: void 0 };
|
|
408
|
+
const mutationFn = (props) => {
|
|
409
|
+
const { variantId } = props ?? {};
|
|
410
|
+
return deleteVariantPricing(variantId, axiosOptions);
|
|
411
|
+
};
|
|
412
|
+
return { mutationFn, ...mutationOptions };
|
|
413
|
+
};
|
|
414
|
+
var useDeleteVariantPricing = (options, queryClient) => {
|
|
415
|
+
const mutationOptions = getDeleteVariantPricingMutationOptions(options);
|
|
416
|
+
return useMutation(mutationOptions, queryClient);
|
|
417
|
+
};
|
|
177
418
|
var createStockItems = (createStockItemCommand, options) => {
|
|
178
419
|
return axios.post(`/api/stock-items`, createStockItemCommand, options);
|
|
179
420
|
};
|
|
@@ -760,6 +1001,254 @@ var searchAddressesResponseItem = zod.strictObject({
|
|
|
760
1001
|
zipCode: zod.string().optional()
|
|
761
1002
|
});
|
|
762
1003
|
var searchAddressesResponse = zod.array(searchAddressesResponseItem);
|
|
1004
|
+
var createProductBody = zod.strictObject({
|
|
1005
|
+
categoryId: zod.uuid(),
|
|
1006
|
+
name: zod.string(),
|
|
1007
|
+
slug: zod.string(),
|
|
1008
|
+
status: zod.enum(["Tes", "Live", "Archived"]).optional(),
|
|
1009
|
+
classification: zod.enum(["Physical", "Digital"])
|
|
1010
|
+
});
|
|
1011
|
+
var listProductsQueryPageDefault = 1;
|
|
1012
|
+
var listProductsQueryPageSizeDefault = 10;
|
|
1013
|
+
var listProductsQueryParams = zod.strictObject({
|
|
1014
|
+
page: zod.coerce.number().default(listProductsQueryPageDefault),
|
|
1015
|
+
pageSize: zod.coerce.number().default(listProductsQueryPageSizeDefault)
|
|
1016
|
+
});
|
|
1017
|
+
var listProductsResponse = zod.strictObject({
|
|
1018
|
+
items: zod.array(
|
|
1019
|
+
zod.strictObject({
|
|
1020
|
+
id: zod.uuid(),
|
|
1021
|
+
categoryId: zod.uuid(),
|
|
1022
|
+
name: zod.string(),
|
|
1023
|
+
slug: zod.string(),
|
|
1024
|
+
status: zod.enum(["Tes", "Live", "Archived"]),
|
|
1025
|
+
classification: zod.enum(["Physical", "Digital"]),
|
|
1026
|
+
variantCount: zod.number()
|
|
1027
|
+
})
|
|
1028
|
+
),
|
|
1029
|
+
page: zod.number(),
|
|
1030
|
+
pageSize: zod.number(),
|
|
1031
|
+
totalCount: zod.number(),
|
|
1032
|
+
totalPages: zod.number().optional(),
|
|
1033
|
+
hasNextPage: zod.boolean().optional(),
|
|
1034
|
+
hasPreviousPage: zod.boolean().optional()
|
|
1035
|
+
});
|
|
1036
|
+
var getProductParams = zod.strictObject({
|
|
1037
|
+
id: zod.uuid()
|
|
1038
|
+
});
|
|
1039
|
+
var getProductResponse = zod.strictObject({
|
|
1040
|
+
id: zod.uuid(),
|
|
1041
|
+
categoryId: zod.uuid(),
|
|
1042
|
+
name: zod.string(),
|
|
1043
|
+
slug: zod.string(),
|
|
1044
|
+
status: zod.enum(["Tes", "Live", "Archived"]),
|
|
1045
|
+
classification: zod.enum(["Physical", "Digital"]),
|
|
1046
|
+
variantCount: zod.number()
|
|
1047
|
+
});
|
|
1048
|
+
var updateProductParams = zod.strictObject({
|
|
1049
|
+
id: zod.uuid()
|
|
1050
|
+
});
|
|
1051
|
+
var updateProductBody = zod.strictObject({
|
|
1052
|
+
categoryId: zod.uuid(),
|
|
1053
|
+
name: zod.string(),
|
|
1054
|
+
slug: zod.string(),
|
|
1055
|
+
status: zod.enum(["Tes", "Live", "Archived"]),
|
|
1056
|
+
classification: zod.enum(["Physical", "Digital"])
|
|
1057
|
+
});
|
|
1058
|
+
var updateProductResponse = zod.strictObject({
|
|
1059
|
+
id: zod.uuid(),
|
|
1060
|
+
categoryId: zod.uuid(),
|
|
1061
|
+
name: zod.string(),
|
|
1062
|
+
slug: zod.string(),
|
|
1063
|
+
status: zod.enum(["Tes", "Live", "Archived"]),
|
|
1064
|
+
classification: zod.enum(["Physical", "Digital"]),
|
|
1065
|
+
variantCount: zod.number()
|
|
1066
|
+
});
|
|
1067
|
+
var deleteProductParams = zod.strictObject({
|
|
1068
|
+
id: zod.uuid()
|
|
1069
|
+
});
|
|
1070
|
+
var createVariantParams = zod.strictObject({
|
|
1071
|
+
productId: zod.uuid()
|
|
1072
|
+
});
|
|
1073
|
+
var createVariantBody = zod.strictObject({
|
|
1074
|
+
code: zod.string(),
|
|
1075
|
+
attributes: zod.array(
|
|
1076
|
+
zod.strictObject({
|
|
1077
|
+
name: zod.string(),
|
|
1078
|
+
value: zod.string()
|
|
1079
|
+
})
|
|
1080
|
+
).optional(),
|
|
1081
|
+
weight: zod.strictObject({
|
|
1082
|
+
value: zod.number(),
|
|
1083
|
+
unit: zod.string()
|
|
1084
|
+
})
|
|
1085
|
+
});
|
|
1086
|
+
var listVariantsParams = zod.strictObject({
|
|
1087
|
+
productId: zod.uuid()
|
|
1088
|
+
});
|
|
1089
|
+
var listVariantsQueryPageDefault = 1;
|
|
1090
|
+
var listVariantsQueryPageSizeDefault = 10;
|
|
1091
|
+
var listVariantsQueryParams = zod.strictObject({
|
|
1092
|
+
page: zod.coerce.number().default(listVariantsQueryPageDefault),
|
|
1093
|
+
pageSize: zod.coerce.number().default(listVariantsQueryPageSizeDefault)
|
|
1094
|
+
});
|
|
1095
|
+
var listVariantsResponse = zod.strictObject({
|
|
1096
|
+
items: zod.array(
|
|
1097
|
+
zod.strictObject({
|
|
1098
|
+
id: zod.uuid(),
|
|
1099
|
+
productId: zod.uuid(),
|
|
1100
|
+
code: zod.string(),
|
|
1101
|
+
attributes: zod.array(
|
|
1102
|
+
zod.strictObject({
|
|
1103
|
+
name: zod.string(),
|
|
1104
|
+
value: zod.string()
|
|
1105
|
+
})
|
|
1106
|
+
).optional(),
|
|
1107
|
+
weight: zod.strictObject({
|
|
1108
|
+
value: zod.number(),
|
|
1109
|
+
unit: zod.string()
|
|
1110
|
+
})
|
|
1111
|
+
})
|
|
1112
|
+
),
|
|
1113
|
+
page: zod.number(),
|
|
1114
|
+
pageSize: zod.number(),
|
|
1115
|
+
totalCount: zod.number(),
|
|
1116
|
+
totalPages: zod.number().optional(),
|
|
1117
|
+
hasNextPage: zod.boolean().optional(),
|
|
1118
|
+
hasPreviousPage: zod.boolean().optional()
|
|
1119
|
+
});
|
|
1120
|
+
var getVariantParams = zod.strictObject({
|
|
1121
|
+
productId: zod.uuid(),
|
|
1122
|
+
id: zod.uuid()
|
|
1123
|
+
});
|
|
1124
|
+
var getVariantResponse = zod.strictObject({
|
|
1125
|
+
id: zod.uuid(),
|
|
1126
|
+
productId: zod.uuid(),
|
|
1127
|
+
code: zod.string(),
|
|
1128
|
+
attributes: zod.array(
|
|
1129
|
+
zod.strictObject({
|
|
1130
|
+
name: zod.string(),
|
|
1131
|
+
value: zod.string()
|
|
1132
|
+
})
|
|
1133
|
+
).optional(),
|
|
1134
|
+
weight: zod.strictObject({
|
|
1135
|
+
value: zod.number(),
|
|
1136
|
+
unit: zod.string()
|
|
1137
|
+
})
|
|
1138
|
+
});
|
|
1139
|
+
var updateVariantParams = zod.strictObject({
|
|
1140
|
+
productId: zod.uuid(),
|
|
1141
|
+
id: zod.uuid()
|
|
1142
|
+
});
|
|
1143
|
+
var updateVariantBody = zod.strictObject({
|
|
1144
|
+
code: zod.string(),
|
|
1145
|
+
attributes: zod.array(
|
|
1146
|
+
zod.strictObject({
|
|
1147
|
+
name: zod.string(),
|
|
1148
|
+
value: zod.string()
|
|
1149
|
+
})
|
|
1150
|
+
).optional(),
|
|
1151
|
+
weight: zod.strictObject({
|
|
1152
|
+
value: zod.number(),
|
|
1153
|
+
unit: zod.string()
|
|
1154
|
+
})
|
|
1155
|
+
});
|
|
1156
|
+
var updateVariantResponse = zod.strictObject({
|
|
1157
|
+
id: zod.uuid(),
|
|
1158
|
+
productId: zod.uuid(),
|
|
1159
|
+
code: zod.string(),
|
|
1160
|
+
attributes: zod.array(
|
|
1161
|
+
zod.strictObject({
|
|
1162
|
+
name: zod.string(),
|
|
1163
|
+
value: zod.string()
|
|
1164
|
+
})
|
|
1165
|
+
).optional(),
|
|
1166
|
+
weight: zod.strictObject({
|
|
1167
|
+
value: zod.number(),
|
|
1168
|
+
unit: zod.string()
|
|
1169
|
+
})
|
|
1170
|
+
});
|
|
1171
|
+
var deleteVariantParams = zod.strictObject({
|
|
1172
|
+
productId: zod.uuid(),
|
|
1173
|
+
id: zod.uuid()
|
|
1174
|
+
});
|
|
1175
|
+
var getVariantPricingParams = zod.strictObject({
|
|
1176
|
+
variantId: zod.uuid()
|
|
1177
|
+
});
|
|
1178
|
+
var getVariantPricingResponse = zod.strictObject({
|
|
1179
|
+
variantId: zod.uuid(),
|
|
1180
|
+
baseAmount: zod.number(),
|
|
1181
|
+
baseCurrency: zod.string(),
|
|
1182
|
+
effectiveAmount: zod.number(),
|
|
1183
|
+
effectiveCurrency: zod.string(),
|
|
1184
|
+
sale: zod.union([
|
|
1185
|
+
zod.null(),
|
|
1186
|
+
zod.strictObject({
|
|
1187
|
+
amount: zod.number(),
|
|
1188
|
+
currency: zod.string(),
|
|
1189
|
+
startAt: zod.iso.datetime({}),
|
|
1190
|
+
endAt: zod.iso.datetime({}),
|
|
1191
|
+
isActive: zod.boolean()
|
|
1192
|
+
})
|
|
1193
|
+
]).optional(),
|
|
1194
|
+
wholesale: zod.array(
|
|
1195
|
+
zod.strictObject({
|
|
1196
|
+
minQty: zod.number(),
|
|
1197
|
+
amount: zod.number(),
|
|
1198
|
+
currency: zod.string()
|
|
1199
|
+
})
|
|
1200
|
+
).optional()
|
|
1201
|
+
});
|
|
1202
|
+
var upsertVariantPricingParams = zod.strictObject({
|
|
1203
|
+
variantId: zod.uuid()
|
|
1204
|
+
});
|
|
1205
|
+
var upsertVariantPricingBody = zod.strictObject({
|
|
1206
|
+
baseAmount: zod.number(),
|
|
1207
|
+
baseCurrency: zod.string(),
|
|
1208
|
+
sale: zod.union([
|
|
1209
|
+
zod.null(),
|
|
1210
|
+
zod.strictObject({
|
|
1211
|
+
amount: zod.number(),
|
|
1212
|
+
currency: zod.string(),
|
|
1213
|
+
startAt: zod.iso.datetime({}),
|
|
1214
|
+
endAt: zod.iso.datetime({})
|
|
1215
|
+
})
|
|
1216
|
+
]).optional(),
|
|
1217
|
+
wholesale: zod.array(
|
|
1218
|
+
zod.strictObject({
|
|
1219
|
+
minQty: zod.number(),
|
|
1220
|
+
amount: zod.number(),
|
|
1221
|
+
currency: zod.string()
|
|
1222
|
+
})
|
|
1223
|
+
).optional()
|
|
1224
|
+
});
|
|
1225
|
+
var upsertVariantPricingResponse = zod.strictObject({
|
|
1226
|
+
variantId: zod.uuid(),
|
|
1227
|
+
baseAmount: zod.number(),
|
|
1228
|
+
baseCurrency: zod.string(),
|
|
1229
|
+
effectiveAmount: zod.number(),
|
|
1230
|
+
effectiveCurrency: zod.string(),
|
|
1231
|
+
sale: zod.union([
|
|
1232
|
+
zod.null(),
|
|
1233
|
+
zod.strictObject({
|
|
1234
|
+
amount: zod.number(),
|
|
1235
|
+
currency: zod.string(),
|
|
1236
|
+
startAt: zod.iso.datetime({}),
|
|
1237
|
+
endAt: zod.iso.datetime({}),
|
|
1238
|
+
isActive: zod.boolean()
|
|
1239
|
+
})
|
|
1240
|
+
]).optional(),
|
|
1241
|
+
wholesale: zod.array(
|
|
1242
|
+
zod.strictObject({
|
|
1243
|
+
minQty: zod.number(),
|
|
1244
|
+
amount: zod.number(),
|
|
1245
|
+
currency: zod.string()
|
|
1246
|
+
})
|
|
1247
|
+
).optional()
|
|
1248
|
+
});
|
|
1249
|
+
var deleteVariantPricingParams = zod.strictObject({
|
|
1250
|
+
variantId: zod.uuid()
|
|
1251
|
+
});
|
|
763
1252
|
var createStockItemsBody = zod.strictObject({
|
|
764
1253
|
name: zod.string(),
|
|
765
1254
|
sku: zod.string(),
|
|
@@ -1000,18 +1489,31 @@ var postApiIdentityAdminUsersIdLogoutParams = zod.strictObject({
|
|
|
1000
1489
|
});
|
|
1001
1490
|
export {
|
|
1002
1491
|
ConsumeBatchSourceType,
|
|
1492
|
+
ProductClassification,
|
|
1493
|
+
ProductStatus,
|
|
1003
1494
|
SourceTypeEnum,
|
|
1004
1495
|
consumeBatch,
|
|
1005
1496
|
consumeBatchBody,
|
|
1006
1497
|
consumeBatchParams,
|
|
1007
1498
|
createBatch,
|
|
1008
1499
|
createBatchBody,
|
|
1500
|
+
createProduct,
|
|
1501
|
+
createProductBody,
|
|
1009
1502
|
createStockItems,
|
|
1010
1503
|
createStockItemsBody,
|
|
1504
|
+
createVariant,
|
|
1505
|
+
createVariantBody,
|
|
1506
|
+
createVariantParams,
|
|
1011
1507
|
createWarehouse,
|
|
1012
1508
|
createWarehouseBody,
|
|
1013
1509
|
deleteApiIdentityAdminRolesId,
|
|
1014
1510
|
deleteApiIdentityAdminRolesIdParams,
|
|
1511
|
+
deleteProduct,
|
|
1512
|
+
deleteProductParams,
|
|
1513
|
+
deleteVariant,
|
|
1514
|
+
deleteVariantParams,
|
|
1515
|
+
deleteVariantPricing,
|
|
1516
|
+
deleteVariantPricingParams,
|
|
1015
1517
|
deleteWarehouse,
|
|
1016
1518
|
deleteWarehouseParams,
|
|
1017
1519
|
getApiIdentityAdminPermissions,
|
|
@@ -1042,9 +1544,14 @@ export {
|
|
|
1042
1544
|
getApiIdentityManageInfoResponse,
|
|
1043
1545
|
getConsumeBatchMutationOptions,
|
|
1044
1546
|
getCreateBatchMutationOptions,
|
|
1547
|
+
getCreateProductMutationOptions,
|
|
1045
1548
|
getCreateStockItemsMutationOptions,
|
|
1549
|
+
getCreateVariantMutationOptions,
|
|
1046
1550
|
getCreateWarehouseMutationOptions,
|
|
1047
1551
|
getDeleteApiIdentityAdminRolesIdMutationOptions,
|
|
1552
|
+
getDeleteProductMutationOptions,
|
|
1553
|
+
getDeleteVariantMutationOptions,
|
|
1554
|
+
getDeleteVariantPricingMutationOptions,
|
|
1048
1555
|
getDeleteWarehouseMutationOptions,
|
|
1049
1556
|
getGetApiIdentityAdminPermissionsQueryKey,
|
|
1050
1557
|
getGetApiIdentityAdminPermissionsQueryOptions,
|
|
@@ -1066,15 +1573,25 @@ export {
|
|
|
1066
1573
|
getGetApiIdentityManageInfoQueryOptions,
|
|
1067
1574
|
getGetHealthQueryKey,
|
|
1068
1575
|
getGetHealthQueryOptions,
|
|
1576
|
+
getGetProductQueryKey,
|
|
1577
|
+
getGetProductQueryOptions,
|
|
1578
|
+
getGetVariantPricingQueryKey,
|
|
1579
|
+
getGetVariantPricingQueryOptions,
|
|
1580
|
+
getGetVariantQueryKey,
|
|
1581
|
+
getGetVariantQueryOptions,
|
|
1069
1582
|
getGetWarehouseByIdQueryKey,
|
|
1070
1583
|
getGetWarehouseByIdQueryOptions,
|
|
1071
1584
|
getGetWarehouseOptionsQueryKey,
|
|
1072
1585
|
getGetWarehouseOptionsQueryOptions,
|
|
1073
1586
|
getHealth,
|
|
1587
|
+
getListProductsQueryKey,
|
|
1588
|
+
getListProductsQueryOptions,
|
|
1074
1589
|
getListStockItemsQueryKey,
|
|
1075
1590
|
getListStockItemsQueryOptions,
|
|
1076
1591
|
getListStockMovementsQueryKey,
|
|
1077
1592
|
getListStockMovementsQueryOptions,
|
|
1593
|
+
getListVariantsQueryKey,
|
|
1594
|
+
getListVariantsQueryOptions,
|
|
1078
1595
|
getListWarehousesQueryKey,
|
|
1079
1596
|
getListWarehousesQueryOptions,
|
|
1080
1597
|
getPostApiIdentityAdminRolesMutationOptions,
|
|
@@ -1085,6 +1602,9 @@ export {
|
|
|
1085
1602
|
getPostApiIdentityManage2faMutationOptions,
|
|
1086
1603
|
getPostApiIdentityManageInfoMutationOptions,
|
|
1087
1604
|
getPostApiIdentityResetPasswordMutationOptions,
|
|
1605
|
+
getProduct,
|
|
1606
|
+
getProductParams,
|
|
1607
|
+
getProductResponse,
|
|
1088
1608
|
getPutApiIdentityAdminRolesIdMutationOptions,
|
|
1089
1609
|
getPutApiIdentityAdminRolesIdPermissionsMutationOptions,
|
|
1090
1610
|
getPutApiIdentityAdminUsersIdActiveMutationOptions,
|
|
@@ -1092,13 +1612,27 @@ export {
|
|
|
1092
1612
|
getSearchAddressesQueryKey,
|
|
1093
1613
|
getSearchAddressesQueryOptions,
|
|
1094
1614
|
getToggleWarehouseStatusMutationOptions,
|
|
1615
|
+
getUpdateProductMutationOptions,
|
|
1616
|
+
getUpdateVariantMutationOptions,
|
|
1095
1617
|
getUpdateWarehouseMutationOptions,
|
|
1618
|
+
getUpsertVariantPricingMutationOptions,
|
|
1619
|
+
getVariant,
|
|
1620
|
+
getVariantParams,
|
|
1621
|
+
getVariantPricing,
|
|
1622
|
+
getVariantPricingParams,
|
|
1623
|
+
getVariantPricingResponse,
|
|
1624
|
+
getVariantResponse,
|
|
1096
1625
|
getWarehouseById,
|
|
1097
1626
|
getWarehouseByIdParams,
|
|
1098
1627
|
getWarehouseByIdResponse,
|
|
1099
1628
|
getWarehouseOptions,
|
|
1100
1629
|
getWarehouseOptionsResponse,
|
|
1101
1630
|
getWarehouseOptionsResponseItem,
|
|
1631
|
+
listProducts,
|
|
1632
|
+
listProductsQueryPageDefault,
|
|
1633
|
+
listProductsQueryPageSizeDefault,
|
|
1634
|
+
listProductsQueryParams,
|
|
1635
|
+
listProductsResponse,
|
|
1102
1636
|
listStockItems,
|
|
1103
1637
|
listStockItemsQueryDescendingDefault,
|
|
1104
1638
|
listStockItemsQueryPageDefault,
|
|
@@ -1111,6 +1645,12 @@ export {
|
|
|
1111
1645
|
listStockMovementsQueryPageSizeDefault,
|
|
1112
1646
|
listStockMovementsQueryParams,
|
|
1113
1647
|
listStockMovementsResponse,
|
|
1648
|
+
listVariants,
|
|
1649
|
+
listVariantsParams,
|
|
1650
|
+
listVariantsQueryPageDefault,
|
|
1651
|
+
listVariantsQueryPageSizeDefault,
|
|
1652
|
+
listVariantsQueryParams,
|
|
1653
|
+
listVariantsResponse,
|
|
1114
1654
|
listWarehouses,
|
|
1115
1655
|
listWarehousesQueryPageDefault,
|
|
1116
1656
|
listWarehousesQueryPageSizeDefault,
|
|
@@ -1153,14 +1693,31 @@ export {
|
|
|
1153
1693
|
searchAddressesResponseItem,
|
|
1154
1694
|
toggleWarehouseStatus,
|
|
1155
1695
|
toggleWarehouseStatusParams,
|
|
1696
|
+
updateProduct,
|
|
1697
|
+
updateProductBody,
|
|
1698
|
+
updateProductParams,
|
|
1699
|
+
updateProductResponse,
|
|
1700
|
+
updateVariant,
|
|
1701
|
+
updateVariantBody,
|
|
1702
|
+
updateVariantParams,
|
|
1703
|
+
updateVariantResponse,
|
|
1156
1704
|
updateWarehouse,
|
|
1157
1705
|
updateWarehouseBody,
|
|
1158
1706
|
updateWarehouseParams,
|
|
1707
|
+
upsertVariantPricing,
|
|
1708
|
+
upsertVariantPricingBody,
|
|
1709
|
+
upsertVariantPricingParams,
|
|
1710
|
+
upsertVariantPricingResponse,
|
|
1159
1711
|
useConsumeBatch,
|
|
1160
1712
|
useCreateBatch,
|
|
1713
|
+
useCreateProduct,
|
|
1161
1714
|
useCreateStockItems,
|
|
1715
|
+
useCreateVariant,
|
|
1162
1716
|
useCreateWarehouse,
|
|
1163
1717
|
useDeleteApiIdentityAdminRolesId,
|
|
1718
|
+
useDeleteProduct,
|
|
1719
|
+
useDeleteVariant,
|
|
1720
|
+
useDeleteVariantPricing,
|
|
1164
1721
|
useDeleteWarehouse,
|
|
1165
1722
|
useGetApiIdentityAdminPermissions,
|
|
1166
1723
|
useGetApiIdentityAdminRoles,
|
|
@@ -1172,10 +1729,15 @@ export {
|
|
|
1172
1729
|
useGetApiIdentityManage2fa,
|
|
1173
1730
|
useGetApiIdentityManageInfo,
|
|
1174
1731
|
useGetHealth,
|
|
1732
|
+
useGetProduct,
|
|
1733
|
+
useGetVariant,
|
|
1734
|
+
useGetVariantPricing,
|
|
1175
1735
|
useGetWarehouseById,
|
|
1176
1736
|
useGetWarehouseOptions,
|
|
1737
|
+
useListProducts,
|
|
1177
1738
|
useListStockItems,
|
|
1178
1739
|
useListStockMovements,
|
|
1740
|
+
useListVariants,
|
|
1179
1741
|
useListWarehouses,
|
|
1180
1742
|
usePostApiIdentityAdminRoles,
|
|
1181
1743
|
usePostApiIdentityAdminUsersIdLogout,
|
|
@@ -1191,6 +1753,9 @@ export {
|
|
|
1191
1753
|
usePutApiIdentityAdminUsersIdRoles,
|
|
1192
1754
|
useSearchAddresses,
|
|
1193
1755
|
useToggleWarehouseStatus,
|
|
1194
|
-
|
|
1756
|
+
useUpdateProduct,
|
|
1757
|
+
useUpdateVariant,
|
|
1758
|
+
useUpdateWarehouse,
|
|
1759
|
+
useUpsertVariantPricing
|
|
1195
1760
|
};
|
|
1196
1761
|
//# sourceMappingURL=index.mjs.map
|