Skip to content

Commit

Permalink
fix(integration): added patch command
Browse files Browse the repository at this point in the history
  • Loading branch information
JBBianchi committed Dec 18, 2023
1 parent f67af4c commit aa9a7e1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions projects/neuroglia/integration/src/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ export * from './integration-event.interface';
export * from './integration-event';
export * from './patch-operation';
export * from './json-patch';
export * from './patch-command';
17 changes: 17 additions & 0 deletions projects/neuroglia/integration/src/lib/patch-command.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { DataTransferObject } from './data-transfer-object';
import { JsonPatch } from './json-patch';

/**
* Represents the command used to patch the specified aggregate
*/
export class PatchCommand extends DataTransferObject {
/** The id of the aggregate to patch */
id!: string;
/** The patch to apply */
patch!: JsonPatch;

constructor(model?: Partial<PatchCommand>) {
super(model);
this.patch = new JsonPatch(model?.patch || {});
}
}

0 comments on commit aa9a7e1

Please sign in to comment.