@chift/chift-nodejs 1.0.5 → 1.0.6
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/.eslintcache +1 -1
- package/CHANGELOG.md +4 -0
- package/dist/src/modules/api.d.ts +855 -420
- package/dist/src/modules/consumer.d.ts +56 -28
- package/dist/src/modules/consumers.d.ts +285 -140
- package/dist/src/modules/internalApi.js +10 -5
- package/dist/src/modules/pos.d.ts +4 -0
- package/dist/src/modules/pos.js +14 -0
- package/dist/src/modules/sync.d.ts +229 -113
- package/dist/src/modules/syncs.d.ts +570 -280
- package/dist/test/modules/pos.test.js +13 -0
- package/jest.config.ts +1 -1
- package/package.json +1 -1
- package/src/modules/pos.ts +26 -0
- package/src/modules/sync.ts +1 -1
- package/src/modules/syncs.ts +2 -2
- package/src/types/public-api/schema.d.ts +426 -80
- package/test/modules/consumer.test.ts +1 -1
- package/test/modules/pos.test.ts +15 -0
|
@@ -74,6 +74,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
74
74
|
name?: string | undefined;
|
|
75
75
|
total: number;
|
|
76
76
|
}[] | undefined;
|
|
77
|
+
product_id?: string | undefined;
|
|
77
78
|
}[];
|
|
78
79
|
payments: {
|
|
79
80
|
id?: string | undefined;
|
|
@@ -140,6 +141,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
140
141
|
name?: string | undefined;
|
|
141
142
|
total: number;
|
|
142
143
|
}[] | undefined;
|
|
144
|
+
product_id?: string | undefined;
|
|
143
145
|
}[];
|
|
144
146
|
payments: {
|
|
145
147
|
id?: string | undefined;
|
|
@@ -221,6 +223,22 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
221
223
|
name: string;
|
|
222
224
|
extra?: string | undefined;
|
|
223
225
|
}[]>;
|
|
226
|
+
getProductCategories(params: {}): import("../types/api").RequestData<{
|
|
227
|
+
id: string;
|
|
228
|
+
name: string;
|
|
229
|
+
description?: string | undefined;
|
|
230
|
+
id_parent?: string | undefined;
|
|
231
|
+
}[]>;
|
|
232
|
+
getProducts(params: {}): import("../types/api").RequestData<{
|
|
233
|
+
id: string;
|
|
234
|
+
categories?: string[] | undefined;
|
|
235
|
+
name: string;
|
|
236
|
+
description?: string | undefined;
|
|
237
|
+
prices: {
|
|
238
|
+
unit_price: number;
|
|
239
|
+
tax_rate: number;
|
|
240
|
+
}[];
|
|
241
|
+
}[]>;
|
|
224
242
|
getSales(params: {
|
|
225
243
|
date_from: string;
|
|
226
244
|
date_to: string;
|
|
@@ -279,6 +297,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
279
297
|
name?: string | undefined;
|
|
280
298
|
total: number;
|
|
281
299
|
}[] | undefined;
|
|
300
|
+
product_id?: string | undefined;
|
|
282
301
|
}[];
|
|
283
302
|
payments: {
|
|
284
303
|
id?: string | undefined;
|
|
@@ -1114,21 +1133,21 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
1114
1133
|
name: string;
|
|
1115
1134
|
currency: string;
|
|
1116
1135
|
}): import("../types/api").RequestData<{
|
|
1117
|
-
|
|
1136
|
+
id: string;
|
|
1137
|
+
active: boolean;
|
|
1118
1138
|
code?: string | undefined;
|
|
1119
|
-
name
|
|
1139
|
+
name: string;
|
|
1120
1140
|
currency?: string | undefined;
|
|
1121
|
-
id?: string | undefined;
|
|
1122
1141
|
balance?: number | undefined;
|
|
1123
1142
|
credit?: number | undefined;
|
|
1124
1143
|
debit?: number | undefined;
|
|
1125
1144
|
}>;
|
|
1126
1145
|
getAnalyticAccounts(): import("../types/api").RequestData<{
|
|
1127
|
-
|
|
1146
|
+
id: string;
|
|
1147
|
+
active: boolean;
|
|
1128
1148
|
code?: string | undefined;
|
|
1129
|
-
name
|
|
1149
|
+
name: string;
|
|
1130
1150
|
currency?: string | undefined;
|
|
1131
|
-
id?: string | undefined;
|
|
1132
1151
|
balance?: number | undefined;
|
|
1133
1152
|
credit?: number | undefined;
|
|
1134
1153
|
debit?: number | undefined;
|
|
@@ -1139,22 +1158,22 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
1139
1158
|
name: string;
|
|
1140
1159
|
currency: string;
|
|
1141
1160
|
}): import("../types/api").RequestData<{
|
|
1142
|
-
|
|
1161
|
+
id: string;
|
|
1162
|
+
active: boolean;
|
|
1143
1163
|
code?: string | undefined;
|
|
1144
|
-
name
|
|
1164
|
+
name: string;
|
|
1145
1165
|
currency?: string | undefined;
|
|
1146
|
-
id?: string | undefined;
|
|
1147
1166
|
balance?: number | undefined;
|
|
1148
1167
|
credit?: number | undefined;
|
|
1149
1168
|
debit?: number | undefined;
|
|
1150
1169
|
analytic_plan: string;
|
|
1151
1170
|
}>;
|
|
1152
1171
|
getAnalyticAccount(analytic_account_id: string): import("../types/api").RequestData<{
|
|
1153
|
-
|
|
1172
|
+
id: string;
|
|
1173
|
+
active: boolean;
|
|
1154
1174
|
code?: string | undefined;
|
|
1155
|
-
name
|
|
1175
|
+
name: string;
|
|
1156
1176
|
currency?: string | undefined;
|
|
1157
|
-
id?: string | undefined;
|
|
1158
1177
|
balance?: number | undefined;
|
|
1159
1178
|
credit?: number | undefined;
|
|
1160
1179
|
debit?: number | undefined;
|
|
@@ -1165,21 +1184,21 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
1165
1184
|
name?: string | undefined;
|
|
1166
1185
|
currency?: string | undefined;
|
|
1167
1186
|
}): import("../types/api").RequestData<{
|
|
1168
|
-
|
|
1187
|
+
id: string;
|
|
1188
|
+
active: boolean;
|
|
1169
1189
|
code?: string | undefined;
|
|
1170
|
-
name
|
|
1190
|
+
name: string;
|
|
1171
1191
|
currency?: string | undefined;
|
|
1172
|
-
id?: string | undefined;
|
|
1173
1192
|
balance?: number | undefined;
|
|
1174
1193
|
credit?: number | undefined;
|
|
1175
1194
|
debit?: number | undefined;
|
|
1176
1195
|
}>;
|
|
1177
1196
|
getAnalyticAccountWithMultiplePlans(analytic_account_id: string, analytic_plan: string): import("../types/api").RequestData<{
|
|
1178
|
-
|
|
1197
|
+
id: string;
|
|
1198
|
+
active: boolean;
|
|
1179
1199
|
code?: string | undefined;
|
|
1180
|
-
name
|
|
1200
|
+
name: string;
|
|
1181
1201
|
currency?: string | undefined;
|
|
1182
|
-
id?: string | undefined;
|
|
1183
1202
|
balance?: number | undefined;
|
|
1184
1203
|
credit?: number | undefined;
|
|
1185
1204
|
debit?: number | undefined;
|
|
@@ -1191,22 +1210,22 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
1191
1210
|
name?: string | undefined;
|
|
1192
1211
|
currency?: string | undefined;
|
|
1193
1212
|
}): import("../types/api").RequestData<{
|
|
1194
|
-
|
|
1213
|
+
id: string;
|
|
1214
|
+
active: boolean;
|
|
1195
1215
|
code?: string | undefined;
|
|
1196
|
-
name
|
|
1216
|
+
name: string;
|
|
1197
1217
|
currency?: string | undefined;
|
|
1198
|
-
id?: string | undefined;
|
|
1199
1218
|
balance?: number | undefined;
|
|
1200
1219
|
credit?: number | undefined;
|
|
1201
1220
|
debit?: number | undefined;
|
|
1202
1221
|
analytic_plan: string;
|
|
1203
1222
|
}>;
|
|
1204
1223
|
getAnalyticAccountsWithMultiplePlans(): import("../types/api").RequestData<{
|
|
1205
|
-
|
|
1224
|
+
id: string;
|
|
1225
|
+
active: boolean;
|
|
1206
1226
|
code?: string | undefined;
|
|
1207
|
-
name
|
|
1227
|
+
name: string;
|
|
1208
1228
|
currency?: string | undefined;
|
|
1209
|
-
id?: string | undefined;
|
|
1210
1229
|
balance?: number | undefined;
|
|
1211
1230
|
credit?: number | undefined;
|
|
1212
1231
|
debit?: number | undefined;
|
|
@@ -1743,6 +1762,8 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
1743
1762
|
category?: string | undefined;
|
|
1744
1763
|
currency?: string | undefined;
|
|
1745
1764
|
description?: string | undefined;
|
|
1765
|
+
available_quantity?: number | undefined;
|
|
1766
|
+
cost?: number | undefined;
|
|
1746
1767
|
}[]>;
|
|
1747
1768
|
getProductById(productId: string): import("../types/api").RequestData<{
|
|
1748
1769
|
id: string;
|
|
@@ -1758,6 +1779,8 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
1758
1779
|
category?: string | undefined;
|
|
1759
1780
|
currency?: string | undefined;
|
|
1760
1781
|
description?: string | undefined;
|
|
1782
|
+
available_quantity?: number | undefined;
|
|
1783
|
+
cost?: number | undefined;
|
|
1761
1784
|
}>;
|
|
1762
1785
|
createProduct(product: {
|
|
1763
1786
|
name: string;
|
|
@@ -1782,6 +1805,8 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
1782
1805
|
category?: string | undefined;
|
|
1783
1806
|
currency?: string | undefined;
|
|
1784
1807
|
description?: string | undefined;
|
|
1808
|
+
available_quantity?: number | undefined;
|
|
1809
|
+
cost?: number | undefined;
|
|
1785
1810
|
}>;
|
|
1786
1811
|
getTaxes(): import("../types/api").RequestData<{
|
|
1787
1812
|
id: string;
|
|
@@ -1890,7 +1915,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
1890
1915
|
birthdate?: string | undefined;
|
|
1891
1916
|
gender?: "H" | "F" | "N/A" | undefined;
|
|
1892
1917
|
addresses?: {
|
|
1893
|
-
address_type: "main" | "delivery" | "invoice";
|
|
1918
|
+
address_type: "main" | "delivery" | "invoice" | "other";
|
|
1894
1919
|
name?: string | undefined;
|
|
1895
1920
|
number?: string | undefined;
|
|
1896
1921
|
box?: string | undefined;
|
|
@@ -1930,7 +1955,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
1930
1955
|
birthdate?: string | undefined;
|
|
1931
1956
|
gender?: "H" | "F" | "N/A" | undefined;
|
|
1932
1957
|
addresses?: {
|
|
1933
|
-
address_type: "main" | "delivery" | "invoice";
|
|
1958
|
+
address_type: "main" | "delivery" | "invoice" | "other";
|
|
1934
1959
|
name?: string | undefined;
|
|
1935
1960
|
number?: string | undefined;
|
|
1936
1961
|
box?: string | undefined;
|
|
@@ -1965,7 +1990,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
1965
1990
|
birthdate?: string | undefined;
|
|
1966
1991
|
gender?: "H" | "F" | "N/A" | undefined;
|
|
1967
1992
|
addresses?: {
|
|
1968
|
-
address_type: "main" | "delivery" | "invoice";
|
|
1993
|
+
address_type: "main" | "delivery" | "invoice" | "other";
|
|
1969
1994
|
name?: string | undefined;
|
|
1970
1995
|
number?: string | undefined;
|
|
1971
1996
|
box?: string | undefined;
|
|
@@ -2004,7 +2029,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
2004
2029
|
birthdate?: string | undefined;
|
|
2005
2030
|
gender?: "H" | "F" | "N/A" | undefined;
|
|
2006
2031
|
addresses?: {
|
|
2007
|
-
address_type: "main" | "delivery" | "invoice";
|
|
2032
|
+
address_type: "main" | "delivery" | "invoice" | "other";
|
|
2008
2033
|
name?: string | undefined;
|
|
2009
2034
|
number?: string | undefined;
|
|
2010
2035
|
box?: string | undefined;
|
|
@@ -2656,11 +2681,13 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
2656
2681
|
link_mappings?: {
|
|
2657
2682
|
name: string;
|
|
2658
2683
|
description: string;
|
|
2684
|
+
logic?: Record<string, never> | undefined;
|
|
2659
2685
|
values: {
|
|
2660
2686
|
source_id: string;
|
|
2661
2687
|
target_id: string;
|
|
2662
2688
|
}[];
|
|
2663
2689
|
}[] | undefined;
|
|
2690
|
+
link_metadata?: Record<string, never> | undefined;
|
|
2664
2691
|
enabled_flows?: {
|
|
2665
2692
|
name: string;
|
|
2666
2693
|
description?: string | undefined;
|
|
@@ -2685,6 +2712,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
2685
2712
|
}[] | undefined;
|
|
2686
2713
|
} | undefined;
|
|
2687
2714
|
values: Record<string, never>;
|
|
2715
|
+
enabled_on: string;
|
|
2688
2716
|
}[] | undefined;
|
|
2689
2717
|
}>;
|
|
2690
2718
|
getDataByDataStoreName: (dataStoreName: string, params?: object) => Promise<{
|