-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
move declarations to bundle #3138
move declarations to bundle #3138
Conversation
|
…add-bundledeclarations-and-disallow-messagedeclarationstype
Update-bundle-component
…and-disallow-messagedeclarationstype
Closes opral/inlang-sdk#206. Merging this without review to baller durch.
Changes
@inlang/sdk2
@inlang/bundle-component
event.entityId must be provided for deletions
Deleting an entity like bundle, message or variant is not possible if newData is undefined and the change event contains no information about the id.
In case the id is contained in meta?, that is not discoverable.
export type DispatchChangeInterface = { type: "Bundle" | "Message" | "Variant" + entityId: string operation: "create" | "update" | "delete" newData: Bundle | Message | Variant | undefined meta?: Record<string, any> }
event.operation was redundant
If newData is undefined, it has to be a delete. A create or update is always interpreted as an upsert in apps to avoid duplicate insert/update logic.
export type DispatchChangeInterface = { type: "Bundle" | "Message" | "Variant" - operation: "create" | "update" | "delete" newData: Bundle | Message | Variant | undefined meta?: Record<string, any> }
event.detail.argument
What is the argument prop for? Seems like it can be removed?