@shopfront/types 0.0.1-alpha.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/Scopes.gen.ts +147 -0
- package/Sync.gen.ts +688 -0
- package/index.ts +2 -0
- package/package.json +14 -0
package/Scopes.gen.ts
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// This file is automatically generated from Shopfront (generate:types). Manual changes will be overwritten.
|
|
3
|
+
export type scopes = "associate_barcode"
|
|
4
|
+
| "see_cost"
|
|
5
|
+
| "see_suppliers"
|
|
6
|
+
| "manage_push_devices"
|
|
7
|
+
| "discount"
|
|
8
|
+
| "hold_sale"
|
|
9
|
+
| "cancel_held_sale"
|
|
10
|
+
| "refund"
|
|
11
|
+
| "cashout"
|
|
12
|
+
| "open_drawer"
|
|
13
|
+
| "create_customers"
|
|
14
|
+
| "manage_takings_see_totals"
|
|
15
|
+
| "manage_takings_adjust_movement"
|
|
16
|
+
| "history_cancel_sale"
|
|
17
|
+
| "history_modify_sale"
|
|
18
|
+
| "product_modify_inventory"
|
|
19
|
+
| "create_products"
|
|
20
|
+
| "edit_barcodes"
|
|
21
|
+
| "edit_products"
|
|
22
|
+
| "delete_products"
|
|
23
|
+
| "create_classifications"
|
|
24
|
+
| "edit_classifications"
|
|
25
|
+
| "delete_classifications"
|
|
26
|
+
| "edit_suppliers"
|
|
27
|
+
| "create_suppliers"
|
|
28
|
+
| "delete_suppliers"
|
|
29
|
+
| "edit_express_promotions"
|
|
30
|
+
| "edit_advance_promotions"
|
|
31
|
+
| "create_express_promotions"
|
|
32
|
+
| "create_advance_promotions"
|
|
33
|
+
| "delete_promotions"
|
|
34
|
+
| "stock_create_order"
|
|
35
|
+
| "stock_create_transfer"
|
|
36
|
+
| "stock_create_return"
|
|
37
|
+
| "stock_edit_order"
|
|
38
|
+
| "stock_edit_transfer"
|
|
39
|
+
| "stock_edit_return"
|
|
40
|
+
| "stock_delete"
|
|
41
|
+
| "stock_receive"
|
|
42
|
+
| "stock_send"
|
|
43
|
+
| "edit_customers"
|
|
44
|
+
| "delete_customers"
|
|
45
|
+
| "adjust_customer_pricing"
|
|
46
|
+
| "adjust_customer_group"
|
|
47
|
+
| "adjust_customer_loyalty"
|
|
48
|
+
| "create_customer_groups"
|
|
49
|
+
| "edit_customer_groups"
|
|
50
|
+
| "delete_customer_groups"
|
|
51
|
+
| "adjust_customer_group_pricing"
|
|
52
|
+
| "adjust_customer_group_loyalty"
|
|
53
|
+
| "create_pricelists"
|
|
54
|
+
| "edit_pricelists"
|
|
55
|
+
| "delete_pricelists"
|
|
56
|
+
| "run_sales_reports"
|
|
57
|
+
| "run_inventory_reports"
|
|
58
|
+
| "view_reporting_dashboard"
|
|
59
|
+
| "view_register_closures"
|
|
60
|
+
| "modify_settings"
|
|
61
|
+
| "modify_sale_keys"
|
|
62
|
+
| "modify_receipts"
|
|
63
|
+
| "modify_statements"
|
|
64
|
+
| "modify_payment_methods"
|
|
65
|
+
| "modify_tax_rates"
|
|
66
|
+
| "modify_transfer_list"
|
|
67
|
+
| "modify_customer_displays"
|
|
68
|
+
| "modify_loyalty"
|
|
69
|
+
| "modify_hardware"
|
|
70
|
+
| "modify_ticket_templates"
|
|
71
|
+
| "modify_integrations"
|
|
72
|
+
| "create_users"
|
|
73
|
+
| "modify_users"
|
|
74
|
+
| "modify_roles_permissions"
|
|
75
|
+
| "see_manage_takings"
|
|
76
|
+
| "see_history"
|
|
77
|
+
| "see_products"
|
|
78
|
+
| "see_classifications"
|
|
79
|
+
| "see_promotions"
|
|
80
|
+
| "see_shelf_tickets"
|
|
81
|
+
| "see_stock_management"
|
|
82
|
+
| "see_customers"
|
|
83
|
+
| "see_customer_groups"
|
|
84
|
+
| "see_pricelists"
|
|
85
|
+
| "see_balances"
|
|
86
|
+
| "view_product"
|
|
87
|
+
| "view_revision_history"
|
|
88
|
+
| "see_stocktake"
|
|
89
|
+
| "see_webhooks"
|
|
90
|
+
| "create_webhooks"
|
|
91
|
+
| "edit_webhooks"
|
|
92
|
+
| "delete_webhooks"
|
|
93
|
+
| "manage_gift_cards"
|
|
94
|
+
| "perform_safe_drop"
|
|
95
|
+
| "perform_stocktake"
|
|
96
|
+
| "run_purchase_reports"
|
|
97
|
+
| "run_actions_reports"
|
|
98
|
+
| "edit_user_dashboard"
|
|
99
|
+
| "manage_billing"
|
|
100
|
+
| "run_advanced_reports"
|
|
101
|
+
| "stock_create_credit"
|
|
102
|
+
| "modify_page_rules"
|
|
103
|
+
| "see_trashed_items"
|
|
104
|
+
| "see_mail_log"
|
|
105
|
+
| "see_media_centre"
|
|
106
|
+
| "upload_media_content"
|
|
107
|
+
| "delete_media_content"
|
|
108
|
+
| "rename_media_content"
|
|
109
|
+
| "create_media_folder"
|
|
110
|
+
| "delete_media_folder"
|
|
111
|
+
| "rename_media_folder"
|
|
112
|
+
| "make_customer_payments"
|
|
113
|
+
| "stock_edit_credit"
|
|
114
|
+
| "sell"
|
|
115
|
+
| "stocktake_apply_zero"
|
|
116
|
+
| "stocktake_apply_ignore"
|
|
117
|
+
| "see_user_menu_graphs"
|
|
118
|
+
| "modify_held_sale_note"
|
|
119
|
+
| "modify_promotion_categories"
|
|
120
|
+
| "run_misc_reports"
|
|
121
|
+
| "change_register"
|
|
122
|
+
| "modify_registers_outlets"
|
|
123
|
+
| "modify_barcode_templates"
|
|
124
|
+
| "clear_local_data"
|
|
125
|
+
| "manage_vendor_connections"
|
|
126
|
+
| "see_recent_register_closures"
|
|
127
|
+
| "express_stocktake"
|
|
128
|
+
| "see_security_events"
|
|
129
|
+
| "see_product_backorders"
|
|
130
|
+
| "add_product_backorder"
|
|
131
|
+
| "update_product_backorder"
|
|
132
|
+
| "view_enterprise_connections"
|
|
133
|
+
| "manage_enterprise_connections"
|
|
134
|
+
| "modify_surcharges"
|
|
135
|
+
| "review_order"
|
|
136
|
+
| "modify_order_reviewers"
|
|
137
|
+
| "use_bump_screen"
|
|
138
|
+
| "configure_kitchen_screens"
|
|
139
|
+
| "see_host_connections"
|
|
140
|
+
| "modify_host_connections"
|
|
141
|
+
| "see_host_changes"
|
|
142
|
+
| "manage_host_changes"
|
|
143
|
+
| "integrate_applications"
|
|
144
|
+
| "modify_report_email_settings"
|
|
145
|
+
| "delete_order_attachment"
|
|
146
|
+
| "modify_default_prices"
|
|
147
|
+
| "product_modify_case_quantity";
|
package/Sync.gen.ts
ADDED
|
@@ -0,0 +1,688 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// This file is automatically generated from Shopfront (generate:types). Manual changes will be overwritten.
|
|
3
|
+
import type { OptionValue } from "./Options.gen";
|
|
4
|
+
|
|
5
|
+
export interface LocalDatabaseBrand {
|
|
6
|
+
mdb_id: number | null;
|
|
7
|
+
name: string;
|
|
8
|
+
uuid: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface LocalDatabaseCategory {
|
|
12
|
+
mdb_id: number | null;
|
|
13
|
+
name: string;
|
|
14
|
+
uuid: string;
|
|
15
|
+
metcash_msc: string | null;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface LocalDatabaseContact {
|
|
19
|
+
address_city: string;
|
|
20
|
+
address_country: string;
|
|
21
|
+
address_postcode: string;
|
|
22
|
+
address_state: string;
|
|
23
|
+
address_street_1: string;
|
|
24
|
+
address_street_2: string;
|
|
25
|
+
address_suburb: string;
|
|
26
|
+
email: string;
|
|
27
|
+
facebook: string;
|
|
28
|
+
fax: string;
|
|
29
|
+
mobile: string;
|
|
30
|
+
phone: string;
|
|
31
|
+
twitter: string;
|
|
32
|
+
uuid: string;
|
|
33
|
+
website: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface LocalDatabaseCustomer {
|
|
37
|
+
uuid: string;
|
|
38
|
+
account_limit: number | null;
|
|
39
|
+
account_receipt: string | null;
|
|
40
|
+
allow_account_sales: boolean;
|
|
41
|
+
autoprint_account_receipt: boolean;
|
|
42
|
+
autoprint_receipt: boolean;
|
|
43
|
+
autoprint_parked_receipt: boolean;
|
|
44
|
+
billing: LocalDatabaseContact;
|
|
45
|
+
billing_contact_id: string;
|
|
46
|
+
birthday: string | null;
|
|
47
|
+
business_number: string;
|
|
48
|
+
client_id: string;
|
|
49
|
+
code: string;
|
|
50
|
+
comments: string;
|
|
51
|
+
company: string;
|
|
52
|
+
current_owing: number;
|
|
53
|
+
customer_group_id: string | null;
|
|
54
|
+
delivery: LocalDatabaseContact;
|
|
55
|
+
delivery_contact_id: string;
|
|
56
|
+
disable_promotions: boolean;
|
|
57
|
+
email: string;
|
|
58
|
+
first_name: string;
|
|
59
|
+
gender: string;
|
|
60
|
+
invoice_message: string;
|
|
61
|
+
last_name: string;
|
|
62
|
+
loyalty: boolean;
|
|
63
|
+
loyalty_points: number;
|
|
64
|
+
loyalty_rate: number | null;
|
|
65
|
+
merged_into: string;
|
|
66
|
+
override_customer_group: boolean;
|
|
67
|
+
pricelist_id: string | null;
|
|
68
|
+
receipt: string | null;
|
|
69
|
+
require_order_reference: number;
|
|
70
|
+
full_name: string;
|
|
71
|
+
name_index: Array<string>;
|
|
72
|
+
phones: Array<string>;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface LocalDatabaseCustomerDisplay {
|
|
76
|
+
idle_display: string;
|
|
77
|
+
main_colour: string;
|
|
78
|
+
name: string;
|
|
79
|
+
sale_display: string;
|
|
80
|
+
text_colour: string;
|
|
81
|
+
uuid: string;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface LocalDatabaseCustomerGroup {
|
|
85
|
+
account_limit: number | null;
|
|
86
|
+
account_receipt_id: string | null;
|
|
87
|
+
allow_account_sales: boolean;
|
|
88
|
+
auto_email_receipt: boolean;
|
|
89
|
+
autoprint_account_receipt: boolean;
|
|
90
|
+
autoprint_receipt: boolean;
|
|
91
|
+
autoprint_parked_receipt: boolean;
|
|
92
|
+
credit_terms: Array<string> | null;
|
|
93
|
+
disable_promotions: boolean;
|
|
94
|
+
email_receipt_id: string | null;
|
|
95
|
+
loyalty: boolean;
|
|
96
|
+
loyalty_rate: number | null;
|
|
97
|
+
name: string;
|
|
98
|
+
pricelist_id: string | null;
|
|
99
|
+
statement_template_id: string | null;
|
|
100
|
+
require_order_reference: boolean;
|
|
101
|
+
uuid: string;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export interface LocalDatabaseFamily {
|
|
105
|
+
mdb_id: number | null;
|
|
106
|
+
name: string;
|
|
107
|
+
uuid: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface LocalDatabaseGiftCard {
|
|
111
|
+
client_id: string;
|
|
112
|
+
code: string;
|
|
113
|
+
current_amount: number;
|
|
114
|
+
expiry: string;
|
|
115
|
+
original_amount: number;
|
|
116
|
+
outlet_id: string;
|
|
117
|
+
status: "active" | "cancelled" | "pending";
|
|
118
|
+
uuid: string;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export interface LocalDatabaseKitchenScreen {
|
|
122
|
+
uuid: string;
|
|
123
|
+
name: string;
|
|
124
|
+
rules: {
|
|
125
|
+
ready: "NOT_DONE"
|
|
126
|
+
| "NOT_STARTED"
|
|
127
|
+
| "STARTED"
|
|
128
|
+
| "DONE",
|
|
129
|
+
categories: Array<string>,
|
|
130
|
+
tags: Array<string>,
|
|
131
|
+
registers: Array<string>,
|
|
132
|
+
outlets: Array<string>,
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export interface LocalDatabaseOutlet {
|
|
137
|
+
uuid: string;
|
|
138
|
+
loyalty_enabled: boolean;
|
|
139
|
+
loyalty_name: string;
|
|
140
|
+
has_kitchen_screen: boolean;
|
|
141
|
+
name: string;
|
|
142
|
+
business_number: string;
|
|
143
|
+
contact: LocalDatabaseContact | null;
|
|
144
|
+
logo: string | null;
|
|
145
|
+
settings: Record<string, OptionValue>;
|
|
146
|
+
ticketing_price_set_id: string;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export interface LocalDatabasePageRule {
|
|
150
|
+
type: "PRODUCT_WIZARD" | "CUSTOMER_WIZARD" | "PROMOTION_WIZARD";
|
|
151
|
+
rule: string;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export interface LocalDatabasePaymentMethod {
|
|
155
|
+
actual_denominations: string;
|
|
156
|
+
allow_cash_out: boolean;
|
|
157
|
+
always_open_drawer: boolean;
|
|
158
|
+
always_print: boolean;
|
|
159
|
+
background_colour: string;
|
|
160
|
+
cashout_method_id: string | null;
|
|
161
|
+
dark_mode_background_colour: string;
|
|
162
|
+
dark_mode_text_colour: string;
|
|
163
|
+
default_pay_exact: boolean;
|
|
164
|
+
gateway_url: string;
|
|
165
|
+
name: string;
|
|
166
|
+
surcharge: number;
|
|
167
|
+
text_colour: string;
|
|
168
|
+
action: string;
|
|
169
|
+
type: "global"
|
|
170
|
+
| "cash"
|
|
171
|
+
| "eftpos"
|
|
172
|
+
| "giftcard"
|
|
173
|
+
| "voucher"
|
|
174
|
+
| "cheque"
|
|
175
|
+
| "pc-eftpos"
|
|
176
|
+
| "linkly-vaa"
|
|
177
|
+
| "direct-deposit"
|
|
178
|
+
| "tyro"
|
|
179
|
+
| "custom";
|
|
180
|
+
use_rounding: boolean;
|
|
181
|
+
uuid: string;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export interface LocalDatabasePriceSet {
|
|
185
|
+
name: string;
|
|
186
|
+
uuid: string;
|
|
187
|
+
parent_id: string | null;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export interface LocalDatabaseSyncablePriceListExclude {
|
|
191
|
+
brands: Array<string>;
|
|
192
|
+
categories: Array<string>;
|
|
193
|
+
families: Array<string>;
|
|
194
|
+
products: Array<string>;
|
|
195
|
+
tags: Array<string>;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export interface LocalDatabasePricelist {
|
|
199
|
+
active: boolean;
|
|
200
|
+
allow_higher_price: boolean;
|
|
201
|
+
allow_discounting_promotions: boolean;
|
|
202
|
+
brands: Array<{
|
|
203
|
+
min_rule: "no-minimum"
|
|
204
|
+
| "discount-percentage"
|
|
205
|
+
| "discount-amount"
|
|
206
|
+
| "discount-item-amount"
|
|
207
|
+
| "cost-percentage"
|
|
208
|
+
| "cost-amount"
|
|
209
|
+
| "last-cost-percentage"
|
|
210
|
+
| "last-cost-amount",
|
|
211
|
+
min_rule_amount: number,
|
|
212
|
+
rule: "discount-percentage"
|
|
213
|
+
| "discount-amount"
|
|
214
|
+
| "discount-item-amount"
|
|
215
|
+
| "cost-percentage"
|
|
216
|
+
| "cost-amount"
|
|
217
|
+
| "last-cost-percentage"
|
|
218
|
+
| "last-cost-amount",
|
|
219
|
+
rule_amount: number,
|
|
220
|
+
uuid: string,
|
|
221
|
+
}>;
|
|
222
|
+
categories: Array<{
|
|
223
|
+
min_rule: "no-minimum"
|
|
224
|
+
| "discount-percentage"
|
|
225
|
+
| "discount-amount"
|
|
226
|
+
| "discount-item-amount"
|
|
227
|
+
| "cost-percentage"
|
|
228
|
+
| "cost-amount"
|
|
229
|
+
| "last-cost-percentage"
|
|
230
|
+
| "last-cost-amount",
|
|
231
|
+
min_rule_amount: number,
|
|
232
|
+
rule: "discount-percentage"
|
|
233
|
+
| "discount-amount"
|
|
234
|
+
| "discount-item-amount"
|
|
235
|
+
| "cost-percentage"
|
|
236
|
+
| "cost-amount"
|
|
237
|
+
| "last-cost-percentage"
|
|
238
|
+
| "last-cost-amount",
|
|
239
|
+
rule_amount: number,
|
|
240
|
+
uuid: string,
|
|
241
|
+
}>;
|
|
242
|
+
excludes: LocalDatabaseSyncablePriceListExclude;
|
|
243
|
+
fallback_rule: {
|
|
244
|
+
min_rule: "no-minimum"
|
|
245
|
+
| "discount-percentage"
|
|
246
|
+
| "discount-amount"
|
|
247
|
+
| "discount-item-amount"
|
|
248
|
+
| "cost-percentage"
|
|
249
|
+
| "cost-amount"
|
|
250
|
+
| "last-cost-percentage"
|
|
251
|
+
| "last-cost-amount",
|
|
252
|
+
min_rule_amount: number,
|
|
253
|
+
rule: "discount-percentage"
|
|
254
|
+
| "discount-amount"
|
|
255
|
+
| "discount-item-amount"
|
|
256
|
+
| "cost-percentage"
|
|
257
|
+
| "cost-amount"
|
|
258
|
+
| "last-cost-percentage"
|
|
259
|
+
| "last-cost-amount",
|
|
260
|
+
rule_amount: number,
|
|
261
|
+
} | null;
|
|
262
|
+
families: Array<{
|
|
263
|
+
min_rule: "no-minimum"
|
|
264
|
+
| "discount-percentage"
|
|
265
|
+
| "discount-amount"
|
|
266
|
+
| "discount-item-amount"
|
|
267
|
+
| "cost-percentage"
|
|
268
|
+
| "cost-amount"
|
|
269
|
+
| "last-cost-percentage"
|
|
270
|
+
| "last-cost-amount"
|
|
271
|
+
| "override",
|
|
272
|
+
min_rule_amount: number,
|
|
273
|
+
rule: "discount-percentage"
|
|
274
|
+
| "discount-amount"
|
|
275
|
+
| "discount-item-amount"
|
|
276
|
+
| "cost-percentage"
|
|
277
|
+
| "cost-amount"
|
|
278
|
+
| "last-cost-percentage"
|
|
279
|
+
| "last-cost-amount"
|
|
280
|
+
| "override",
|
|
281
|
+
rule_amount: number,
|
|
282
|
+
min_prices: Array<{
|
|
283
|
+
quantity: number,
|
|
284
|
+
price: number,
|
|
285
|
+
}>,
|
|
286
|
+
prices: Array<{
|
|
287
|
+
quantity: number,
|
|
288
|
+
price: number,
|
|
289
|
+
}>,
|
|
290
|
+
uuid: string,
|
|
291
|
+
}>;
|
|
292
|
+
name: string;
|
|
293
|
+
products: Array<{
|
|
294
|
+
min_rule: "no-minimum"
|
|
295
|
+
| "discount-percentage"
|
|
296
|
+
| "discount-amount"
|
|
297
|
+
| "discount-item-amount"
|
|
298
|
+
| "cost-percentage"
|
|
299
|
+
| "cost-amount"
|
|
300
|
+
| "last-cost-percentage"
|
|
301
|
+
| "last-cost-amount"
|
|
302
|
+
| "override",
|
|
303
|
+
min_rule_amount: number,
|
|
304
|
+
rule: "discount-percentage"
|
|
305
|
+
| "discount-amount"
|
|
306
|
+
| "discount-item-amount"
|
|
307
|
+
| "cost-percentage"
|
|
308
|
+
| "cost-amount"
|
|
309
|
+
| "last-cost-percentage"
|
|
310
|
+
| "last-cost-amount"
|
|
311
|
+
| "override",
|
|
312
|
+
rule_amount: number,
|
|
313
|
+
min_prices: Array<{
|
|
314
|
+
quantity: number,
|
|
315
|
+
price: number,
|
|
316
|
+
}>,
|
|
317
|
+
prices: Array<{
|
|
318
|
+
quantity: number,
|
|
319
|
+
price: number,
|
|
320
|
+
}>,
|
|
321
|
+
uuid: string,
|
|
322
|
+
}>;
|
|
323
|
+
tags: Array<{
|
|
324
|
+
min_rule: "no-minimum"
|
|
325
|
+
| "discount-percentage"
|
|
326
|
+
| "discount-amount"
|
|
327
|
+
| "discount-item-amount"
|
|
328
|
+
| "cost-percentage"
|
|
329
|
+
| "cost-amount"
|
|
330
|
+
| "last-cost-percentage"
|
|
331
|
+
| "last-cost-amount",
|
|
332
|
+
min_rule_amount: number,
|
|
333
|
+
rule: "discount-percentage"
|
|
334
|
+
| "discount-amount"
|
|
335
|
+
| "discount-item-amount"
|
|
336
|
+
| "cost-percentage"
|
|
337
|
+
| "cost-amount"
|
|
338
|
+
| "last-cost-percentage"
|
|
339
|
+
| "last-cost-amount",
|
|
340
|
+
rule_amount: number,
|
|
341
|
+
uuid: string,
|
|
342
|
+
}>;
|
|
343
|
+
uuid: string;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
export interface LocalDatabaseBarcode {
|
|
347
|
+
code: string;
|
|
348
|
+
quantity: string;
|
|
349
|
+
template: string | null;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
export interface LocalDatabaseInventory {
|
|
353
|
+
outlet_id: string;
|
|
354
|
+
single_level: number;
|
|
355
|
+
case_level: number;
|
|
356
|
+
single_reorder_level: number;
|
|
357
|
+
case_reorder_level: number;
|
|
358
|
+
single_reorder_amount: number;
|
|
359
|
+
case_reorder_amount: number;
|
|
360
|
+
single_reorder_limit: number | null;
|
|
361
|
+
case_reorder_limit: number | null;
|
|
362
|
+
single_max_quantity: number | null;
|
|
363
|
+
case_max_quantity: number | null;
|
|
364
|
+
reorder_rounding: "none"
|
|
365
|
+
| "ceiling"
|
|
366
|
+
| "floor"
|
|
367
|
+
| "natural";
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
export interface LocalDatabaseLoyalty {
|
|
371
|
+
classification_id: string;
|
|
372
|
+
classification_type: string;
|
|
373
|
+
loyalty_value: number;
|
|
374
|
+
outlet_id: string;
|
|
375
|
+
quantity: number;
|
|
376
|
+
redeem_value: number | null;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
export interface LocalDatabasePrice {
|
|
380
|
+
price: number;
|
|
381
|
+
price_set_id: string | null;
|
|
382
|
+
quantity: number;
|
|
383
|
+
loyalty_value: number | null;
|
|
384
|
+
redemption_value: number | null;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
export interface LocalDatabaseProduct {
|
|
388
|
+
additional: Record<string, string>;
|
|
389
|
+
average_cost: string;
|
|
390
|
+
alternate_names: Array<{
|
|
391
|
+
host_connection_id: string,
|
|
392
|
+
quantity: number | null,
|
|
393
|
+
name: string,
|
|
394
|
+
}>;
|
|
395
|
+
barcodes: Array<LocalDatabaseBarcode>;
|
|
396
|
+
brand_id: string | null;
|
|
397
|
+
case_quantity: number;
|
|
398
|
+
category_id: string | null;
|
|
399
|
+
components: Array<{
|
|
400
|
+
add_price: number,
|
|
401
|
+
quantity: number,
|
|
402
|
+
remove_price: number,
|
|
403
|
+
uuid: string,
|
|
404
|
+
}>;
|
|
405
|
+
core_supplier_id: string | null;
|
|
406
|
+
cost: string;
|
|
407
|
+
cost_percentage: boolean;
|
|
408
|
+
costs: Array<{
|
|
409
|
+
outlet_id: string,
|
|
410
|
+
average_cost: string,
|
|
411
|
+
last_cost: string,
|
|
412
|
+
}>;
|
|
413
|
+
description: string;
|
|
414
|
+
family_id: string | null;
|
|
415
|
+
image: string | null;
|
|
416
|
+
inventory: Array<LocalDatabaseInventory>;
|
|
417
|
+
last_cost: string;
|
|
418
|
+
last_supplier_id: string | null;
|
|
419
|
+
loyalty_rates: Array<LocalDatabaseLoyalty>;
|
|
420
|
+
mdb_id: number | null;
|
|
421
|
+
name: string;
|
|
422
|
+
order_notes: string;
|
|
423
|
+
invoice_notes: string;
|
|
424
|
+
parents: Array<string>;
|
|
425
|
+
prices: Array<LocalDatabasePrice>;
|
|
426
|
+
request_price: boolean;
|
|
427
|
+
request_quantity: boolean;
|
|
428
|
+
prevent_manual_discounts: boolean;
|
|
429
|
+
ignore_price_host_changes: boolean;
|
|
430
|
+
ignore_barcode_host_changes: boolean;
|
|
431
|
+
status: "active"
|
|
432
|
+
| "inactive"
|
|
433
|
+
| "not-selling"
|
|
434
|
+
| "not-purchasing";
|
|
435
|
+
suppliers: Array<{
|
|
436
|
+
minimum_order_quantity: number,
|
|
437
|
+
supplier_code: string,
|
|
438
|
+
uuid: string,
|
|
439
|
+
}>;
|
|
440
|
+
tags: Array<string>;
|
|
441
|
+
tax_rate: {
|
|
442
|
+
uuid: string,
|
|
443
|
+
amount: number,
|
|
444
|
+
} | null;
|
|
445
|
+
cost_tax_rate: string | null;
|
|
446
|
+
track_inventory: boolean;
|
|
447
|
+
type: "normal"
|
|
448
|
+
| "basket"
|
|
449
|
+
| "voucher"
|
|
450
|
+
| "package"
|
|
451
|
+
| "component"
|
|
452
|
+
| "integrated";
|
|
453
|
+
use_barcode_templates: boolean;
|
|
454
|
+
use_scales: boolean;
|
|
455
|
+
uuid: string;
|
|
456
|
+
name_index: Array<string>;
|
|
457
|
+
supplier_ids: Array<string>;
|
|
458
|
+
supplier_codes: Array<string>;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
export interface LocalDatabaseSyncablePromotionCriteriaItem {
|
|
462
|
+
id: string;
|
|
463
|
+
type: string;
|
|
464
|
+
rebate: number;
|
|
465
|
+
exclude: boolean;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
export interface LocalDatabasePromotionCriteria {
|
|
469
|
+
type: "sell-item"
|
|
470
|
+
| "sell-total"
|
|
471
|
+
| "discount-item-amount"
|
|
472
|
+
| "discount-total-amount"
|
|
473
|
+
| "discount-percentage"
|
|
474
|
+
| "sell-rate"
|
|
475
|
+
| "quantity-only";
|
|
476
|
+
quantity_type: "exact" | "more";
|
|
477
|
+
buy_amount_type: "quantity" | "amount";
|
|
478
|
+
buy_amount: number;
|
|
479
|
+
buy_amount_max: number | null;
|
|
480
|
+
discount_amount: number;
|
|
481
|
+
min_quantity: number | null;
|
|
482
|
+
optional: boolean;
|
|
483
|
+
mixed_only: boolean;
|
|
484
|
+
exclude_price_points: boolean;
|
|
485
|
+
discount_everyday_promotions: boolean;
|
|
486
|
+
exclude_count_quantity: boolean;
|
|
487
|
+
items: Array<LocalDatabaseSyncablePromotionCriteriaItem>;
|
|
488
|
+
products: Array<{ uuid: string; rebate: number; }>;
|
|
489
|
+
brands: Array<{ uuid: string; rebate: number; }>;
|
|
490
|
+
categories: Array<{ uuid: string; rebate: number; }>;
|
|
491
|
+
families: Array<{ uuid: string; rebate: number; }>;
|
|
492
|
+
tags: Array<{ uuid: string; rebate: number; }>;
|
|
493
|
+
allItems: null | number;
|
|
494
|
+
excludes: {
|
|
495
|
+
products: Array<string>;
|
|
496
|
+
categories: Array<string>;
|
|
497
|
+
brands: Array<string>;
|
|
498
|
+
families: Array<string>;
|
|
499
|
+
tags: Array<string>;
|
|
500
|
+
};
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
export interface LocalDatabasePromotion {
|
|
504
|
+
uuid: string;
|
|
505
|
+
name: string;
|
|
506
|
+
mdb_id: number | null;
|
|
507
|
+
express: boolean;
|
|
508
|
+
promotion_category_id: string | null;
|
|
509
|
+
active: boolean;
|
|
510
|
+
start: string | null;
|
|
511
|
+
end: string | null;
|
|
512
|
+
available_to: Array<string> | null;
|
|
513
|
+
mix_criteria: boolean;
|
|
514
|
+
sale_max_application_count: number | null;
|
|
515
|
+
criteria: Array<LocalDatabasePromotionCriteria>;
|
|
516
|
+
outlets: Array<string>;
|
|
517
|
+
has_schedule: boolean;
|
|
518
|
+
activated_by: string | null;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
export interface LocalDatabasePromotionCategory {
|
|
522
|
+
mdb_id: number | null;
|
|
523
|
+
name: string;
|
|
524
|
+
uuid: string;
|
|
525
|
+
show_on_order: boolean;
|
|
526
|
+
source: string | null;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
export interface LocalDatabaseReceipt {
|
|
530
|
+
accountReceipt: boolean;
|
|
531
|
+
components: string;
|
|
532
|
+
padding: {
|
|
533
|
+
top: number | null,
|
|
534
|
+
left: number | null,
|
|
535
|
+
right: number | null,
|
|
536
|
+
bottom: number | null,
|
|
537
|
+
} | null;
|
|
538
|
+
name: string;
|
|
539
|
+
receiptWidth: number;
|
|
540
|
+
type: "receipt-text"
|
|
541
|
+
| "receipt-full"
|
|
542
|
+
| "a4"
|
|
543
|
+
| "email";
|
|
544
|
+
uuid: string;
|
|
545
|
+
attachments: Array<{
|
|
546
|
+
name: string,
|
|
547
|
+
receipt: string,
|
|
548
|
+
}> | null;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
export interface LocalDatabaseSyncableRegisterSurcharge {
|
|
552
|
+
id: number;
|
|
553
|
+
type: "PERCENTAGE" | "FIXED";
|
|
554
|
+
amount: number;
|
|
555
|
+
taxRate: string | null;
|
|
556
|
+
day: "MONDAY"
|
|
557
|
+
| "TUESDAY"
|
|
558
|
+
| "WEDNESDAY"
|
|
559
|
+
| "THURSDAY"
|
|
560
|
+
| "FRIDAY"
|
|
561
|
+
| "SATURDAY"
|
|
562
|
+
| "SUNDAY";
|
|
563
|
+
start: string;
|
|
564
|
+
end: string;
|
|
565
|
+
name: string;
|
|
566
|
+
appliesTo: Array<{
|
|
567
|
+
id: string,
|
|
568
|
+
type: "Category" | "Tag",
|
|
569
|
+
}> | null;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
export interface LocalDatabaseRegister {
|
|
573
|
+
uuid: string;
|
|
574
|
+
closure_print_settings: {
|
|
575
|
+
account: "table" | "total" | "none",
|
|
576
|
+
account_payments: "table" | "total" | "none",
|
|
577
|
+
discounts: "table" | "total" | "none",
|
|
578
|
+
gift_cards_redeemed: "table" | "total" | "none",
|
|
579
|
+
gift_cards_sold: "table" | "total" | "none",
|
|
580
|
+
movements: "table" | "total" | "none",
|
|
581
|
+
payments: "table" | "total" | "none",
|
|
582
|
+
refunds: "table" | "total" | "none",
|
|
583
|
+
tax: "table" | "total" | "none",
|
|
584
|
+
loyalty: "table" | "total" | "none",
|
|
585
|
+
notes: boolean,
|
|
586
|
+
tags: boolean,
|
|
587
|
+
payment_subtypes: boolean,
|
|
588
|
+
statistics: boolean,
|
|
589
|
+
};
|
|
590
|
+
close_register_tags: Array<string>;
|
|
591
|
+
float: {
|
|
592
|
+
monday: number,
|
|
593
|
+
tuesday: number,
|
|
594
|
+
wednesday: number,
|
|
595
|
+
thursday: number,
|
|
596
|
+
friday: number,
|
|
597
|
+
saturday: number,
|
|
598
|
+
sunday: number,
|
|
599
|
+
};
|
|
600
|
+
surcharges: Array<LocalDatabaseSyncableRegisterSurcharge> | null;
|
|
601
|
+
surcharging_enabled: boolean;
|
|
602
|
+
name: string;
|
|
603
|
+
outlet_id: string;
|
|
604
|
+
payment_methods: Array<string>;
|
|
605
|
+
settings: Record<string, OptionValue>;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
export interface LocalDatabaseSaleKey {
|
|
609
|
+
uuid: string;
|
|
610
|
+
name: string;
|
|
611
|
+
keys: Record<string, any>;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
export interface LocalDatabaseSupplier {
|
|
615
|
+
uuid: string;
|
|
616
|
+
account_number: string;
|
|
617
|
+
business_number: string;
|
|
618
|
+
comments: string;
|
|
619
|
+
contact: LocalDatabaseContact;
|
|
620
|
+
default_order_tax: "inc_tax" | "ex_tax" | "ex_wet";
|
|
621
|
+
distribute_fees: "proportionally" | "evenly";
|
|
622
|
+
distribute_freight: "items" | "cases" | "mixed";
|
|
623
|
+
email_format: "inline" | "csv" | "pdf";
|
|
624
|
+
fee_amount: number;
|
|
625
|
+
mdb_id: number | null;
|
|
626
|
+
name: string;
|
|
627
|
+
order_automatic_email: boolean;
|
|
628
|
+
allow_order_below_minimum: boolean;
|
|
629
|
+
order_notes: string;
|
|
630
|
+
order_internal_notes: string;
|
|
631
|
+
freight_included_on_invoices: boolean;
|
|
632
|
+
freight_tax_id: string | null;
|
|
633
|
+
fees_tax_id: string | null;
|
|
634
|
+
minimum_order_value: number | null;
|
|
635
|
+
maximum_order_value: number | null;
|
|
636
|
+
status: "ACTIVE" | "INACTIVE";
|
|
637
|
+
default_days_until_due: number | null;
|
|
638
|
+
freight_fixed_cost_per_case: number | null;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
export interface LocalDatabaseTag {
|
|
642
|
+
mdb_id: number | null;
|
|
643
|
+
name: string;
|
|
644
|
+
uuid: string;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
export interface LocalDatabaseTaxRate {
|
|
648
|
+
amount: number;
|
|
649
|
+
mdbId: number | null;
|
|
650
|
+
name: string;
|
|
651
|
+
uuid: string;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
export interface LocalDatabaseTransferee {
|
|
655
|
+
uuid: string;
|
|
656
|
+
name: string;
|
|
657
|
+
email_format: "inline" | "csv" | "pdf";
|
|
658
|
+
order_automatic_email: boolean;
|
|
659
|
+
contact: LocalDatabaseContact;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
export interface LocalDatabaseUser {
|
|
663
|
+
dashboard: string;
|
|
664
|
+
email: string;
|
|
665
|
+
image: string;
|
|
666
|
+
is_api_user: boolean;
|
|
667
|
+
last_login_at: string | null;
|
|
668
|
+
name: string;
|
|
669
|
+
permissions: Record<string, number> | null;
|
|
670
|
+
scope: Record<string, number>;
|
|
671
|
+
phone: string;
|
|
672
|
+
quick_menu: Array<{
|
|
673
|
+
external: boolean,
|
|
674
|
+
id: number,
|
|
675
|
+
name: string,
|
|
676
|
+
url: string,
|
|
677
|
+
}>;
|
|
678
|
+
role_id: string | null;
|
|
679
|
+
sale_keys: string;
|
|
680
|
+
sale_keys_position: "default" | "left" | "right";
|
|
681
|
+
dark_mode: "default"
|
|
682
|
+
| "dark"
|
|
683
|
+
| "light"
|
|
684
|
+
| "auto";
|
|
685
|
+
favourite_fields: Record<"product", Array<string>>;
|
|
686
|
+
username: string;
|
|
687
|
+
uuid: string;
|
|
688
|
+
}
|
package/index.ts
ADDED
package/package.json
ADDED