Skip to content

feat: add deleteRecordById method [PLT-95546]#338

Open
Sarath1018 wants to merge 3 commits intomainfrom
sarath/delete-record
Open

feat: add deleteRecordById method [PLT-95546]#338
Sarath1018 wants to merge 3 commits intomainfrom
sarath/delete-record

Conversation

@Sarath1018
Copy link
Copy Markdown
Contributor

@Sarath1018 Sarath1018 commented Mar 31, 2026

Summary

  • Adds deleteRecordById(entityId, recordId) service-level method to EntityService for single-record deletion via DELETE /api/EntityService/entity/{entityId}/delete/{recordId}
  • Adds deleteRecord(recordId) entity-bound convenience method on EntityMethods for use after getById()
  • Single-record deletion is distinct from batch (deleteRecordsById) because Data Fabric only fires trigger events on individual deletes

Changes

  • src/utils/constants/endpoints/data-fabric.ts — added DELETE_RECORD_BY_ID endpoint constant with both entityId and recordId path params
  • src/models/data-fabric/entities.types.ts — added EntityDeleteRecordOptions and EntityDeleteRecordResponse types
  • src/models/data-fabric/entities.models.ts — added deleteRecordById to EntityServiceModel and deleteRecord to EntityMethods; implemented deleteRecord binding in createEntityMethods
  • src/services/data-fabric/entities.ts — implemented deleteRecordById using DELETE HTTP method with @track decorator
  • docs/oauth-scopes.md — added deleteRecordById / deleteRecord with DataFabric.Data.Write scope
  • tests/integration/shared/data-fabric/entities.integration.test.ts — added integration tests for both service-level and entity-level delete

Test plan

  • npm run typecheck — passes clean
  • npm run lint — no errors
  • npm run test:unit — all unit tests pass
  • npm run build — dist output produced
  • Integration: deleteRecordById deletes a record and returns { success: true }
  • Integration: deleteRecordById throws for a non-existent record UUID
  • Integration: entity.deleteRecord(recordId) deletes via the entity-bound method

🤖 Generated with Claude Code

@Sarath1018 Sarath1018 requested a review from a team March 31, 2026 05:37
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 2, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant