washday-sdk 0.0.179 → 0.0.180

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.
@@ -13,11 +13,12 @@ const GET_SET_ORDER = 'api/v2/order';
13
13
  const GET_SET_ORDER_CFDI = 'api/v2/orders';
14
14
  const GET_HEADER_SUMMARY = 'api/orderHeaderSummary';
15
15
  const GET_SET_ORDER_CUSTOMERS_APP = 'api/v2/washdayapp/orders';
16
- export const getList = function (params) {
16
+ export const getList = function (params, options) {
17
17
  return __awaiter(this, void 0, void 0, function* () {
18
18
  try {
19
19
  const config = {
20
- headers: { Authorization: `Bearer ${this.apiToken}` }
20
+ headers: { Authorization: `Bearer ${this.apiToken}` },
21
+ signal: (options === null || options === void 0 ? void 0 : options.signal) || params.signal || undefined
21
22
  };
22
23
  const queryParams = generateQueryParamsStr([
23
24
  'store',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "washday-sdk",
3
- "version": "0.0.179",
3
+ "version": "0.0.180",
4
4
  "description": "Washday utilities functions and API",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -17,7 +17,7 @@ export const getList = async function (this: WashdayClientInstance, params: {
17
17
  limit: string
18
18
  pageNum: string
19
19
  signal?: GenericAbortSignal
20
- }, options?: { signal?: AbortSignal }): Promise<any> {
20
+ }, options?: { signal?: GenericAbortSignal }): Promise<any> {
21
21
  try {
22
22
  const config = {
23
23
  headers: { Authorization: `Bearer ${this.apiToken}` },
@@ -1,3 +1,4 @@
1
+ import { GenericAbortSignal } from "axios";
1
2
  import { WashdayClientInstance } from "../../interfaces/Api";
2
3
  import { IOrder } from "../../interfaces/Order";
3
4
  import { generateQueryParamsStr } from "../../utils/apiUtils";
@@ -28,11 +29,12 @@ export const getList = async function (this: WashdayClientInstance, params: {
28
29
  pickupToDate: string | undefined,
29
30
  deliveryFromDate: string | undefined,
30
31
  deliveryToDate: string | undefined,
31
-
32
- }): Promise<any> {
32
+ signal?: GenericAbortSignal
33
+ }, options?: { signal?: GenericAbortSignal }): Promise<any> {
33
34
  try {
34
35
  const config = {
35
- headers: { Authorization: `Bearer ${this.apiToken}` }
36
+ headers: { Authorization: `Bearer ${this.apiToken}` },
37
+ signal: options?.signal || params.signal || undefined
36
38
  };
37
39
  const queryParams = generateQueryParamsStr([
38
40
  'store',