@fctc/interface-logic 4.7.8 → 4.8.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/constants.d.mts +2 -1
- package/dist/constants.d.ts +2 -1
- package/dist/constants.js +1 -0
- package/dist/constants.mjs +1 -0
- package/dist/hooks.d.mts +23 -1
- package/dist/hooks.d.ts +23 -1
- package/dist/hooks.js +128 -31
- package/dist/hooks.mjs +126 -31
- package/dist/provider.d.mts +3 -1
- package/dist/provider.d.ts +3 -1
- package/dist/provider.js +148 -53
- package/dist/provider.mjs +137 -42
- package/dist/services.d.mts +22 -0
- package/dist/services.d.ts +22 -0
- package/dist/services.js +204 -125
- package/dist/services.mjs +201 -122
- package/package.json +1 -1
package/dist/provider.mjs
CHANGED
|
@@ -704,6 +704,7 @@ var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
|
704
704
|
UriConstants2["READ_GROUP"] = "/read_group";
|
|
705
705
|
UriConstants2["GET_NOTIFICATION"] = "/mail/data";
|
|
706
706
|
UriConstants2["PUBLIC_USER_INFO"] = "/public/user/info";
|
|
707
|
+
UriConstants2["FUNCTIONAL_MODULES"] = "/functional-modules";
|
|
707
708
|
return UriConstants2;
|
|
708
709
|
})(UriConstants || {});
|
|
709
710
|
|
|
@@ -6422,11 +6423,34 @@ var completeCurrentStageService = (env) => {
|
|
|
6422
6423
|
};
|
|
6423
6424
|
};
|
|
6424
6425
|
|
|
6425
|
-
// src/services/pos-service/
|
|
6426
|
+
// src/services/pos-service/get-functional-modules.ts
|
|
6426
6427
|
import { useCallback as useCallback41 } from "react";
|
|
6428
|
+
var getFunctionalModulesService = (env) => {
|
|
6429
|
+
const getFunctionalModules = useCallback41(
|
|
6430
|
+
async ({ xNode, service }) => {
|
|
6431
|
+
return env?.requests.get(
|
|
6432
|
+
"/functional-modules" /* FUNCTIONAL_MODULES */,
|
|
6433
|
+
{
|
|
6434
|
+
headers: {
|
|
6435
|
+
"Content-Type": "application/json",
|
|
6436
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
6437
|
+
}
|
|
6438
|
+
},
|
|
6439
|
+
service
|
|
6440
|
+
);
|
|
6441
|
+
},
|
|
6442
|
+
[env]
|
|
6443
|
+
);
|
|
6444
|
+
return {
|
|
6445
|
+
getFunctionalModules
|
|
6446
|
+
};
|
|
6447
|
+
};
|
|
6448
|
+
|
|
6449
|
+
// src/services/pos-service/supabase/add-floor.ts
|
|
6450
|
+
import { useCallback as useCallback42 } from "react";
|
|
6427
6451
|
var addFloorSupabaseService = () => {
|
|
6428
6452
|
const supabase = useSupabaseOptional();
|
|
6429
|
-
const addFloorSupabase =
|
|
6453
|
+
const addFloorSupabase = useCallback42(
|
|
6430
6454
|
async (values) => {
|
|
6431
6455
|
if (!supabase) {
|
|
6432
6456
|
console.error("Supabase client not initialized");
|
|
@@ -6457,10 +6481,10 @@ var addFloorSupabaseService = () => {
|
|
|
6457
6481
|
};
|
|
6458
6482
|
|
|
6459
6483
|
// src/services/pos-service/supabase/add-table.ts
|
|
6460
|
-
import { useCallback as
|
|
6484
|
+
import { useCallback as useCallback43 } from "react";
|
|
6461
6485
|
var addTableSupabaseService = () => {
|
|
6462
6486
|
const supabase = useSupabaseOptional();
|
|
6463
|
-
const addTableSupabase =
|
|
6487
|
+
const addTableSupabase = useCallback43(
|
|
6464
6488
|
async (values) => {
|
|
6465
6489
|
if (!supabase) {
|
|
6466
6490
|
console.error("Supabase client not initialized");
|
|
@@ -6490,10 +6514,10 @@ var addTableSupabaseService = () => {
|
|
|
6490
6514
|
};
|
|
6491
6515
|
|
|
6492
6516
|
// src/services/pos-service/supabase/update-floor.ts
|
|
6493
|
-
import { useCallback as
|
|
6517
|
+
import { useCallback as useCallback44 } from "react";
|
|
6494
6518
|
var updateFloorSupabaseService = () => {
|
|
6495
6519
|
const supabase = useSupabaseOptional();
|
|
6496
|
-
const updateFloorSupabase =
|
|
6520
|
+
const updateFloorSupabase = useCallback44(
|
|
6497
6521
|
async (values) => {
|
|
6498
6522
|
if (!supabase) {
|
|
6499
6523
|
console.error("Supabase client not initialized");
|
|
@@ -6520,10 +6544,10 @@ var updateFloorSupabaseService = () => {
|
|
|
6520
6544
|
};
|
|
6521
6545
|
|
|
6522
6546
|
// src/services/pos-service/supabase/update-table.ts
|
|
6523
|
-
import { useCallback as
|
|
6547
|
+
import { useCallback as useCallback45 } from "react";
|
|
6524
6548
|
var updateTableSupabaseService = () => {
|
|
6525
6549
|
const supabase = useSupabaseOptional();
|
|
6526
|
-
const updateTableSupabase =
|
|
6550
|
+
const updateTableSupabase = useCallback45(
|
|
6527
6551
|
async (values) => {
|
|
6528
6552
|
if (!supabase) {
|
|
6529
6553
|
console.error("Supabase client not initialized");
|
|
@@ -6550,10 +6574,10 @@ var updateTableSupabaseService = () => {
|
|
|
6550
6574
|
};
|
|
6551
6575
|
|
|
6552
6576
|
// src/services/pos-service/supabase/delete-floor.ts
|
|
6553
|
-
import { useCallback as
|
|
6577
|
+
import { useCallback as useCallback46 } from "react";
|
|
6554
6578
|
var deleteFloorSupabaseService = () => {
|
|
6555
6579
|
const supabase = useSupabaseOptional();
|
|
6556
|
-
const deleteFloorSupabase =
|
|
6580
|
+
const deleteFloorSupabase = useCallback46(
|
|
6557
6581
|
async (values) => {
|
|
6558
6582
|
if (!supabase) {
|
|
6559
6583
|
console.error("Supabase client not initialized");
|
|
@@ -6579,10 +6603,10 @@ var deleteFloorSupabaseService = () => {
|
|
|
6579
6603
|
};
|
|
6580
6604
|
|
|
6581
6605
|
// src/services/pos-service/supabase/delete-table.ts
|
|
6582
|
-
import { useCallback as
|
|
6606
|
+
import { useCallback as useCallback47 } from "react";
|
|
6583
6607
|
var deleteTableSupabaseService = () => {
|
|
6584
6608
|
const supabase = useSupabaseOptional();
|
|
6585
|
-
const deleteTableSupabase =
|
|
6609
|
+
const deleteTableSupabase = useCallback47(
|
|
6586
6610
|
async (values) => {
|
|
6587
6611
|
if (!supabase) {
|
|
6588
6612
|
console.error("Supabase client not initialized");
|
|
@@ -6608,10 +6632,10 @@ var deleteTableSupabaseService = () => {
|
|
|
6608
6632
|
};
|
|
6609
6633
|
|
|
6610
6634
|
// src/services/pos-service/supabase/create-order.ts
|
|
6611
|
-
import { useCallback as
|
|
6635
|
+
import { useCallback as useCallback48 } from "react";
|
|
6612
6636
|
var createOrderSupabaseService = () => {
|
|
6613
6637
|
const supabase = useSupabaseOptional();
|
|
6614
|
-
const createOrderSupabase =
|
|
6638
|
+
const createOrderSupabase = useCallback48(
|
|
6615
6639
|
async (values) => {
|
|
6616
6640
|
if (!supabase) {
|
|
6617
6641
|
console.error("Supabase client not initialized");
|
|
@@ -6648,10 +6672,10 @@ var createOrderSupabaseService = () => {
|
|
|
6648
6672
|
};
|
|
6649
6673
|
|
|
6650
6674
|
// src/services/pos-service/supabase/add-product-to-order.ts
|
|
6651
|
-
import { useCallback as
|
|
6675
|
+
import { useCallback as useCallback49 } from "react";
|
|
6652
6676
|
var addProductToOrderSupabaseService = () => {
|
|
6653
6677
|
const supabase = useSupabaseOptional();
|
|
6654
|
-
const addProductToOrderSupabase =
|
|
6678
|
+
const addProductToOrderSupabase = useCallback49(
|
|
6655
6679
|
async (values) => {
|
|
6656
6680
|
if (!supabase) {
|
|
6657
6681
|
console.error("Supabase client not initialized");
|
|
@@ -6688,10 +6712,10 @@ var addProductToOrderSupabaseService = () => {
|
|
|
6688
6712
|
};
|
|
6689
6713
|
|
|
6690
6714
|
// src/services/pos-service/supabase/update-order-total-amount.ts
|
|
6691
|
-
import { useCallback as
|
|
6715
|
+
import { useCallback as useCallback50 } from "react";
|
|
6692
6716
|
var updateOrderTotalAmountSupabaseService = () => {
|
|
6693
6717
|
const supabase = useSupabaseOptional();
|
|
6694
|
-
const updateOrderTotalAmountSupabase =
|
|
6718
|
+
const updateOrderTotalAmountSupabase = useCallback50(
|
|
6695
6719
|
async (values) => {
|
|
6696
6720
|
if (!supabase) {
|
|
6697
6721
|
console.error("Supabase client not initialized");
|
|
@@ -6721,10 +6745,10 @@ var updateOrderTotalAmountSupabaseService = () => {
|
|
|
6721
6745
|
};
|
|
6722
6746
|
|
|
6723
6747
|
// src/services/pos-service/supabase/update-order-line.ts
|
|
6724
|
-
import { useCallback as
|
|
6748
|
+
import { useCallback as useCallback51 } from "react";
|
|
6725
6749
|
var updateOrderLineSupabaseService = () => {
|
|
6726
6750
|
const supabase = useSupabaseOptional();
|
|
6727
|
-
const updateOrderLineSupabase =
|
|
6751
|
+
const updateOrderLineSupabase = useCallback51(
|
|
6728
6752
|
async (values) => {
|
|
6729
6753
|
if (!supabase) {
|
|
6730
6754
|
console.error("Supabase client not initialized");
|
|
@@ -6756,10 +6780,10 @@ var updateOrderLineSupabaseService = () => {
|
|
|
6756
6780
|
};
|
|
6757
6781
|
|
|
6758
6782
|
// src/services/pos-service/supabase/update-order.ts
|
|
6759
|
-
import { useCallback as
|
|
6783
|
+
import { useCallback as useCallback52 } from "react";
|
|
6760
6784
|
var updateOrderSupabaseService = () => {
|
|
6761
6785
|
const supabase = useSupabaseOptional();
|
|
6762
|
-
const updateOrderSupabase =
|
|
6786
|
+
const updateOrderSupabase = useCallback52(
|
|
6763
6787
|
async (values) => {
|
|
6764
6788
|
if (!supabase) {
|
|
6765
6789
|
console.error("Supabase client not initialized");
|
|
@@ -6792,10 +6816,10 @@ var updateOrderSupabaseService = () => {
|
|
|
6792
6816
|
};
|
|
6793
6817
|
|
|
6794
6818
|
// src/services/pos-service/supabase/delete-order.ts
|
|
6795
|
-
import { useCallback as
|
|
6819
|
+
import { useCallback as useCallback53 } from "react";
|
|
6796
6820
|
var deleteOrderSupabaseService = () => {
|
|
6797
6821
|
const supabase = useSupabaseOptional();
|
|
6798
|
-
const deleteOrderSupabase =
|
|
6822
|
+
const deleteOrderSupabase = useCallback53(
|
|
6799
6823
|
async (values) => {
|
|
6800
6824
|
if (!supabase) {
|
|
6801
6825
|
console.error("Supabase client not initialized");
|
|
@@ -6821,10 +6845,10 @@ var deleteOrderSupabaseService = () => {
|
|
|
6821
6845
|
};
|
|
6822
6846
|
|
|
6823
6847
|
// src/services/pos-service/supabase/delete-order-line.ts
|
|
6824
|
-
import { useCallback as
|
|
6848
|
+
import { useCallback as useCallback54 } from "react";
|
|
6825
6849
|
var deleteOrderLineSupabaseService = () => {
|
|
6826
6850
|
const supabase = useSupabaseOptional();
|
|
6827
|
-
const deleteOrderLineSupabase =
|
|
6851
|
+
const deleteOrderLineSupabase = useCallback54(
|
|
6828
6852
|
async (values) => {
|
|
6829
6853
|
if (!supabase) {
|
|
6830
6854
|
console.error("Supabase client not initialized");
|
|
@@ -6850,10 +6874,10 @@ var deleteOrderLineSupabaseService = () => {
|
|
|
6850
6874
|
};
|
|
6851
6875
|
|
|
6852
6876
|
// src/services/pos-service/supabase/add-category.ts
|
|
6853
|
-
import { useCallback as
|
|
6877
|
+
import { useCallback as useCallback55 } from "react";
|
|
6854
6878
|
var addCategorySupabaseService = () => {
|
|
6855
6879
|
const supabase = useSupabaseOptional();
|
|
6856
|
-
const addCategorySupabase =
|
|
6880
|
+
const addCategorySupabase = useCallback55(
|
|
6857
6881
|
async (values) => {
|
|
6858
6882
|
if (!supabase) {
|
|
6859
6883
|
console.error("Supabase client not initialized");
|
|
@@ -6880,6 +6904,53 @@ var addCategorySupabaseService = () => {
|
|
|
6880
6904
|
};
|
|
6881
6905
|
};
|
|
6882
6906
|
|
|
6907
|
+
// src/services/pos-service/supabase/add-product.ts
|
|
6908
|
+
import { useCallback as useCallback56 } from "react";
|
|
6909
|
+
var addProductSupabaseService = () => {
|
|
6910
|
+
const supabase = useSupabaseOptional();
|
|
6911
|
+
const addProductSupabase = useCallback56(
|
|
6912
|
+
async (values) => {
|
|
6913
|
+
if (!supabase) {
|
|
6914
|
+
console.error("Supabase client not initialized");
|
|
6915
|
+
return null;
|
|
6916
|
+
}
|
|
6917
|
+
const insertData = Object.fromEntries(
|
|
6918
|
+
Object.entries({
|
|
6919
|
+
name: values.name,
|
|
6920
|
+
product_tmpl_id: values.product_tmpl_id,
|
|
6921
|
+
product_template_variant_value_ids: values.product_template_variant_value_ids ?? [],
|
|
6922
|
+
combo_ids: values.combo_ids ?? [],
|
|
6923
|
+
categ_id: values.categ_id,
|
|
6924
|
+
pos_categ_ids: values.pos_categ_ids ?? [],
|
|
6925
|
+
display_name: values.display_name || values.name,
|
|
6926
|
+
default_code: values.default_code ?? "",
|
|
6927
|
+
description_sale: values.description_sale ?? "",
|
|
6928
|
+
lst_price: values.lst_price ?? 0,
|
|
6929
|
+
standard_price: values.standard_price ?? 0,
|
|
6930
|
+
barcode: values.barcode ?? "",
|
|
6931
|
+
image_url: values.image_url ?? "",
|
|
6932
|
+
active: values.active ?? true
|
|
6933
|
+
}).filter(([_, v]) => v !== void 0)
|
|
6934
|
+
);
|
|
6935
|
+
try {
|
|
6936
|
+
const { data, error } = await supabase.from("products" /* PRODUCTS */).insert(insertData).select("id, name").single();
|
|
6937
|
+
if (error) {
|
|
6938
|
+
console.error("Error adding product:", error);
|
|
6939
|
+
return null;
|
|
6940
|
+
}
|
|
6941
|
+
return [[data.id, data.name]];
|
|
6942
|
+
} catch (error) {
|
|
6943
|
+
console.error("Error adding product:", error);
|
|
6944
|
+
return null;
|
|
6945
|
+
}
|
|
6946
|
+
},
|
|
6947
|
+
[supabase]
|
|
6948
|
+
);
|
|
6949
|
+
return {
|
|
6950
|
+
addProductSupabase
|
|
6951
|
+
};
|
|
6952
|
+
};
|
|
6953
|
+
|
|
6883
6954
|
// src/services/pos-service/index.ts
|
|
6884
6955
|
var serviceFactories = [
|
|
6885
6956
|
addEntityService,
|
|
@@ -6925,7 +6996,9 @@ var serviceFactories = [
|
|
|
6925
6996
|
updateOrderLineSupabaseService,
|
|
6926
6997
|
updateOrderSupabaseService,
|
|
6927
6998
|
deleteOrderSupabaseService,
|
|
6928
|
-
deleteOrderLineSupabaseService
|
|
6999
|
+
deleteOrderLineSupabaseService,
|
|
7000
|
+
addProductSupabaseService,
|
|
7001
|
+
getFunctionalModulesService
|
|
6929
7002
|
];
|
|
6930
7003
|
var usePosService = () => {
|
|
6931
7004
|
const { env } = useEnv();
|
|
@@ -6974,7 +7047,7 @@ var VersionGate = ({ children }) => {
|
|
|
6974
7047
|
};
|
|
6975
7048
|
|
|
6976
7049
|
// src/provider/env-provider.tsx
|
|
6977
|
-
import { createContext as createContext2, useContext as useContext2, useState as useState4, useCallback as
|
|
7050
|
+
import { createContext as createContext2, useContext as useContext2, useState as useState4, useCallback as useCallback57 } from "react";
|
|
6978
7051
|
|
|
6979
7052
|
// src/configs/axios-client.ts
|
|
6980
7053
|
import axios from "axios";
|
|
@@ -7338,7 +7411,7 @@ function EnvProvider({
|
|
|
7338
7411
|
localStorageUtils: localStorageUtil,
|
|
7339
7412
|
sessionStorageUtils: sessionStorageUtil
|
|
7340
7413
|
});
|
|
7341
|
-
const setupEnv =
|
|
7414
|
+
const setupEnv = useCallback57(
|
|
7342
7415
|
(envConfig) => {
|
|
7343
7416
|
const updatedEnv = {
|
|
7344
7417
|
...env,
|
|
@@ -7352,31 +7425,31 @@ function EnvProvider({
|
|
|
7352
7425
|
},
|
|
7353
7426
|
[env, localStorageUtil, sessionStorageUtil]
|
|
7354
7427
|
);
|
|
7355
|
-
const setUid2 =
|
|
7428
|
+
const setUid2 = useCallback57((uid) => {
|
|
7356
7429
|
setEnvState((prev) => ({
|
|
7357
7430
|
...prev,
|
|
7358
7431
|
context: { ...prev.context, uid }
|
|
7359
7432
|
}));
|
|
7360
7433
|
}, []);
|
|
7361
|
-
const setLang2 =
|
|
7434
|
+
const setLang2 = useCallback57((lang) => {
|
|
7362
7435
|
setEnvState((prev) => ({
|
|
7363
7436
|
...prev,
|
|
7364
7437
|
context: { ...prev.context, lang }
|
|
7365
7438
|
}));
|
|
7366
7439
|
}, []);
|
|
7367
|
-
const setAllowCompanies2 =
|
|
7440
|
+
const setAllowCompanies2 = useCallback57((allowed_company_ids) => {
|
|
7368
7441
|
setEnvState((prev) => ({
|
|
7369
7442
|
...prev,
|
|
7370
7443
|
context: { ...prev.context, allowed_company_ids }
|
|
7371
7444
|
}));
|
|
7372
7445
|
}, []);
|
|
7373
|
-
const setCompanies2 =
|
|
7446
|
+
const setCompanies2 = useCallback57((companies) => {
|
|
7374
7447
|
setEnvState((prev) => ({
|
|
7375
7448
|
...prev,
|
|
7376
7449
|
companies
|
|
7377
7450
|
}));
|
|
7378
7451
|
}, []);
|
|
7379
|
-
const setDefaultCompany2 =
|
|
7452
|
+
const setDefaultCompany2 = useCallback57(
|
|
7380
7453
|
(defaultCompany) => {
|
|
7381
7454
|
setEnvState((prev) => ({
|
|
7382
7455
|
...prev,
|
|
@@ -7385,19 +7458,19 @@ function EnvProvider({
|
|
|
7385
7458
|
},
|
|
7386
7459
|
[]
|
|
7387
7460
|
);
|
|
7388
|
-
const setUserInfo =
|
|
7461
|
+
const setUserInfo = useCallback57((user) => {
|
|
7389
7462
|
setEnvState((prev) => ({
|
|
7390
7463
|
...prev,
|
|
7391
7464
|
user
|
|
7392
7465
|
}));
|
|
7393
7466
|
}, []);
|
|
7394
|
-
const setConfig2 =
|
|
7467
|
+
const setConfig2 = useCallback57((config) => {
|
|
7395
7468
|
setEnvState((prev) => ({
|
|
7396
7469
|
...prev,
|
|
7397
7470
|
config
|
|
7398
7471
|
}));
|
|
7399
7472
|
}, []);
|
|
7400
|
-
const setEnvFile2 =
|
|
7473
|
+
const setEnvFile2 = useCallback57((envFile) => {
|
|
7401
7474
|
setEnvState((prev) => ({
|
|
7402
7475
|
...prev,
|
|
7403
7476
|
envFile
|
|
@@ -8318,9 +8391,9 @@ var BaseModel = class {
|
|
|
8318
8391
|
};
|
|
8319
8392
|
|
|
8320
8393
|
// src/hooks/model/use-model.ts
|
|
8321
|
-
import { useCallback as
|
|
8394
|
+
import { useCallback as useCallback58 } from "react";
|
|
8322
8395
|
var useModel = () => {
|
|
8323
|
-
const initModel =
|
|
8396
|
+
const initModel = useCallback58((modelData) => {
|
|
8324
8397
|
switch (modelData?.name) {
|
|
8325
8398
|
default:
|
|
8326
8399
|
return new BaseModel(modelData);
|
|
@@ -9574,6 +9647,26 @@ var useDeleteOrderLine = () => {
|
|
|
9574
9647
|
};
|
|
9575
9648
|
var use_delete_order_line_default = useDeleteOrderLine;
|
|
9576
9649
|
|
|
9650
|
+
// src/hooks/pos/supabase/use-add-product.ts
|
|
9651
|
+
import { useMutation as useMutation102 } from "@tanstack/react-query";
|
|
9652
|
+
var useAddProduct = () => {
|
|
9653
|
+
const { addProductSupabase } = addProductSupabaseService();
|
|
9654
|
+
return useMutation102({
|
|
9655
|
+
mutationFn: addProductSupabase
|
|
9656
|
+
});
|
|
9657
|
+
};
|
|
9658
|
+
var use_add_product_default = useAddProduct;
|
|
9659
|
+
|
|
9660
|
+
// src/hooks/pos/use-get-functional-modules.ts
|
|
9661
|
+
import { useMutation as useMutation103 } from "@tanstack/react-query";
|
|
9662
|
+
var useGetFunctionalModules = () => {
|
|
9663
|
+
const pos = usePosService();
|
|
9664
|
+
return useMutation103({
|
|
9665
|
+
mutationFn: pos.getFunctionalModules
|
|
9666
|
+
});
|
|
9667
|
+
};
|
|
9668
|
+
var use_get_functional_modules_default = useGetFunctionalModules;
|
|
9669
|
+
|
|
9577
9670
|
// src/provider/service-provider.tsx
|
|
9578
9671
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
9579
9672
|
var ServiceContext = createContext3(null);
|
|
@@ -9708,7 +9801,9 @@ var ServiceProvider = ({
|
|
|
9708
9801
|
useUpdateOrderLine: use_update_order_line_default,
|
|
9709
9802
|
useUpdateOrder: use_update_order_default,
|
|
9710
9803
|
useDeleteOrder: use_delete_order_default,
|
|
9711
|
-
useDeleteOrderLine: use_delete_order_line_default
|
|
9804
|
+
useDeleteOrderLine: use_delete_order_line_default,
|
|
9805
|
+
useAddProduct: use_add_product_default,
|
|
9806
|
+
useGetFunctionalModules: use_get_functional_modules_default
|
|
9712
9807
|
};
|
|
9713
9808
|
return /* @__PURE__ */ jsx7(ServiceContext.Provider, { value: services, children });
|
|
9714
9809
|
};
|
package/dist/services.d.mts
CHANGED
|
@@ -746,6 +746,28 @@ declare const serviceFactories: readonly [(env: any) => {
|
|
|
746
746
|
deleteOrderLineSupabase: (values: {
|
|
747
747
|
line_id: number;
|
|
748
748
|
}) => Promise<number[]>;
|
|
749
|
+
}, () => {
|
|
750
|
+
addProductSupabase: (values: {
|
|
751
|
+
name: string;
|
|
752
|
+
product_tmpl_id?: number;
|
|
753
|
+
product_template_variant_value_ids?: number[];
|
|
754
|
+
combo_ids?: number[];
|
|
755
|
+
categ_id?: number;
|
|
756
|
+
pos_categ_ids?: number[];
|
|
757
|
+
display_name?: string;
|
|
758
|
+
default_code?: string;
|
|
759
|
+
description_sale?: string;
|
|
760
|
+
lst_price?: number;
|
|
761
|
+
standard_price?: number;
|
|
762
|
+
barcode?: string;
|
|
763
|
+
image_url?: string;
|
|
764
|
+
active?: boolean;
|
|
765
|
+
}) => Promise<[number, string][] | null>;
|
|
766
|
+
}, (env: any) => {
|
|
767
|
+
getFunctionalModules: ({ xNode, service }: {
|
|
768
|
+
service?: string;
|
|
769
|
+
xNode?: string;
|
|
770
|
+
}) => Promise<any>;
|
|
749
771
|
}];
|
|
750
772
|
type ServiceFactories = (typeof serviceFactories)[number];
|
|
751
773
|
type ServiceReturn<T extends ServiceFactories> = ReturnType<T>;
|
package/dist/services.d.ts
CHANGED
|
@@ -746,6 +746,28 @@ declare const serviceFactories: readonly [(env: any) => {
|
|
|
746
746
|
deleteOrderLineSupabase: (values: {
|
|
747
747
|
line_id: number;
|
|
748
748
|
}) => Promise<number[]>;
|
|
749
|
+
}, () => {
|
|
750
|
+
addProductSupabase: (values: {
|
|
751
|
+
name: string;
|
|
752
|
+
product_tmpl_id?: number;
|
|
753
|
+
product_template_variant_value_ids?: number[];
|
|
754
|
+
combo_ids?: number[];
|
|
755
|
+
categ_id?: number;
|
|
756
|
+
pos_categ_ids?: number[];
|
|
757
|
+
display_name?: string;
|
|
758
|
+
default_code?: string;
|
|
759
|
+
description_sale?: string;
|
|
760
|
+
lst_price?: number;
|
|
761
|
+
standard_price?: number;
|
|
762
|
+
barcode?: string;
|
|
763
|
+
image_url?: string;
|
|
764
|
+
active?: boolean;
|
|
765
|
+
}) => Promise<[number, string][] | null>;
|
|
766
|
+
}, (env: any) => {
|
|
767
|
+
getFunctionalModules: ({ xNode, service }: {
|
|
768
|
+
service?: string;
|
|
769
|
+
xNode?: string;
|
|
770
|
+
}) => Promise<any>;
|
|
749
771
|
}];
|
|
750
772
|
type ServiceFactories = (typeof serviceFactories)[number];
|
|
751
773
|
type ServiceReturn<T extends ServiceFactories> = ReturnType<T>;
|