washday-sdk 0.0.157 → 0.0.159

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 (81) hide show
  1. package/dist/utils/index.js +1 -0
  2. package/dist/utils/util.js +18 -1
  3. package/package.json +1 -1
  4. package/src/api/auth/post.ts +1 -0
  5. package/src/interfaces/Customer.ts +15 -11
  6. package/src/utils/index.ts +2 -0
  7. package/src/utils/orders/calculateOrderTotal.test.js +0 -2
  8. package/src/utils/util.ts +19 -1
  9. package/dist/api/axiosInstance.d.ts +0 -2
  10. package/dist/api/cashierbox/delete.d.ts +0 -2
  11. package/dist/api/cashierbox/get.d.ts +0 -7
  12. package/dist/api/cashierbox/post.d.ts +0 -11
  13. package/dist/api/cashierbox/put.d.ts +0 -4
  14. package/dist/api/companies/get.d.ts +0 -2
  15. package/dist/api/companies/post.d.ts +0 -3
  16. package/dist/api/companies/put.d.ts +0 -4
  17. package/dist/api/countries/get.d.ts +0 -2
  18. package/dist/api/countries/post.d.ts +0 -0
  19. package/dist/api/countries/put.d.ts +0 -0
  20. package/dist/api/csv/get.d.ts +0 -11
  21. package/dist/api/csv/index.d.ts +0 -1
  22. package/dist/api/customers/delete.d.ts +0 -2
  23. package/dist/api/customers/get.d.ts +0 -28
  24. package/dist/api/customers/index.d.ts +0 -4
  25. package/dist/api/customers/post.d.ts +0 -18
  26. package/dist/api/customers/put.d.ts +0 -18
  27. package/dist/api/discounts/get.d.ts +0 -6
  28. package/dist/api/discounts/post.d.ts +0 -3
  29. package/dist/api/discounts/put.d.ts +0 -3
  30. package/dist/api/index.d.ts +0 -7
  31. package/dist/api/inventory/delete.d.ts +0 -2
  32. package/dist/api/inventory/get.d.ts +0 -7
  33. package/dist/api/inventory/index.d.ts +0 -4
  34. package/dist/api/inventory/post.d.ts +0 -7
  35. package/dist/api/inventory/put.d.ts +0 -8
  36. package/dist/api/products/delete.d.ts +0 -3
  37. package/dist/api/products/get.d.ts +0 -2
  38. package/dist/api/products/index.d.ts +0 -4
  39. package/dist/api/products/post.d.ts +0 -27
  40. package/dist/api/products/put.d.ts +0 -21
  41. package/dist/api/sections/delete.d.ts +0 -2
  42. package/dist/api/sections/get.d.ts +0 -7
  43. package/dist/api/sections/index.d.ts +0 -4
  44. package/dist/api/sections/post.d.ts +0 -7
  45. package/dist/api/sections/put.d.ts +0 -8
  46. package/dist/api/staff/delete.d.ts +0 -2
  47. package/dist/api/staff/get.d.ts +0 -3
  48. package/dist/api/staff/post.d.ts +0 -2
  49. package/dist/api/staff/put.d.ts +0 -2
  50. package/dist/api/stores/get.d.ts +0 -12
  51. package/dist/api/stores/post.d.ts +0 -4
  52. package/dist/api/stores/put.d.ts +0 -6
  53. package/dist/api/stripe/get.d.ts +0 -0
  54. package/dist/api/stripe/post.d.ts +0 -6
  55. package/dist/api/stripe/put.d.ts +0 -0
  56. package/dist/api/supplies/delete.d.ts +0 -2
  57. package/dist/api/supplies/get.d.ts +0 -7
  58. package/dist/api/supplies/post.d.ts +0 -11
  59. package/dist/api/supplies/put.d.ts +0 -6
  60. package/dist/api/users/put.d.ts +0 -10
  61. package/dist/enum/index.d.ts +0 -10
  62. package/dist/index.d.ts +0 -3
  63. package/dist/interfaces/Api.d.ts +0 -3
  64. package/dist/interfaces/Company.d.ts +0 -0
  65. package/dist/interfaces/Customer.d.ts +0 -47
  66. package/dist/interfaces/Order.d.ts +0 -91
  67. package/dist/interfaces/Permission.d.ts +0 -22
  68. package/dist/interfaces/Product.d.ts +0 -51
  69. package/dist/interfaces/Section.d.ts +0 -13
  70. package/dist/interfaces/Store.d.ts +0 -323
  71. package/dist/interfaces/StoreImage.d.ts +0 -8
  72. package/dist/interfaces/User.d.ts +0 -38
  73. package/dist/utils/apiUtils.d.ts +0 -3
  74. package/dist/utils/index.d.ts +0 -1
  75. package/dist/utils/orders/calculateOrderTotal.d.ts +0 -5
  76. package/dist/utils/orders/calculateTotalTaxesIncluded.d.ts +0 -9
  77. package/dist/utils/orders/calculateTotalTaxesOverPrice.d.ts +0 -8
  78. package/dist/utils/orders/helpers.d.ts +0 -15
  79. package/dist/utils/orders/index.d.ts +0 -2
  80. package/dist/utils/receipt/generateReceiptHTML.d.ts +0 -0
  81. package/dist/utils/util.d.ts +0 -0
@@ -1 +1,2 @@
1
1
  export { applyDiscountToProducts, calculateOrderTotal } from './orders';
2
+ export { getFormattedAddress } from './util';
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  // export function truncateOrFill(str: string, n: number, side: string = 'right') {
3
2
  // let needSpacesQty = n - str.length;
4
3
  // let whiteSpace = '';
@@ -44,3 +43,21 @@
44
43
  // console.log(e);
45
44
  // }
46
45
  // };
46
+ // Function to get a formatted address
47
+ export function getFormattedAddress(address) {
48
+ const { street, neighborhood, postalCode, city, state, country } = address;
49
+ let formatted = '';
50
+ if (street)
51
+ formatted += street;
52
+ if (neighborhood)
53
+ formatted += `, ${neighborhood}`;
54
+ if (city)
55
+ formatted += `, ${city}`;
56
+ if (state)
57
+ formatted += `, ${state}`;
58
+ if (postalCode)
59
+ formatted += `, ${postalCode}`;
60
+ if (country)
61
+ formatted += `, ${country}`;
62
+ return formatted.trim();
63
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "washday-sdk",
3
- "version": "0.0.157",
3
+ "version": "0.0.159",
4
4
  "description": "Washday utilities functions and API",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -35,6 +35,7 @@ export const facebookLogin = async function (this: WashdayClientInstance, params
35
35
  companyId: string;
36
36
  storeId: string;
37
37
  accessToken: string,
38
+ authToken: string;
38
39
  }): Promise<any> {
39
40
  try {
40
41
  const config = {};
@@ -7,15 +7,6 @@ interface IInvoiceInfo {
7
7
  zipCode: string
8
8
  }
9
9
 
10
- interface IAddresses {
11
- addressString: string,
12
- addressName: string,
13
- location: {
14
- latitude: string,
15
- longitude: string
16
- }
17
- }
18
-
19
10
  interface IPaymentMethod {
20
11
  stripeId: string,
21
12
  brand: string,
@@ -24,10 +15,24 @@ interface IPaymentMethod {
24
15
  last4: string,
25
16
  }
26
17
 
18
+ export interface IAddress {
19
+ formattedAddress?: string; // A field to store the full address as a single string
20
+ street?: string;
21
+ neighborhood?: string;
22
+ postalCode?: string;
23
+ city?: string;
24
+ state?: string;
25
+ country?: string;
26
+ coordinates?: {
27
+ lat: number;
28
+ lng: number;
29
+ };
30
+ }
31
+
27
32
  export interface ICustomer {
28
33
  name: string,
29
34
  phone: string,
30
- address: string,
35
+ address: IAddress,
31
36
  rfc?: string,
32
37
  email: string,
33
38
  notes?: string,
@@ -44,7 +49,6 @@ export interface ICustomer {
44
49
  facebook?: boolean,
45
50
  apple?: boolean,
46
51
  useStoreApp?: boolean,
47
- addresses?: [IAddresses],
48
52
  paymentMethods?: [IPaymentMethod],
49
53
  stripeCustomerId?: string,
50
54
  invoiceInfo?: IInvoiceInfo,
@@ -2,3 +2,5 @@ export {
2
2
  applyDiscountToProducts,
3
3
  calculateOrderTotal
4
4
  } from './orders';
5
+
6
+ export { getFormattedAddress } from './util';
@@ -92,7 +92,6 @@ describe("sum function", () => {
92
92
  createdBy: "62d194d77ec933001631e831",
93
93
  createdIn: "629c267812db5b001692adae",
94
94
  company: "629c267712db5b001692ad9e",
95
- addresses: [],
96
95
  paymentMethods: [],
97
96
  __v: 0,
98
97
  title: "Carlos Piña 🍍",
@@ -152,7 +151,6 @@ describe("sum function", () => {
152
151
  createdBy: "62d194d77ec933001631e831",
153
152
  createdIn: "629c267812db5b001692adae",
154
153
  company: "629c267712db5b001692ad9e",
155
- addresses: [],
156
154
  paymentMethods: [],
157
155
  __v: 0,
158
156
  },
package/src/utils/util.ts CHANGED
@@ -14,6 +14,8 @@
14
14
  // : whiteSpace + str;
15
15
  // }
16
16
 
17
+ import { IAddress } from "../interfaces/Customer";
18
+
17
19
  // export const formatMoneyString = (
18
20
  // amount: string | number = 0,
19
21
  // decimalCount: number = 2,
@@ -44,4 +46,20 @@
44
46
  // } catch (e) {
45
47
  // console.log(e);
46
48
  // }
47
- // };
49
+ // };
50
+
51
+ // Function to get a formatted address
52
+ export function getFormattedAddress(address: IAddress): string {
53
+ const { street, neighborhood, postalCode, city, state, country } = address;
54
+
55
+ let formatted = '';
56
+
57
+ if (street) formatted += street;
58
+ if (neighborhood) formatted += `, ${neighborhood}`;
59
+ if (city) formatted += `, ${city}`;
60
+ if (state) formatted += `, ${state}`;
61
+ if (postalCode) formatted += `, ${postalCode}`;
62
+ if (country) formatted += `, ${country}`;
63
+
64
+ return formatted.trim();
65
+ }
@@ -1,2 +0,0 @@
1
- declare const _default: AxiosInstance;
2
- export default _default;
@@ -1,2 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const deleteCashierBoxById: (this: WashdayClientInstance, storeId: string, id: string) => Promise<any>;
@@ -1,7 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const getCashierboxesByStoreId: (this: WashdayClientInstance, storeId: string, queryParams?: string) => Promise<any>;
3
- export declare const getCashierboxesById: (this: WashdayClientInstance, storeId: string, id: string, queryParams?: string) => Promise<any>;
4
- export declare const getCashierBoxMovementsHistory: (this: WashdayClientInstance, storeId: string, id: string, params?: {
5
- pageNum: number;
6
- limit: number;
7
- }) => Promise<any>;
@@ -1,11 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const createCashierBox: (this: WashdayClientInstance, storeId: string, data: {
3
- name: string;
4
- }) => Promise<any>;
5
- export declare const addCashierBoxMovement: (this: WashdayClientInstance, storeId: string, id: string, data: {
6
- type: string;
7
- date: Date;
8
- amount: number;
9
- notes?: string;
10
- paymentMethod: string;
11
- }) => Promise<any>;
@@ -1,4 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const updateCashierBoxById: (this: WashdayClientInstance, storeId: string, id: string, data: {
3
- name: string;
4
- }) => Promise<any>;
@@ -1,2 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const getCompanyById: (this: WashdayClientInstance, companyId: string) => Promise<any>;
@@ -1,3 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const updateCompanyTaxInfoCertificates: (this: WashdayClientInstance, companyId: string, data: any) => Promise<any>;
3
- export declare const updateCFDIOrgLogo: (this: WashdayClientInstance, companyId: string, data: any) => Promise<any>;
@@ -1,4 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const updateCompanyById: (this: WashdayClientInstance, companyId: string, data: any) => Promise<any>;
3
- export declare const updateCompanyLogoById: (this: WashdayClientInstance, companyId: string, data: any) => Promise<any>;
4
- export declare const updateCompanyTaxInfoById: (this: WashdayClientInstance, companyId: string, data: any) => Promise<any>;
@@ -1,2 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const getCountries: (this: WashdayClientInstance) => Promise<any>;
File without changes
File without changes
@@ -1,11 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const exportCustomersList: (this: WashdayClientInstance, params: {
3
- searchTerm?: string;
4
- name?: string;
5
- phone?: string;
6
- email?: string;
7
- fromDate?: string;
8
- toDate?: string;
9
- limit: string;
10
- pageNum: string;
11
- }) => Promise<any>;
@@ -1 +0,0 @@
1
- export * as getModule from './get';
@@ -1,2 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const deleteById: (this: WashdayClientInstance, id: string) => Promise<any>;
@@ -1,28 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- import { ICustomer } from "../../interfaces/Customer";
3
- import { IOrderInfo } from "../../interfaces/Order";
4
- export declare const getList: (this: WashdayClientInstance, params: {
5
- searchTerm?: string;
6
- name?: string;
7
- phone?: string;
8
- email?: string;
9
- fromDate?: string;
10
- toDate?: string;
11
- limit: string;
12
- pageNum: string;
13
- }) => Promise<any>;
14
- export declare const getCustomerById: (this: WashdayClientInstance, customerId: string) => Promise<{
15
- customer: ICustomer;
16
- orderInfo: IOrderInfo;
17
- }>;
18
- export declare const getCustomerHighlightsById: (this: WashdayClientInstance, customerId: string) => Promise<{
19
- customer: ICustomer;
20
- orderInfo: IOrderInfo;
21
- }>;
22
- export declare const getCustomerOrders: (this: WashdayClientInstance, customerId: string, params: {
23
- limit: string;
24
- pageNum: string;
25
- }) => Promise<{
26
- orders: any;
27
- totalRowsCount: any;
28
- }>;
@@ -1,4 +0,0 @@
1
- export * as deleteModule from './delete';
2
- export * as getModule from './get';
3
- export * as postModule from './post';
4
- export * as putModule from './put';
@@ -1,18 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const create: (this: WashdayClientInstance, data: {
3
- name: string;
4
- phone?: string;
5
- email?: string;
6
- address?: string;
7
- notes?: string;
8
- privateNotes?: string;
9
- discount: number;
10
- credit: number;
11
- rfc?: string;
12
- invoiceInfo?: {
13
- legal_name?: string;
14
- tax_system?: string;
15
- zipCode?: string;
16
- };
17
- isActive: boolean;
18
- }) => Promise<any>;
@@ -1,18 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const updateById: (this: WashdayClientInstance, id: string, data: {
3
- name?: string;
4
- phone?: string;
5
- email?: string;
6
- address?: string;
7
- notes?: string;
8
- privateNotes?: string;
9
- discount?: number;
10
- credit?: number;
11
- rfc?: string;
12
- invoiceInfo?: {
13
- legal_name?: string;
14
- tax_system?: string;
15
- zipCode?: string;
16
- };
17
- isActive?: boolean;
18
- }) => Promise<any>;
@@ -1,6 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const getDiscountCodes: (this: WashdayClientInstance, storeId: string, params?: string) => Promise<any>;
3
- export declare const getAutomaticDiscounts: (this: WashdayClientInstance, storeId: string, params?: string) => Promise<any>;
4
- export declare const getDiscountCodeById: (this: WashdayClientInstance, storeId: string, discountId: string) => Promise<any>;
5
- export declare const getAutomaticDiscountById: (this: WashdayClientInstance, storeId: string, discountId: string) => Promise<any>;
6
- export declare const verifyDiscountCode: (this: WashdayClientInstance, storeId: string, code: string) => Promise<any>;
@@ -1,3 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const createAutomaticDiscount: (this: WashdayClientInstance, storeId: string, data: any) => Promise<any>;
3
- export declare const createDiscountCode: (this: WashdayClientInstance, storeId: string, data: any) => Promise<any>;
@@ -1,3 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const deleteDiscountCodeById: (this: WashdayClientInstance, storeId: string, discountId: string) => Promise<any>;
3
- export declare const deleteAutomaticDiscountById: (this: WashdayClientInstance, storeId: string, discountId: string) => Promise<any>;
@@ -1,7 +0,0 @@
1
- type WashdayClientConstructor = {
2
- new (apiToken: string): {
3
- apiToken: string;
4
- };
5
- };
6
- declare const WashdayClient: WashdayClientConstructor;
7
- export default WashdayClient;
@@ -1,2 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const deleteById: (this: WashdayClientInstance, storeId: string, id: string) => Promise<any>;
@@ -1,7 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const getInventory: (this: WashdayClientInstance, storeId: string, queryParams?: string) => Promise<any>;
3
- export declare const getInventoryById: (this: WashdayClientInstance, storeId: string, id: string) => Promise<any>;
4
- export declare const getHistoryById: (this: WashdayClientInstance, storeId: string, id: string, params?: {
5
- pageNum: number;
6
- limit: number;
7
- }) => Promise<any>;
@@ -1,4 +0,0 @@
1
- export * as deleteModule from './delete';
2
- export * as getModule from './get';
3
- export * as postModule from './post';
4
- export * as putModule from './put';
@@ -1,7 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const create: (this: WashdayClientInstance, storeId: string, data: {
3
- product: string;
4
- stock: number;
5
- alertOnStock: number;
6
- stockActivityHistory: Array<any>;
7
- }) => Promise<any>;
@@ -1,8 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const updateById: (this: WashdayClientInstance, storeId: string, id: string, data: {
3
- alertOnStock: number;
4
- }) => Promise<any>;
5
- export declare const addStock: (this: WashdayClientInstance, storeId: string, id: string, data: {
6
- newStock: number;
7
- date: string;
8
- }) => Promise<any>;
@@ -1,3 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const deleteById: (this: WashdayClientInstance, id: string) => Promise<any>;
3
- export declare const deleteProductSupplyById: (this: WashdayClientInstance, id: string, productSupplyId: string) => Promise<any>;
@@ -1,2 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const getById: (this: WashdayClientInstance, id: string) => Promise<any>;
@@ -1,4 +0,0 @@
1
- export * as deleteModule from './delete';
2
- export * as getModule from './get';
3
- export * as postModule from './post';
4
- export * as putModule from './put';
@@ -1,27 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const create: (this: WashdayClientInstance, data: {
3
- name: string;
4
- price: number;
5
- expressPrice: number;
6
- type: 'normal' | 'weight';
7
- pieces: number;
8
- sku?: string;
9
- overlayText: string;
10
- order: number;
11
- taxExemptOne: boolean;
12
- taxExemptTwo: boolean;
13
- taxExemptThree: boolean;
14
- showInApp: boolean;
15
- image: string;
16
- store: string;
17
- section: string;
18
- invoice_description: string;
19
- invoice_product_key: string;
20
- invoice_product_unit_key: string;
21
- invoice_product_unit_name: string;
22
- productSupplies: Array<any>;
23
- }) => Promise<any>;
24
- export declare const createProductSupply: (this: WashdayClientInstance, id: string, data: {
25
- supplyId: string;
26
- usageAmount: number;
27
- }) => Promise<any>;
@@ -1,21 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const bulkUpdate: (this: WashdayClientInstance, storeId: string, data: any) => Promise<any>;
3
- export declare const updateById: (this: WashdayClientInstance, id: string, data: {
4
- name?: string;
5
- price?: number;
6
- expressPrice?: number;
7
- type?: 'normal' | 'weight';
8
- pieces?: number;
9
- sku?: string;
10
- overlayText?: string;
11
- order?: number;
12
- taxExemptOne?: boolean;
13
- taxExemptTwo?: boolean;
14
- taxExemptThree?: boolean;
15
- showInApp?: boolean;
16
- image?: string;
17
- invoice_product_key?: string;
18
- invoice_description?: string;
19
- invoice_product_unit_key?: string;
20
- invoice_product_unit_name?: string;
21
- }) => Promise<any>;
@@ -1,2 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const deleteById: (this: WashdayClientInstance, id: string) => Promise<any>;
@@ -1,7 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const getList: (this: WashdayClientInstance, params?: {
3
- storeId?: string;
4
- isActive?: string;
5
- products?: boolean;
6
- }) => Promise<any>;
7
- export declare const getById: (this: WashdayClientInstance, id: string) => Promise<any>;
@@ -1,4 +0,0 @@
1
- export * as deleteModule from './delete';
2
- export * as getModule from './get';
3
- export * as postModule from './post';
4
- export * as putModule from './put';
@@ -1,7 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const create: (this: WashdayClientInstance, data: {
3
- name: string;
4
- order: number;
5
- boxColor: string;
6
- store: string;
7
- }) => Promise<any>;
@@ -1,8 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const updateById: (this: WashdayClientInstance, id: string, data: {
3
- name?: string;
4
- order?: number;
5
- boxColor?: string;
6
- showInApp?: boolean;
7
- product?: any;
8
- }) => Promise<any>;
@@ -1,2 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const deleteStoreStaffById: (this: WashdayClientInstance, storeId: string, staffId: string) => Promise<any>;
@@ -1,3 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const getStoreStaff: (this: WashdayClientInstance, storeId: string, queryParams?: string) => Promise<any>;
3
- export declare const getStoreStaffById: (this: WashdayClientInstance, storeId: string, staffId: string) => Promise<any>;
@@ -1,2 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const createStoreStaff: (this: WashdayClientInstance, storeId: string, data: any) => Promise<any>;
@@ -1,2 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const updateStoreStaffById: (this: WashdayClientInstance, storeId: string, staffId: string, data: any) => Promise<any>;
@@ -1,12 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- import { IStore } from "../../interfaces/Store";
3
- export declare const getStores: (this: WashdayClientInstance, params: {
4
- isActive?: string;
5
- }) => Promise<{
6
- stores: IStore[];
7
- }>;
8
- export declare const getStoreReviewLink: (this: WashdayClientInstance, storeId: string) => Promise<any>;
9
- export declare const getStoreById: (this: WashdayClientInstance, storeId: string) => Promise<{
10
- store: IStore;
11
- }>;
12
- export declare const getStoreImages: (this: WashdayClientInstance, storeId: string) => Promise<any>;
@@ -1,4 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const createStoreImage: (this: WashdayClientInstance, data: any) => Promise<any>;
3
- export declare const createStore: (this: WashdayClientInstance, data: any) => Promise<any>;
4
- export declare const copyStore: (this: WashdayClientInstance, copyStoreId: string) => Promise<any>;
@@ -1,6 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- import { IStore } from "../../interfaces/Store";
3
- export declare const updateStoreById: (this: WashdayClientInstance, storeId: string, data: IStore) => Promise<{
4
- store: IStore;
5
- }>;
6
- export declare const deleteStoreById: (this: WashdayClientInstance, storeId: string) => Promise<any>;
File without changes
@@ -1,6 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const createCreateSuscriptionCheckoutSession: (this: WashdayClientInstance, data: {
3
- priceId: string;
4
- }) => Promise<any>;
5
- export declare const createCustomerPortalSession: (this: WashdayClientInstance, data?: any) => Promise<any>;
6
- export declare const createCFDISuscrptionCheckoutSession: (this: WashdayClientInstance, data?: any) => Promise<any>;
File without changes
@@ -1,2 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const deleteSupplyById: (this: WashdayClientInstance, storeId: string, id: string) => Promise<any>;
@@ -1,7 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const getSupplies: (this: WashdayClientInstance, storeId: string, queryParams?: string) => Promise<any>;
3
- export declare const getSupplyById: (this: WashdayClientInstance, storeId: string, id: string) => Promise<any>;
4
- export declare const getSupplyHistory: (this: WashdayClientInstance, storeId: string, id: string, params?: {
5
- pageNum: number;
6
- limit: number;
7
- }) => Promise<any>;
@@ -1,11 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- export declare const createSupply: (this: WashdayClientInstance, storeId: string, data: {
3
- name: string;
4
- code: string;
5
- purchaseUnit: string;
6
- usageUnit: string;
7
- usageFactor: number;
8
- stock: number;
9
- alertOnStock: number;
10
- supplyActivityHistory: [];
11
- }) => Promise<any>;
@@ -1,6 +0,0 @@
1
- import { WashdayClientInstance } from "../../interfaces/Api";
2
- import { ISupplies } from "../../interfaces/Store";
3
- export declare const updateSupplyById: (this: WashdayClientInstance, storeId: string, id: string, data: ISupplies) => Promise<any>;
4
- export declare const addSupplyStock: (this: WashdayClientInstance, storeId: string, id: string, data: {
5
- newStock: number;
6
- }) => Promise<any>;
@@ -1,10 +0,0 @@
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,10 +0,0 @@
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
- }
package/dist/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import * as utils from './utils';
2
- import WashdayClient from './api';
3
- export { WashdayClient, utils };
@@ -1,3 +0,0 @@
1
- export type WashdayClientInstance = {
2
- apiToken: string;
3
- };
File without changes