-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(updateRequest): add support for all the available support operat…
…ions
- Loading branch information
1 parent
d2d992f
commit 9b57ed1
Showing
8 changed files
with
441 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { UpdateActionKeyword } from './update-action-keyword.type' | ||
import { UpdateAction } from './update-action.type' | ||
|
||
export class UpdateActionDef { | ||
actionKeyword: UpdateActionKeyword | ||
action: UpdateAction | ||
|
||
constructor(actionKeyWord: UpdateActionKeyword, action: UpdateAction) { | ||
this.actionKeyword = actionKeyWord | ||
this.action = action | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { UpdateActionDef } from './update-action-def' | ||
|
||
export const UPDATE_ACTION_DEFS: UpdateActionDef[] = [ | ||
// SET | ||
new UpdateActionDef('SET', 'incrementBy'), | ||
new UpdateActionDef('SET', 'decrementBy'), | ||
new UpdateActionDef('SET', 'set'), | ||
new UpdateActionDef('SET', 'appendToList'), | ||
// REMOVE | ||
new UpdateActionDef('REMOVE', 'remove'), | ||
new UpdateActionDef('REMOVE', 'removeFromListAt'), | ||
// ADD | ||
new UpdateActionDef('ADD', 'add'), | ||
// DELETE | ||
new UpdateActionDef('DELETE', 'removeFromSet'), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.