Skip to content

Conversation

@lucas-a-pelegrino
Copy link
Member

@lucas-a-pelegrino lucas-a-pelegrino commented Oct 17, 2025

Proposed changes (including videos or screenshots)

This PR adds a deprecation warning on livechat:saveUnit method, and updates client to use the alternative endpoints already in place.

Issue(s)

CORE-1409

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • Deprecations

    • Emits a deprecation warning for the legacy livechat save method; migrate to REST unit endpoints.
  • Refactor

    • Create/update flows now use REST endpoints with a structured payload for unit details, monitors, and departments.
    • UI unit editor now accepts an update callback so parent components can handle saves.
  • New Features

    • Added a public type describing the structured unit save payload.
  • Tests

    • Tests updated to use the REST workflow and new payload shape.
  • Chores

    • Added a changeset for a patch release.

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Oct 17, 2025

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Oct 17, 2025

🦋 Changeset detected

Latest commit: 1ee8f4d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 41 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/freeswitch Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/http-router Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/federation-matrix Patch
@rocket.chat/license Patch
@rocket.chat/media-calls Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/models Patch
@rocket.chat/network-broker Patch
@rocket.chat/omni-core-ee Patch
@rocket.chat/mock-providers Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/ui-voip Patch
@rocket.chat/instance-status Patch
@rocket.chat/omni-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 17, 2025

Walkthrough

Adds a new payload type for business units, migrates unit save/update from the Meteor method to REST endpoints (with an optional onUpdate callback), emits a deprecation warning when livechat:saveUnit is called, and updates tests/utilities to use the REST API and the new payload shape.

Changes

Cohort / File(s) Summary
Metadata & Release
\.changeset/cool-yaks-perform.md
Adds a changeset documenting a patch release and noting deprecation of livechat:saveUnit.
Core Typings
packages/core-typings/src/IOmnichannelBusinessUnit.ts
Adds exported OmnichannelBusinessUnitPayload type encapsulating unitData, unitMonitors[], and unitDepartments[].
Client — Unit Editor
apps/meteor/client/omnichannel/units/UnitEdit.tsx, apps/meteor/client/omnichannel/units/UnitEditWithData.tsx
Adds onUpdate?: (params: OmnichannelBusinessUnitPayload) => void; builds unified payload { unitData, unitMonitors, unitDepartments }; replaces method-call path with REST POST /v1/livechat/units and delegates updates via onUpdate when provided.
Server — API Types
apps/meteor/ee/app/livechat-enterprise/server/api/units.ts
Updates endpoint typings for POST /v1/livechat/units and POST /v1/livechat/units/:id to accept OmnichannelBusinessUnitPayload.
Server — Method Deprecation
apps/meteor/ee/app/livechat-enterprise/server/methods/saveUnit.ts
Emits deprecation log via methodDeprecationLogger.method('livechat:saveUnit','8.0.0','/v1/livechat/units') when legacy Meteor method is invoked.
Tests — Data & E2E Utilities
apps/meteor/tests/data/livechat/units.ts, apps/meteor/tests/e2e/utils/omnichannel/units.ts
Replace Meteor method calls with REST POSTs; restructure payload to { unitData, unitMonitors, unitDepartments }; consume direct JSON response body and adapt returned types.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant UI as UnitEdit (client)
    participant Updater as onUpdate / useEndpoint
    participant API as Server (REST)

    rect rgb(250,245,250)
    Note over UI,API: Legacy (deprecated Meteor method)
    UI->>API: Meteor method call "livechat:saveUnit" (old)
    API-->>UI: result (legacy)
    end

    rect rgb(240,255,240)
    Note over UI,API: New flow (REST + optional onUpdate)
    UI->>UI: build payload { unitData, unitMonitors, unitDepartments }
    alt onUpdate provided
        UI->>Updater: onUpdate(payload)
        Updater->>API: POST /v1/livechat/units or /v1/livechat/units/:id
        API-->>Updater: 200 JSON (IOmnichannelBusinessUnit)
        Updater-->>UI: response
    else no onUpdate
        UI->>API: POST /v1/livechat/units (payload) via useEndpoint
        API-->>UI: 200 JSON (IOmnichannelBusinessUnit)
    end
    Note right of API: Server also logs deprecation when legacy method used
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

stat: ready to merge, stat: QA assured

Suggested reviewers

  • aleksandernsilva

Poem

🐰 I hopped through types and routed the way,
Packed monitors, depts, and data in play.
Old calls whisper "deprecated" with grace,
REST now carries the unit's new place.
A tiny hop — the code found its pace.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Linked Issues Check ❓ Inconclusive The linked issue CORE-1409 is referenced in the PR objectives, but the provided <linked_issues> content contains no specification of coding requirements or detailed objectives to validate against. The PR description indicates the changes "add a deprecation warning to the server method livechat:saveUnit and update client code to use existing alternative endpoints," which aligns with typical deprecation patterns, but without the actual issue requirements, comprehensive compliance validation cannot be performed. To complete this check, provide the full requirements and coding objectives listed in CORE-1409. Specifically, verify whether the deprecation warning implementation, API payload restructuring, and client migration approach match the issue's acceptance criteria and any specific versioning or endpoint requirements.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "chore: Adds deprecation warning for livechat:saveUnit" accurately describes a key aspect of the changeset. The deprecation warning is explicitly added in apps/meteor/ee/app/livechat-enterprise/server/methods/saveUnit.ts via methodDeprecationLogger.method('livechat:saveUnit', '8.0.0', '/v1/livechat/units'). While the PR includes broader refactoring work (component updates, new payload types, endpoint signature changes, and test updates), the deprecation warning represents a core element of the changes and is a legitimate primary focus of a chore-type PR addressing deprecation.
Out of Scope Changes Check ✅ Passed All code changes align with the stated PR objective of adding a deprecation warning and updating client code to use alternative endpoints. The modifications include: deprecation logging in saveUnit.ts, new OmnichannelBusinessUnitPayload type definition, client component updates (UnitEdit and UnitEditWithData), API endpoint signature updates, and necessary test/e2e utility migrations. Each change directly supports the deprecation and migration workflow, with no apparent scope creep into unrelated functionality.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/v7/CORE-1409

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between da472a8 and f4d65d8.

📒 Files selected for processing (3)
  • apps/meteor/client/omnichannel/units/UnitEdit.tsx (3 hunks)
  • apps/meteor/ee/app/livechat-enterprise/server/api/units.ts (2 hunks)
  • packages/core-typings/src/IOmnichannelBusinessUnit.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/meteor/ee/app/livechat-enterprise/server/api/units.ts
🧰 Additional context used
🧬 Code graph analysis (1)
apps/meteor/client/omnichannel/units/UnitEdit.tsx (2)
packages/core-typings/src/IOmnichannelBusinessUnit.ts (1)
  • OmnichannelBusinessUnitPayload (14-25)
apps/meteor/ee/app/livechat-enterprise/server/lib/LivechatEnterprise.ts (1)
  • saveUnit (66-128)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
🔇 Additional comments (3)
apps/meteor/client/omnichannel/units/UnitEdit.tsx (3)

1-11: LGTM!

The import additions for OmnichannelBusinessUnitPayload and useEndpoint are correct and align with the migration from Meteor methods to REST endpoints.


50-50: LGTM!

The saveUnit endpoint correctly targets the creation endpoint (POST /v1/livechat/units). Update operations are appropriately delegated to the onUpdate callback provided by the parent component.


104-108: LGTM!

The payload construction correctly matches the OmnichannelBusinessUnitPayload type structure with unitData, unitMonitors, and unitDepartments fields.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Oct 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.11%. Comparing base (4b8d0df) to head (1ee8f4d).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #37255      +/-   ##
===========================================
- Coverage    68.12%   68.11%   -0.01%     
===========================================
  Files         3365     3365              
  Lines       115811   115808       -3     
  Branches     20969    20845     -124     
===========================================
- Hits         78896    78888       -8     
  Misses       34225    34225              
- Partials      2690     2695       +5     
Flag Coverage Δ
e2e 57.49% <100.00%> (+<0.01%) ⬆️
unit 72.13% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lucas-a-pelegrino lucas-a-pelegrino added this to the 7.13.0 milestone Oct 22, 2025
@lucas-a-pelegrino lucas-a-pelegrino marked this pull request as ready for review October 22, 2025 19:44
@lucas-a-pelegrino lucas-a-pelegrino requested review from a team as code owners October 22, 2025 19:44
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (8)
.changeset/cool-yaks-perform.md (1)

1-5: Clarify replacement path in the changeset note.

Consider explicitly naming the replacement REST endpoints to aid downstream consumers, e.g., “Use /v1/livechat/units (create) and /v1/livechat/units/:id (update).”

apps/meteor/client/omnichannel/units/UnitEditWithData.tsx (1)

17-17: Good: onUpdate wired to REST update.

Using useEndpoint('POST', '/v1/livechat/units/:id', { id: unitId }) and passing onUpdate={editUnit} is correct and aligns with the new payload.

Tiny consistency nit: since path params are pre-bound for GETs, also call the bound functions without passing params (as you already do for getUnitById) to keep a uniform style across this file.

Also applies to: 65-65

apps/meteor/tests/data/livechat/units.ts (1)

38-47: REST payload shape and unwrapped response look correct.

Switch to api('livechat/units') with { unitData, unitMonitors, unitDepartments } and resolving res.body aligns with the new contract.

Rename extraMonitor → extraMonitors for clarity (array).

Also applies to: 48-53

apps/meteor/tests/e2e/utils/omnichannel/units.ts (2)

22-29: Default optional arrays to [] to match server schema.

If monitors/departments are omitted, POST may fail schema checks. Default to [].

-  const unitPayload = {
+  const unitPayload = {
     unitData: {
       name: name ?? faker.string.uuid(),
       visibility: visibility ?? 'public',
     },
-    unitMonitors: monitors,
-    unitDepartments: departments,
+    unitMonitors: monitors ?? [],
+    unitDepartments: departments ?? [],
   };

31-35: Accept 200 or 201 on create/update.

Some backends return 201 for create. Broaden the check.

-  if (response.status() !== 200) {
-    throw new Error(`Failed to create or update unit [http status: ${response.status()}]`);
-  }
+  if (![200, 201].includes(response.status())) {
+    throw new Error(`Failed to create or update unit [http status: ${response.status()}]`);
+  }
apps/meteor/client/omnichannel/units/UnitEdit.tsx (2)

37-48: Make onUpdate explicitly async-capable.

onUpdate is awaited; declare it as possibly returning a Promise for clarity.

-  onUpdate?: (params: {
+  onUpdate?: (params: {
       unitData: {
         name: string;
         visibility: string;
         enabled?: boolean;
         description?: string;
         email?: string;
         showOnOfflineForm?: boolean;
       };
       unitMonitors: { monitorId: string; username: string }[];
       unitDepartments: { departmentId: string }[];
-  }) => void;
+  }) => void | Promise<void>;

55-55: Safer fallback for updates without onUpdate; narrow visibility typing.

  • If _id exists and onUpdate is not provided, post to /v1/livechat/units/:id to update instead of creating.
  • Narrow visibility to 'public' | 'private' to match options.
-const saveUnit = useEndpoint('POST', '/v1/livechat/units');
+const saveUnit = useEndpoint('POST', '/v1/livechat/units');
+const editUnit = useEndpoint('POST', '/v1/livechat/units/:id');

 // ...
-const payload = {
+const payload = {
   unitData: { name, visibility },
   unitMonitors: monitorsData,
   unitDepartments: departmentsData,
 };

 try {
-  if (_id && onUpdate) {
+  if (_id && onUpdate) {
     await onUpdate(payload);
-  } else {
-    await saveUnit(payload);
+  } else if (_id) {
+    await editUnit({ id: _id, ...payload });
+  } else {
+    await saveUnit(payload);
   }

Optional typing tweak:

-type UnitEditFormData = {
+type UnitEditFormData = {
   name: string;
-  visibility: string;
+  visibility: 'public' | 'private';
   // ...
};

Also applies to: 109-114, 116-120

apps/meteor/ee/app/livechat-enterprise/server/api/units.ts (1)

19-30: Consider extracting the duplicated payload type definition.

The POST parameter structure for both /v1/livechat/units and /v1/livechat/units/:id is identical. Consider extracting this into a shared type to reduce duplication and improve maintainability.

Example refactor:

+type SaveUnitPayload = {
+	unitData: {
+		name: string;
+		visibility: string;
+		enabled?: boolean;
+		description?: string;
+		email?: string;
+		showOnOfflineForm?: boolean;
+	};
+	unitMonitors: { monitorId: string; username: string }[];
+	unitDepartments: { departmentId: string }[];
+};
+
 declare module '@rocket.chat/rest-typings' {
 	// eslint-disable-next-line @typescript-eslint/naming-convention
 	interface Endpoints {
 		'/v1/livechat/units': {
 			GET: (params: PaginatedRequest<{ text?: string }>) => PaginatedResult & { units: IOmnichannelBusinessUnit[] };
-			POST: (params: {
-				unitData: {
-					name: string;
-					visibility: string;
-					enabled?: boolean;
-					description?: string;
-					email?: string;
-					showOnOfflineForm?: boolean;
-				};
-				unitMonitors: { monitorId: string; username: string }[];
-				unitDepartments: { departmentId: string }[];
-			}) => Omit<IOmnichannelBusinessUnit, '_updatedAt'>;
+			POST: (params: SaveUnitPayload) => Omit<IOmnichannelBusinessUnit, '_updatedAt'>;
 		};
 		'/v1/livechat/units/:id': {
 			GET: () => IOmnichannelBusinessUnit;
-			POST: (params: {
-				unitData: {
-					name: string;
-					visibility: string;
-					enabled?: boolean;
-					description?: string;
-					email?: string;
-					showOnOfflineForm?: boolean;
-				};
-				unitMonitors: { monitorId: string; username: string }[];
-				unitDepartments: { departmentId: string }[];
-			}) => Omit<IOmnichannelBusinessUnit, '_updatedAt'>;
+			POST: (params: SaveUnitPayload) => Omit<IOmnichannelBusinessUnit, '_updatedAt'>;
 			DELETE: () => number;
 		};
 	}
 }

Also applies to: 34-45

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 01aa489 and a1ccb1c.

📒 Files selected for processing (7)
  • .changeset/cool-yaks-perform.md (1 hunks)
  • apps/meteor/client/omnichannel/units/UnitEdit.tsx (3 hunks)
  • apps/meteor/client/omnichannel/units/UnitEditWithData.tsx (2 hunks)
  • apps/meteor/ee/app/livechat-enterprise/server/api/units.ts (1 hunks)
  • apps/meteor/ee/app/livechat-enterprise/server/methods/saveUnit.ts (2 hunks)
  • apps/meteor/tests/data/livechat/units.ts (1 hunks)
  • apps/meteor/tests/e2e/utils/omnichannel/units.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
apps/meteor/tests/e2e/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

apps/meteor/tests/e2e/**/*.{ts,tsx,js,jsx}: Write concise, technical TypeScript/JavaScript with accurate typing
Follow DRY by extracting reusable logic into helper functions or page objects
Avoid code comments in the implementation

Files:

  • apps/meteor/tests/e2e/utils/omnichannel/units.ts
apps/meteor/tests/e2e/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

apps/meteor/tests/e2e/**/*.{ts,tsx}: Avoid using page.locator(); prefer semantic locators like page.getByRole, page.getByLabel, page.getByText, and page.getByTitle
Store commonly used locators in variables/constants for reuse
Use page.waitFor() with specific conditions and avoid hardcoded timeouts
Implement proper wait strategies for dynamic content
Follow the Page Object Model pattern consistently

Files:

  • apps/meteor/tests/e2e/utils/omnichannel/units.ts
🧬 Code graph analysis (3)
apps/meteor/tests/e2e/utils/omnichannel/units.ts (1)
apps/meteor/ee/app/livechat-enterprise/server/lib/LivechatEnterprise.ts (1)
  • removeUnit (53-64)
apps/meteor/tests/data/livechat/units.ts (1)
apps/meteor/tests/data/api-data.ts (1)
  • credentials (39-42)
apps/meteor/client/omnichannel/units/UnitEdit.tsx (1)
apps/meteor/ee/app/livechat-enterprise/server/lib/LivechatEnterprise.ts (1)
  • saveUnit (66-128)
🔇 Additional comments (3)
apps/meteor/client/omnichannel/units/UnitEditWithData.tsx (1)

67-67: Prop pass-through

onClose forwarding preserved. No issue.

apps/meteor/ee/app/livechat-enterprise/server/api/units.ts (2)

115-120: Handler logic looks correct; same validation concern applies.

The update handler correctly extracts the unit ID from URL parameters and passes it along with the payload to LivechatEnterprise.saveUnit(). The same input validation concern mentioned for the create handler (lines 95-98) applies here as well.


95-98: The original review comment is incorrect. Runtime validation is already implemented.

The LivechatEnterprise.saveUnit() method in apps/meteor/ee/app/livechat-enterprise/server/lib/LivechatEnterprise.ts (lines 73–93) uses Meteor's check() function to validate all required fields:

  • unitData.name and unitData.visibility are validated as required strings
  • unitMonitors is validated as an array of objects with required monitorId and username fields
  • unitDepartments is validated as an array of objects with required departmentId field

Meteor's check() function provides runtime validation with clear error messages when validation fails. The handler at lines 95–98 correctly delegates to saveUnit(), which performs comprehensive input validation before processing.

Likely an incorrect or invalid review comment.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 2588df7 and 10e1865.

📒 Files selected for processing (3)
  • apps/meteor/client/omnichannel/units/UnitEdit.tsx (3 hunks)
  • apps/meteor/ee/app/livechat-enterprise/server/api/units.ts (2 hunks)
  • packages/core-typings/src/IOmnichannelBusinessUnit.ts (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
apps/meteor/client/omnichannel/units/UnitEdit.tsx (2)
packages/core-typings/src/IOmnichannelBusinessUnit.ts (1)
  • ISaveOmnichannelBusinessUnit (14-25)
apps/meteor/ee/app/livechat-enterprise/server/lib/LivechatEnterprise.ts (1)
  • saveUnit (66-128)
apps/meteor/ee/app/livechat-enterprise/server/api/units.ts (1)
packages/core-typings/src/IOmnichannelBusinessUnit.ts (2)
  • ISaveOmnichannelBusinessUnit (14-25)
  • IOmnichannelBusinessUnit (3-12)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
🔇 Additional comments (3)
apps/meteor/ee/app/livechat-enterprise/server/api/units.ts (2)

1-1: LGTM! Type annotations improve API contract clarity.

The addition of ISaveOmnichannelBusinessUnit as the parameter type for both POST endpoints clearly documents the expected payload structure. This addresses the previous review comment about creating a type for these endpoints.

Based on past review comments.

Also applies to: 19-19, 23-23


19-19: Remove this review comment - the return type omission is correct and intentional.

The POST response intentionally omits _updatedAt and this is safe. Client code (UnitEdit.tsx line 114) calls await saveUnit(payload) without capturing or using the response. After the POST succeeds, the client invalidates the cache and re-fetches data via GET endpoints, which return the full object including _updatedAt. This is a valid optimization pattern: POST returns minimal response while GET provides complete data.

apps/meteor/client/omnichannel/units/UnitEdit.tsx (1)

1-7: LGTM! Proper type imports for the new payload structure.

The import changes correctly bring in ISaveOmnichannelBusinessUnit and add it to the component's prop types, aligning with the REST API migration.

Also applies to: 43-43

Copy link
Member

@dougfabris dougfabris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@lucas-a-pelegrino lucas-a-pelegrino added stat: ready to merge PR tested and approved waiting for merge stat: QA assured Means it has been tested and approved by a company insider labels Oct 24, 2025
@dionisio-bot dionisio-bot bot removed the stat: ready to merge PR tested and approved waiting for merge label Nov 5, 2025
@dougfabris dougfabris added stat: QA assured Means it has been tested and approved by a company insider and removed stat: QA assured Means it has been tested and approved by a company insider labels Nov 6, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Nov 6, 2025
@kodiakhq kodiakhq bot merged commit 6a5eb79 into develop Nov 6, 2025
63 checks passed
@kodiakhq kodiakhq bot deleted the chore/v7/CORE-1409 branch November 6, 2025 02:56
MartinSchoeler pushed a commit that referenced this pull request Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants