washday-sdk 0.0.71 → 0.0.73

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.
Files changed (155) hide show
  1. package/dist/api/axiosInstance.d.ts +2 -0
  2. package/dist/api/axiosInstance.js +4 -8
  3. package/dist/api/cashierbox/delete.d.ts +2 -0
  4. package/dist/api/cashierbox/delete.js +3 -10
  5. package/dist/api/cashierbox/get.d.ts +7 -0
  6. package/dist/api/cashierbox/get.js +7 -16
  7. package/dist/api/cashierbox/post.d.ts +11 -0
  8. package/dist/api/cashierbox/post.js +5 -13
  9. package/dist/api/cashierbox/put.d.ts +4 -0
  10. package/dist/api/cashierbox/put.js +3 -10
  11. package/dist/api/companies/get.d.ts +2 -0
  12. package/dist/api/companies/get.js +3 -10
  13. package/dist/api/companies/post.d.ts +3 -0
  14. package/dist/api/companies/post.js +5 -13
  15. package/dist/api/companies/put.d.ts +4 -0
  16. package/dist/api/companies/put.js +7 -16
  17. package/dist/api/countries/get.d.ts +2 -0
  18. package/dist/api/countries/get.js +3 -10
  19. package/dist/api/countries/post.d.ts +0 -0
  20. package/dist/api/countries/put.d.ts +0 -0
  21. package/dist/api/csv/get.d.ts +11 -0
  22. package/dist/api/csv/get.js +5 -12
  23. package/dist/api/csv/index.d.ts +1 -0
  24. package/dist/api/csv/index.js +1 -27
  25. package/dist/api/customers/delete.d.ts +2 -0
  26. package/dist/api/customers/delete.js +3 -10
  27. package/dist/api/customers/get.d.ts +28 -0
  28. package/dist/api/customers/get.js +12 -22
  29. package/dist/api/customers/index.d.ts +4 -0
  30. package/dist/api/customers/index.js +4 -30
  31. package/dist/api/customers/post.d.ts +18 -0
  32. package/dist/api/customers/post.js +3 -10
  33. package/dist/api/customers/put.d.ts +18 -0
  34. package/dist/api/customers/put.js +3 -10
  35. package/dist/api/discounts/get.d.ts +6 -0
  36. package/dist/api/discounts/get.js +11 -22
  37. package/dist/api/discounts/post.d.ts +3 -0
  38. package/dist/api/discounts/post.js +5 -13
  39. package/dist/api/discounts/put.d.ts +3 -0
  40. package/dist/api/discounts/put.js +5 -13
  41. package/dist/api/index.d.ts +7 -0
  42. package/dist/api/index.js +88 -103
  43. package/dist/api/inventory/delete.d.ts +2 -0
  44. package/dist/api/inventory/delete.js +3 -10
  45. package/dist/api/inventory/get.d.ts +7 -0
  46. package/dist/api/inventory/get.js +7 -16
  47. package/dist/api/inventory/index.d.ts +4 -0
  48. package/dist/api/inventory/index.js +4 -30
  49. package/dist/api/inventory/post.d.ts +7 -0
  50. package/dist/api/inventory/post.js +3 -10
  51. package/dist/api/inventory/put.d.ts +8 -0
  52. package/dist/api/inventory/put.js +5 -13
  53. package/dist/api/order/delete.js +25 -0
  54. package/dist/api/order/get.js +58 -0
  55. package/dist/api/order/index.js +4 -0
  56. package/dist/api/order/post.js +26 -0
  57. package/dist/api/order/put.js +40 -0
  58. package/dist/api/products/delete.d.ts +3 -0
  59. package/dist/api/products/delete.js +5 -13
  60. package/dist/api/products/get.d.ts +2 -0
  61. package/dist/api/products/get.js +3 -10
  62. package/dist/api/products/index.d.ts +4 -0
  63. package/dist/api/products/index.js +4 -30
  64. package/dist/api/products/post.d.ts +27 -0
  65. package/dist/api/products/post.js +5 -13
  66. package/dist/api/products/put.d.ts +21 -0
  67. package/dist/api/products/put.js +5 -13
  68. package/dist/api/sections/delete.d.ts +2 -0
  69. package/dist/api/sections/delete.js +3 -10
  70. package/dist/api/sections/get.d.ts +7 -0
  71. package/dist/api/sections/get.js +5 -13
  72. package/dist/api/sections/index.d.ts +4 -0
  73. package/dist/api/sections/index.js +4 -30
  74. package/dist/api/sections/post.d.ts +7 -0
  75. package/dist/api/sections/post.js +3 -10
  76. package/dist/api/sections/put.d.ts +8 -0
  77. package/dist/api/sections/put.js +3 -10
  78. package/dist/api/staff/delete.d.ts +2 -0
  79. package/dist/api/staff/delete.js +3 -10
  80. package/dist/api/staff/get.d.ts +3 -0
  81. package/dist/api/staff/get.js +5 -13
  82. package/dist/api/staff/post.d.ts +2 -0
  83. package/dist/api/staff/post.js +3 -10
  84. package/dist/api/staff/put.d.ts +2 -0
  85. package/dist/api/staff/put.js +3 -10
  86. package/dist/api/stores/get.d.ts +12 -0
  87. package/dist/api/stores/get.js +9 -19
  88. package/dist/api/stores/post.d.ts +4 -0
  89. package/dist/api/stores/post.js +7 -16
  90. package/dist/api/stores/put.d.ts +6 -0
  91. package/dist/api/stores/put.js +5 -13
  92. package/dist/api/stripe/get.d.ts +0 -0
  93. package/dist/api/stripe/post.d.ts +6 -0
  94. package/dist/api/stripe/post.js +7 -16
  95. package/dist/api/stripe/put.d.ts +0 -0
  96. package/dist/api/supplies/delete.d.ts +2 -0
  97. package/dist/api/supplies/delete.js +3 -10
  98. package/dist/api/supplies/get.d.ts +7 -0
  99. package/dist/api/supplies/get.js +7 -16
  100. package/dist/api/supplies/post.d.ts +11 -0
  101. package/dist/api/supplies/post.js +3 -10
  102. package/dist/api/supplies/put.d.ts +6 -0
  103. package/dist/api/supplies/put.js +5 -13
  104. package/dist/api/users/put.d.ts +10 -0
  105. package/dist/api/users/put.js +3 -10
  106. package/dist/enum/index.d.ts +10 -0
  107. package/dist/enum/index.js +4 -7
  108. package/dist/index.d.ts +3 -0
  109. package/dist/index.js +3 -33
  110. package/dist/interfaces/Api.d.ts +3 -0
  111. package/dist/interfaces/Api.js +1 -2
  112. package/dist/interfaces/Company.d.ts +0 -0
  113. package/dist/interfaces/Customer.d.ts +47 -0
  114. package/dist/interfaces/Customer.js +1 -2
  115. package/dist/interfaces/Order.d.ts +91 -0
  116. package/dist/interfaces/Order.js +1 -2
  117. package/dist/interfaces/Permission.d.ts +22 -0
  118. package/dist/interfaces/Permission.js +1 -2
  119. package/dist/interfaces/Product.d.ts +51 -0
  120. package/dist/interfaces/Product.js +1 -2
  121. package/dist/interfaces/Section.d.ts +13 -0
  122. package/dist/interfaces/Section.js +1 -2
  123. package/dist/interfaces/Store.d.ts +323 -0
  124. package/dist/interfaces/Store.js +1 -2
  125. package/dist/interfaces/StoreImage.d.ts +8 -0
  126. package/dist/interfaces/StoreImage.js +1 -2
  127. package/dist/interfaces/User.d.ts +38 -0
  128. package/dist/interfaces/User.js +1 -2
  129. package/dist/utils/apiUtils.d.ts +3 -0
  130. package/dist/utils/apiUtils.js +2 -6
  131. package/dist/utils/index.d.ts +1 -0
  132. package/dist/utils/index.js +1 -17
  133. package/dist/utils/orders/calculateOrderTotal.d.ts +5 -0
  134. package/dist/utils/orders/calculateOrderTotal.js +10 -14
  135. package/dist/utils/orders/calculateTotalTaxesIncluded.d.ts +9 -0
  136. package/dist/utils/orders/calculateTotalTaxesIncluded.js +3 -7
  137. package/dist/utils/orders/calculateTotalTaxesOverPrice.d.ts +8 -0
  138. package/dist/utils/orders/calculateTotalTaxesOverPrice.js +7 -11
  139. package/dist/utils/orders/helpers.d.ts +15 -0
  140. package/dist/utils/orders/helpers.js +6 -13
  141. package/dist/utils/orders/index.d.ts +2 -0
  142. package/dist/utils/orders/index.js +2 -5
  143. package/dist/utils/receipt/generateReceiptHTML.d.ts +0 -0
  144. package/dist/utils/util.d.ts +0 -0
  145. package/package.json +2 -1
  146. package/src/api/axiosInstance.ts +1 -0
  147. package/src/api/customers/get.ts +1 -1
  148. package/src/api/index.ts +11 -10
  149. package/src/api/order/delete.ts +15 -0
  150. package/src/api/order/get.ts +64 -0
  151. package/src/api/order/index.ts +4 -0
  152. package/src/api/order/post.ts +21 -0
  153. package/src/api/order/put.ts +53 -0
  154. package/src/utils/apiUtils.ts +1 -1
  155. package/tsconfig.json +10 -9
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
2
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
3
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -8,20 +7,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
8
  });
10
9
  };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.addSupplyStock = exports.updateSupplyById = void 0;
16
- const axiosInstance_1 = __importDefault(require("../axiosInstance"));
10
+ import axiosInstance from "../axiosInstance";
17
11
  const GET_SET_SUPPLY = (storeId) => `api/store/${storeId}/supply`;
18
- const updateSupplyById = function (storeId, id, data) {
12
+ export const updateSupplyById = function (storeId, id, data) {
19
13
  return __awaiter(this, void 0, void 0, function* () {
20
14
  try {
21
15
  const config = {
22
16
  headers: { Authorization: `Bearer ${this.apiToken}` }
23
17
  };
24
- const response = yield axiosInstance_1.default.put(`${GET_SET_SUPPLY(storeId)}/${id}`, data, config);
18
+ const response = yield axiosInstance.put(`${GET_SET_SUPPLY(storeId)}/${id}`, data, config);
25
19
  return response;
26
20
  }
27
21
  catch (error) {
@@ -30,14 +24,13 @@ const updateSupplyById = function (storeId, id, data) {
30
24
  }
31
25
  });
32
26
  };
33
- exports.updateSupplyById = updateSupplyById;
34
- const addSupplyStock = function (storeId, id, data) {
27
+ export const addSupplyStock = function (storeId, id, data) {
35
28
  return __awaiter(this, void 0, void 0, function* () {
36
29
  try {
37
30
  const config = {
38
31
  headers: { Authorization: `Bearer ${this.apiToken}` }
39
32
  };
40
- const response = yield axiosInstance_1.default.put(`${GET_SET_SUPPLY(storeId)}/${id}/addStock`, data, config);
33
+ const response = yield axiosInstance.put(`${GET_SET_SUPPLY(storeId)}/${id}/addStock`, data, config);
41
34
  return response;
42
35
  }
43
36
  catch (error) {
@@ -46,4 +39,3 @@ const addSupplyStock = function (storeId, id, data) {
46
39
  }
47
40
  });
48
41
  };
49
- exports.addSupplyStock = addSupplyStock;
@@ -0,0 +1,10 @@
1
+ import { WashdayClientInstance } from "../../interfaces/Api";
2
+ interface userDTO {
3
+ printer?: {
4
+ name: string;
5
+ paperSize: string;
6
+ };
7
+ freshChatRestoreID?: string;
8
+ }
9
+ export declare const updateUserById: (this: WashdayClientInstance, userId: string, data: userDTO) => Promise<any>;
10
+ export {};
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
2
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
3
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -8,23 +7,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
8
  });
10
9
  };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.updateUserById = void 0;
16
- const axiosInstance_1 = __importDefault(require("../axiosInstance"));
10
+ import axiosInstance from "../axiosInstance";
17
11
  const GET_SET_USER = 'api/user';
18
12
  const REQUEST_PARAMS = {
19
13
  token: 'LOGGED_USER_TOKEN',
20
14
  };
21
- const updateUserById = function (userId, data) {
15
+ export const updateUserById = function (userId, data) {
22
16
  return __awaiter(this, void 0, void 0, function* () {
23
17
  try {
24
18
  const config = {
25
19
  headers: { Authorization: `Bearer ${this.apiToken}` }
26
20
  };
27
- const response = yield axiosInstance_1.default.put(`${GET_SET_USER}/${userId}`, data, config);
21
+ const response = yield axiosInstance.put(`${GET_SET_USER}/${userId}`, data, config);
28
22
  return response.data || {};
29
23
  }
30
24
  catch (error) {
@@ -33,4 +27,3 @@ const updateUserById = function (userId, data) {
33
27
  }
34
28
  });
35
29
  };
36
- exports.updateUserById = updateUserById;
@@ -0,0 +1,10 @@
1
+ export declare enum DiscountCodeTypes {
2
+ PERCENTAGE = "percentage",
3
+ NUMBER = "number",
4
+ FREE_DELIVERY = "freeDelivery",
5
+ BUY_X_GET_Y = "buyXGetY"
6
+ }
7
+ export declare enum BuyAndGetConditionsTypes {
8
+ PERCENTAGE = "percentage",
9
+ FREE = "free"
10
+ }
@@ -1,15 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BuyAndGetConditionsTypes = exports.DiscountCodeTypes = void 0;
4
- var DiscountCodeTypes;
1
+ export var DiscountCodeTypes;
5
2
  (function (DiscountCodeTypes) {
6
3
  DiscountCodeTypes["PERCENTAGE"] = "percentage";
7
4
  DiscountCodeTypes["NUMBER"] = "number";
8
5
  DiscountCodeTypes["FREE_DELIVERY"] = "freeDelivery";
9
6
  DiscountCodeTypes["BUY_X_GET_Y"] = "buyXGetY";
10
- })(DiscountCodeTypes || (exports.DiscountCodeTypes = DiscountCodeTypes = {}));
11
- var BuyAndGetConditionsTypes;
7
+ })(DiscountCodeTypes || (DiscountCodeTypes = {}));
8
+ export var BuyAndGetConditionsTypes;
12
9
  (function (BuyAndGetConditionsTypes) {
13
10
  BuyAndGetConditionsTypes["PERCENTAGE"] = "percentage";
14
11
  BuyAndGetConditionsTypes["FREE"] = "free";
15
- })(BuyAndGetConditionsTypes || (exports.BuyAndGetConditionsTypes = BuyAndGetConditionsTypes = {}));
12
+ })(BuyAndGetConditionsTypes || (BuyAndGetConditionsTypes = {}));
@@ -0,0 +1,3 @@
1
+ import * as utils from './utils';
2
+ import WashdayClient from './api';
3
+ export { WashdayClient, utils };
package/dist/index.js CHANGED
@@ -1,33 +1,3 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.utils = exports.WashdayClient = void 0;
30
- const utils = __importStar(require("./utils"));
31
- exports.utils = utils;
32
- const api_1 = __importDefault(require("./api"));
33
- exports.WashdayClient = api_1.default;
1
+ import * as utils from './utils';
2
+ import WashdayClient from './api';
3
+ export { WashdayClient, utils };
@@ -0,0 +1,3 @@
1
+ export type WashdayClientInstance = {
2
+ apiToken: string;
3
+ };
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
File without changes
@@ -0,0 +1,47 @@
1
+ import { IStore } from './Store';
2
+ import { IUser } from "./User";
3
+ interface IInvoiceInfo {
4
+ legal_name: string;
5
+ tax_system: string;
6
+ zipCode: string;
7
+ }
8
+ interface IAddresses {
9
+ addressString: string;
10
+ addressName: string;
11
+ location: {
12
+ latitude: string;
13
+ longitude: string;
14
+ };
15
+ }
16
+ interface IPaymentMethod {
17
+ stripeId: string;
18
+ brand: string;
19
+ exp_month: string;
20
+ exp_year: string;
21
+ last4: string;
22
+ }
23
+ export interface ICustomer {
24
+ name: string;
25
+ phone: string;
26
+ address: string;
27
+ rfc?: string;
28
+ email: string;
29
+ notes?: string;
30
+ privateNotes?: string;
31
+ discount: number;
32
+ credit: number;
33
+ isActive: boolean;
34
+ createdIn: IStore | string;
35
+ createdBy: IUser | string;
36
+ createdDate: Date;
37
+ password?: string;
38
+ google?: boolean;
39
+ facebook?: boolean;
40
+ apple?: boolean;
41
+ useStoreApp?: boolean;
42
+ addresses?: [IAddresses];
43
+ paymentMethods?: [IPaymentMethod];
44
+ stripeCustomerId?: string;
45
+ invoiceInfo?: IInvoiceInfo;
46
+ }
47
+ export {};
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -0,0 +1,91 @@
1
+ import { ICustomer } from "./Customer";
2
+ import { IOrderProduct, IProduct } from "./Product";
3
+ import { ICashierBox, IStore, ITaxConfig } from "./Store";
4
+ import { IUser } from "./User";
5
+ interface IDeliveryInfo {
6
+ date: Date;
7
+ fromTime: string;
8
+ toTime: string;
9
+ }
10
+ interface IPickupInfo {
11
+ date: Date;
12
+ fromTime: string;
13
+ toTime: string;
14
+ }
15
+ export interface IOrderPaymentLines {
16
+ _id?: any;
17
+ amountPaid: number;
18
+ isOnACashUpReport: Boolean;
19
+ cashierBox: ICashierBox | string;
20
+ paymentDate: Date;
21
+ paymentMethod: string;
22
+ description: string;
23
+ createdBy: IUser | string;
24
+ facturapiPaymentInvoiceID?: string | null;
25
+ }
26
+ export interface IOrder {
27
+ delivery: boolean;
28
+ pickup: boolean;
29
+ express: boolean;
30
+ deliveryInfo: IDeliveryInfo;
31
+ pickupInfo?: IPickupInfo;
32
+ phone: string;
33
+ email?: string;
34
+ address: string;
35
+ notes?: string;
36
+ privateNotes?: string;
37
+ isActive: boolean;
38
+ taxesType: string;
39
+ products: Array<IOrderProduct> | Array<string>;
40
+ buyAndGetProducts: Array<IOrderProduct> | Array<string>;
41
+ taxOne?: ITaxConfig;
42
+ taxTwo?: ITaxConfig;
43
+ taxThree?: ITaxConfig;
44
+ creditApplied: number;
45
+ taxesTotal: number;
46
+ total: number;
47
+ totalQuantity: number;
48
+ productTotal: number;
49
+ productTotalWithoutDiscount: number;
50
+ shippingServiceTotal: number;
51
+ totalDiscountAmount: number;
52
+ amountPaid: number;
53
+ prepaidAmount: number | null;
54
+ createdIn: IStore | string;
55
+ createdBy: IUser | string;
56
+ customer: ICustomer | string;
57
+ customerDiscount?: number | null;
58
+ createdDate: Date;
59
+ pickingUpDateTime: Date | null;
60
+ cleanedDateTime: Date | null;
61
+ readyDateTime: Date | null;
62
+ deliveringDateTime: Date | null;
63
+ collectedDateTime: Date | null;
64
+ cancelledDateTime: Date | null;
65
+ paidDateTime: Date | null;
66
+ paymentMethod: string | null;
67
+ prepaidPaymentMethod: string | null;
68
+ status: string;
69
+ pickupRoute: string | null;
70
+ deliveryRoute: string | null;
71
+ sequence?: string | null;
72
+ notifyBy: string;
73
+ stripePaymentIntentId?: string | null;
74
+ markedCleanedBy: IUser | string;
75
+ markedCollectedBy: IUser | string;
76
+ markedCancelledBy: IUser | string;
77
+ appliedStoreDiscounts: Array<string> | null;
78
+ appliedDiscountCodes: Array<string> | null;
79
+ paymentLines: Array<IOrderPaymentLines> | Array<string> | any;
80
+ facturapiInvoiceID?: string | null;
81
+ }
82
+ export interface IOrderInfo {
83
+ topProducts: IProduct[];
84
+ sales: number;
85
+ totalOrderQuantities: number;
86
+ paidFromCredit: number;
87
+ paid: number;
88
+ unpaid: number;
89
+ lastOrderDate: Date;
90
+ }
91
+ export {};
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -0,0 +1,22 @@
1
+ export interface IPermissionType {
2
+ canView: Boolean;
3
+ canMutate: Boolean;
4
+ }
5
+ export interface IPermissionViewType {
6
+ canView: Boolean;
7
+ }
8
+ export interface IPermission {
9
+ product: IPermissionType;
10
+ section: IPermissionType;
11
+ auth: IPermissionType;
12
+ staff: IPermissionType;
13
+ company: IPermissionType;
14
+ store: IPermissionType;
15
+ settings: IPermissionViewType;
16
+ cashierBoxes: IPermissionType;
17
+ reports: IPermissionViewType;
18
+ customers: IPermissionType;
19
+ discounts: IPermissionType;
20
+ reviews: IPermissionViewType;
21
+ inventory: IPermissionType;
22
+ }
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -0,0 +1,51 @@
1
+ import { IStore } from "./Store";
2
+ import { IStoreImage } from "./StoreImage";
3
+ import { IUser } from "./User";
4
+ export interface ProductLineTotals {
5
+ product: IOrderProduct;
6
+ qty: number;
7
+ productLineImportTotal: number;
8
+ productLineTotalWithDiscount: number;
9
+ productLineTaxesTotal: number;
10
+ lineDiscountAmount: number;
11
+ }
12
+ export interface IProduct {
13
+ _id?: string;
14
+ name: string;
15
+ price: number;
16
+ expressPrice: number;
17
+ extraAmount?: number;
18
+ image?: IStoreImage | string;
19
+ overlayText: string;
20
+ sku: string;
21
+ pieces: String;
22
+ taxExemptOne: boolean;
23
+ taxExemptTwo: boolean;
24
+ taxExemptThree: boolean;
25
+ type: String;
26
+ isActive: boolean;
27
+ showInApp: boolean;
28
+ owner: IUser | string;
29
+ store: IStore | string;
30
+ order: number;
31
+ productSupplies?: [IProductSupplies];
32
+ invoice_description?: string;
33
+ invoice_product_key?: string;
34
+ invoice_product_unit_key?: string;
35
+ invoice_product_unit_name?: string;
36
+ }
37
+ export interface IProductSupplies {
38
+ supplyId: String;
39
+ usageAmount: number;
40
+ }
41
+ export interface IStoreProduct extends IProduct {
42
+ }
43
+ export interface IOrderProduct extends IProduct {
44
+ extraAmount: number;
45
+ properties: Array<string>;
46
+ quantity: number;
47
+ discountAmount: number;
48
+ isBuyAndGetProduct: boolean;
49
+ storeProductId: IStoreProduct | string;
50
+ qty?: number;
51
+ }
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -0,0 +1,13 @@
1
+ import { IProduct } from './Product';
2
+ import { IStore } from "./Store";
3
+ import { IUser } from "./User";
4
+ export interface ISection {
5
+ name: string;
6
+ order: number;
7
+ boxColor: string;
8
+ isActive: boolean;
9
+ products?: IProduct[] | Array<string>;
10
+ owner: IUser | string;
11
+ store: IStore | string;
12
+ showInApp?: boolean;
13
+ }
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};