washday-sdk 1.6.48 → 1.6.49

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.
@@ -43,6 +43,7 @@ export const getList = function (params, options) {
43
43
  'fetchSection',
44
44
  'cfdiId',
45
45
  'customerId',
46
+ 'assignedEmployee',
46
47
  ], params);
47
48
  // ], { ...params, q: params.q ? encodeURIComponent(params.q) : undefined });
48
49
  return yield this.axiosInstance.get(`${GET_SET_ORDER}?${queryParams}`, config);
@@ -0,0 +1,90 @@
1
+ # Domain Audit — app.washday.mx
2
+
3
+ ## Repo
4
+
5
+ washday-sdk
6
+
7
+ ## Summary
8
+
9
+ - Total direct `app.washday.mx` references: 0
10
+ - Total `washday.mx` references: 2
11
+ - Total `washdaypos.com` references: 0
12
+ - Highest-risk areas: no `app.washday.mx` usage found; SDK API base URLs are hardcoded to Heroku backend hosts and should be reviewed separately from the app-domain migration.
13
+ - Recommended next step: No app-domain change is needed in this repo for the current audit; keep redirect URI support compatible with frontend/backend migration work.
14
+
15
+ ## Findings by category
16
+
17
+ ### 1. Production app links / redirects
18
+
19
+ | File | Line | Reference | Usage | Risk | Recommendation |
20
+ |---|---:|---|---|---|---|
21
+ | _None found_ | | | No `app.washday.mx` production app links found. | | |
22
+
23
+ ### 2. Auth / OAuth / callback URLs
24
+
25
+ | File | Line | Reference | Usage | Risk | Recommendation |
26
+ |---|---:|---|---|---|---|
27
+ | `src/api/integrations/post.ts` | 7 | `redirectUri` | SDK method accepts caller-provided redirect URI for integration OAuth. | Low | Support both app.washday.mx and app.washdaypos.com |
28
+
29
+ ### 3. Payments / billing redirects
30
+
31
+ | File | Line | Reference | Usage | Risk | Recommendation |
32
+ |---|---:|---|---|---|---|
33
+ | _None found_ | | | No Washday app-domain payment redirects found. | | |
34
+
35
+ ### 4. Emails / notifications / templates
36
+
37
+ | File | Line | Reference | Usage | Risk | Recommendation |
38
+ |---|---:|---|---|---|---|
39
+ | `test/auth.forgotPasswordBinding.test.ts` | 33, 38 | `rene@washday.mx` | Test email fixture for forgot-password binding. | Low | Email domain — keep washday.mx for now |
40
+
41
+ ### 5. CORS / allowed origins / security
42
+
43
+ | File | Line | Reference | Usage | Risk | Recommendation |
44
+ |---|---:|---|---|---|---|
45
+ | `src/api/axiosInstance.ts` | 7-10 | `DEV_BASE_URL`, `STAGE_BASE_URL`, `PROD_BASE_URL`, `BASE_URL` | Hardcoded backend API base URLs; no app-domain usage. | Medium | Leave unchanged for now |
46
+
47
+ ### 6. Analytics / support / third-party integrations
48
+
49
+ | File | Line | Reference | Usage | Risk | Recommendation |
50
+ |---|---:|---|---|---|---|
51
+ | _None found_ | | | No Washday app-domain reference found in third-party integration files searched. | | |
52
+
53
+ ### 7. Documentation-only references
54
+
55
+ | File | Line | Reference | Usage | Risk | Recommendation |
56
+ |---|---:|---|---|---|---|
57
+ | _None found_ | | | No documentation-only `app.washday.mx` reference found. | | |
58
+
59
+ ### 8. Email references — keep for now
60
+
61
+ These references use `@washday.mx` or email-related domain values. We are intentionally keeping these for now.
62
+
63
+ | File | Line | Reference | Usage | Action |
64
+ |---|---:|---|---|---|
65
+ | `test/auth.forgotPasswordBinding.test.ts` | 33, 38 | `rene@washday.mx` | Test email fixture for forgot-password binding. | Email domain — keep washday.mx for now |
66
+
67
+ ## Recommended migration plan for this repo
68
+
69
+ ### Safe to leave unchanged for now
70
+
71
+ - Test email fixture using `@washday.mx`.
72
+ - Existing SDK behavior for caller-provided `redirectUri`.
73
+
74
+ ### Should become environment/config driven
75
+
76
+ - No `app.washday.mx` value found. Separately consider whether SDK backend API base URLs should be configurable.
77
+
78
+ ### Needs provider whitelist/callback update before changing
79
+
80
+ - No provider callback hardcoding found in this repo. Backend and frontend provider changes should happen before SDK callers switch redirect URIs.
81
+
82
+ ### Needs product decision before changing
83
+
84
+ - Whether SDK default backend hosts should remain Heroku-specific is outside this app-domain audit.
85
+
86
+ ## Notes
87
+
88
+ - Do not change runtime behavior in this audit PR.
89
+ - Do not replace `app.washday.mx` yet.
90
+ - Do not migrate email sender domains yet.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "washday-sdk",
3
- "version": "1.6.48",
3
+ "version": "1.6.49",
4
4
  "description": "Washday utilities functions and API",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -33,6 +33,7 @@ export const getList = async function (this: WashdayClientInstance, params: {
33
33
  fetchSection?: string,
34
34
  cfdiId?: string,
35
35
  customerId?: string,
36
+ assignedEmployee?: string,
36
37
  }, options?: { signal?: GenericAbortSignal }): Promise<any> {
37
38
  try {
38
39
  const config = {
@@ -63,6 +64,7 @@ export const getList = async function (this: WashdayClientInstance, params: {
63
64
  'fetchSection',
64
65
  'cfdiId',
65
66
  'customerId',
67
+ 'assignedEmployee',
66
68
  ], params);
67
69
  // ], { ...params, q: params.q ? encodeURIComponent(params.q) : undefined });
68
70
  return await this.axiosInstance.get(`${GET_SET_ORDER}?${queryParams}`, config);
@@ -74,6 +74,7 @@ export interface IOrderProduct extends IProduct {
74
74
  qty?: number
75
75
 
76
76
  // Operational line-level status fields (added 2026-04-04)
77
+ assignedEmployee?: IUser | string | null,
77
78
  status?: OrderProductLineStatus,
78
79
  cleanedDateTime?: Date | null, // set on → ready (cleaning completed)
79
80
  readyDateTime?: Date | null, // set on → ready; currently always equals cleanedDateTime
@@ -0,0 +1,56 @@
1
+ import { getList } from "../src/api/order/get";
2
+
3
+ describe("orders.getList assignedEmployee filter", () => {
4
+ it("passes assignedEmployee through the order list query string", async () => {
5
+ const get = jest.fn().mockResolvedValue({
6
+ data: {
7
+ data: {
8
+ orders: [],
9
+ },
10
+ },
11
+ });
12
+ const client = {
13
+ apiToken: "token-123",
14
+ axiosInstance: { get },
15
+ } as any;
16
+
17
+ const result = await getList.call(client, {
18
+ store: undefined,
19
+ storeId: "store-1",
20
+ status: undefined,
21
+ name: undefined,
22
+ phone: undefined,
23
+ email: undefined,
24
+ fromDate: undefined,
25
+ toDate: undefined,
26
+ sequence: undefined,
27
+ pageNum: "0",
28
+ limit: "20",
29
+ sequenceSort: "-1",
30
+ cleanedDateTime: undefined,
31
+ readyDateTime: undefined,
32
+ collectedDateTime: undefined,
33
+ q: undefined,
34
+ pickupFromDate: undefined,
35
+ pickupToDate: undefined,
36
+ deliveryFromDate: undefined,
37
+ deliveryToDate: undefined,
38
+ assignedEmployee: "employee-1",
39
+ });
40
+
41
+ expect(get).toHaveBeenCalledWith(
42
+ "api/v2/order?store=undefined&storeId=store-1&status=undefined&name=undefined&phone=undefined&email=undefined&fromDate=undefined&toDate=undefined&sequence=undefined&pageNum=0&limit=20&sequenceSort=-1&cleanedDateTime=undefined&readyDateTime=undefined&collectedDateTime=undefined&q=undefined&pickupFromDate=undefined&pickupToDate=undefined&deliveryFromDate=undefined&deliveryToDate=undefined&assignedEmployee=employee-1",
43
+ {
44
+ headers: { Authorization: "Bearer token-123" },
45
+ signal: undefined,
46
+ }
47
+ );
48
+ expect(result).toEqual({
49
+ data: {
50
+ data: {
51
+ orders: [],
52
+ },
53
+ },
54
+ });
55
+ });
56
+ });