UPDATE: type CDC input calls against the protospack gRPC contracts

Review (maestro #510): drop every 'as any' on the Input write client
(AddCdcTable/RemoveCdcTable/UnmarkTableDeleted take the generated request
types), type IPipelineV2.config, and build the CdcTable payload in one mapper
so 'name' mirrors table_name in a single place. isCdc via helper, no '!!'.

Co-Authored-By: WOZCODE <contact@withwoz.com>
This commit is contained in:
Rafael
2026-08-29 12:56:00 -03:00
co-authored by WOZCODE
parent 27eed59a1f
commit 23f0554311
7 changed files with 95 additions and 34 deletions
@@ -157,6 +157,7 @@ describe('PlatformApiController - addTable', () => {
const result = await controller.addTable('pid', 'iid', body, mockUser);
expect(inputsService.addCdcTable).toHaveBeenCalledWith({
client_id: 'c1',
id: 'iid',
table: {
table_schema: 'public',
@@ -198,6 +199,7 @@ describe('PlatformApiController - addTable', () => {
await controller.addTable('pid', 'iid', icebergBody, mockUser);
expect(inputsService.addCdcTable).toHaveBeenCalledWith({
client_id: 'c1',
id: 'iid',
table: {
table_schema: 'public',
@@ -228,6 +230,7 @@ describe('PlatformApiController - addTable', () => {
await controller.addTable('pid', 'iid', columnsBody, mockUser);
expect(inputsService.addCdcTable).toHaveBeenCalledWith({
client_id: 'c1',
id: 'iid',
table: {
table_schema: 'public',
@@ -254,6 +257,7 @@ describe('PlatformApiController - addTable', () => {
await expect(controller.addTable('pid', 'iid', body, mockUser)).rejects.toThrow('platform down');
expect(inputsService.removeCdcTable).toHaveBeenCalledWith({
client_id: 'c1',
id: 'iid',
table_name: 'orders',
info: { customer_id: 'c1', customer: 'cust', user_id: 'u1' },