mirror of
https://github.com/inventree/InvenTree.git
synced 2026-09-01 09:41:22 +00:00
* Display note info
* Support user locale
* Add unit testing for HTML content
* Observe color mode
* Add link between Note and NotesImage
* Ensure image file is deleted when NotesImage is deleted
* Add support for image upload in editor
* Skeleton for data migration
* Updates
* Update data migration
- Find any NoteImage items which do not link to a model
- Try to associate them with an existing note
* Remove validator
* Updated API endpoints for NotesImage model
* Update server side sanitizing
* Specify max field length
* Remove old fields from NotesImage model
* Refactor clean_string
* Remove obsolete task
* Remove legacy "notes" field from older models
* Adjust search params when switching notes
* Remove NotesFieldMixin
* Change editor
* Resizable image support
* Support tables
* Add table style
* Adjust header actions
* Add data migration for SalesOrderShipment notes
* Adjust back-end sanitizing
* Adjust
* Use subtle editor variant
* Move undo/redo
* Enhance editing logic
* Add report tags for notes
* Add unit test for note image cleanup
* Render note to HTML
- Automatically replace images
* Fix migration order
* Adjust migration text
* Fix "dirty" trigger on notes
* Prevent navigate from dirty notes
* Add documentation
* Prevent image clicking if not in editing mode
* Update API
* Update migration files
* Fix migrations
* remove notes from test fixtures
* remove notes field that does not exsist anymore
* add missing ruleset
* fix assertation
* fix assertation
* Update docs/docs/concepts/notes.md
Co-authored-by: Matthias Mair <code@mjmair.com>
* Remove blocknote deps
* Move old helper functions
- Only used for this migration
- Will potentially be removed at some point in the future?
* Revert change
* Fix note image URL
* Fix migration conflicts
* Fix migrations
* Fix delete call
* Fix content mixin
* Fix note duplication
* Make save method atomic
* Fix double-save
* Add "template" field to Note model
* Adjust migrations
* Frontend updates
* Fix for NotesEditor
* Render Note instance in forms
* Fix button-within-button
* Fix migrations
* Fix missing import
* add docs
* docs for rendering notes in reports
* Restrict queryset based on user view permissions
* APi unit tests for note permissions
* Duplicate embedded images when copying notes
* Add unit test for note duplication
* Add CHANGELOG
* Add 'copy_note' option to duplicate serializer
* Add unit tests for data migrations
* implement note duplication serializers
* frontend UI elements
* Fix migration conflicts
* Use branch for playwrigh testing
* Implement duplicate action for stock item
* Fix import
* Updated playwright tests
* Bug fix for receiving stock items
* Add screenshot
* Fix api_version
* Update unit tests
* Fix docs
* Remove defunct tests
* Fix migration order
* Adjust import/export workflow
* Manual cleaning update
* Fix migrations
* Fix migration files
* Fix for note save
* Adjust save ordering
* Skip constraint checking in NoteSerializer
* Custom validate_constraints on Note model
* Revert "Skip constraint checking in NoteSerializer"
This reverts commit b42bc955c1.
* Fix for note search
* Fix for receive_line_items
* Shim model renderer for NoteTemplate
* Fix playwright tests
* Adjust frontend CI
* Fix import/export CI job
* Fix for data migration test
* Fix migration test
* Adjust unit test
* Fix conflicting migration
* Fix unit test
* Run migration tests in parallel
* Robustify migration test
* Disable parallel options
* Fix conflicting migration
* Remove extraneous unit test
* Fix conflicting migrations
* Additional regression tests
* Check permissions before deleting Note instance
* Updated docs
* Validate note model type
* Prevent discard of unsaved changes in note editor
* Clean up dead code
* Fix migration conflict
* Improved data migration
* Prefetch role groups
* UI refactoring
* Refactor permission checking code
* Further code refactoring
* use DuplicateField helper
* Refactoring
* Add prefetch
* Throw exception rather than assert
* Logic fix for notes editor
* reimplement old background task
* Adjust data migration
* Fix notes field when receiving items
* Fix existing report templates
* Fix save action for notes editor
* Refactoring: Add "instance-info" API endpoint for common model properties
* Fix indicator dots
* Tweak nav alert msg
* Adjust layout of buttons
* Sanitize notes during migration
* Fix for NotesImage delete cascade
* Fix caching
* Fix race condition in notes editor
* Fix distinct issue when searching notse
* Fix race condition when saving new note instance
* Fix improper error
* Refactor StockItem duplication
* Refactoring
* Increase query time
* Fix api_version.py
* Additional migration tests
* Fix CI workflow
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
274 lines
10 KiB
TypeScript
274 lines
10 KiB
TypeScript
/*
|
|
* Enumeration of available API endpoints.
|
|
*
|
|
* In the cases where endpoints can be accessed with a primary key,
|
|
* the primary key should be appended to the endpoint.
|
|
* The exception to this is when the endpoint provides an :id parameter.
|
|
*/
|
|
|
|
export enum ApiEndpoints {
|
|
api_server_info = '',
|
|
|
|
// User API endpoints
|
|
user_list = 'user/',
|
|
user_set_password = 'user/:id/set-password/',
|
|
user_tokens = 'user/tokens/',
|
|
user_simple_login = 'email/generate/',
|
|
// Individual user endpoints
|
|
user_me_profile = 'user/me/profile/',
|
|
user_me_roles = 'user/me/roles/',
|
|
user_me_token = 'user/me/token/',
|
|
user_me = 'user/me/',
|
|
|
|
// User auth endpoints
|
|
auth_base = '/auth/',
|
|
user_reset = 'auth/v1/auth/password/request',
|
|
user_reset_set = 'auth/v1/auth/password/reset',
|
|
auth_pwd_change = 'auth/v1/account/password/change',
|
|
auth_login = 'auth/v1/auth/login',
|
|
auth_login_2fa = 'auth/v1/auth/2fa/authenticate',
|
|
auth_session = 'auth/v1/auth/session',
|
|
auth_signup = 'auth/v1/auth/signup',
|
|
auth_authenticators = 'auth/v1/account/authenticators',
|
|
auth_recovery = 'auth/v1/account/authenticators/recovery-codes',
|
|
auth_mfa_reauthenticate = 'auth/v1/auth/2fa/reauthenticate',
|
|
auth_totp = 'auth/v1/account/authenticators/totp',
|
|
auth_trust = 'auth/v1/auth/2fa/trust',
|
|
auth_webauthn = 'auth/v1/account/authenticators/webauthn',
|
|
auth_webauthn_login = 'auth/v1/auth/webauthn/authenticate',
|
|
auth_reauthenticate = 'auth/v1/auth/reauthenticate',
|
|
auth_email = 'auth/v1/account/email',
|
|
auth_email_verify = 'auth/v1/auth/email/verify',
|
|
auth_providers = 'auth/v1/account/providers',
|
|
auth_provider_redirect = 'auth/v1/auth/provider/redirect',
|
|
auth_provider_signup = 'auth/v1/auth/provider/signup',
|
|
auth_config = 'auth/v1/config',
|
|
|
|
// Generic API endpoints
|
|
currency_list = 'currency/exchange/',
|
|
currency_refresh = 'currency/refresh/',
|
|
all_units = 'units/all/',
|
|
task_overview = 'background-task/',
|
|
task_pending_list = 'background-task/pending/',
|
|
task_scheduled_list = 'background-task/scheduled/',
|
|
task_failed_list = 'background-task/failed/',
|
|
api_search = 'search/',
|
|
settings_global_list = 'settings/global/',
|
|
settings_user_list = 'settings/user/',
|
|
news = 'news/',
|
|
global_status = 'generic/status/',
|
|
custom_state_list = 'generic/status/custom/',
|
|
version = 'version/',
|
|
license = 'license/',
|
|
group_list = 'user/group/',
|
|
owner_list = 'user/owner/',
|
|
ruleset_list = 'user/ruleset/',
|
|
content_type_list = 'contenttype/',
|
|
icons = 'icons/',
|
|
selectionlist_list = 'selection/',
|
|
selectionentry_list = 'selection/:id/entry/',
|
|
|
|
// Barcode API endpoints
|
|
barcode = 'barcode/',
|
|
barcode_history = 'barcode/history/',
|
|
barcode_link = 'barcode/link/',
|
|
barcode_unlink = 'barcode/unlink/',
|
|
barcode_generate = 'barcode/generate/',
|
|
|
|
// Data output endpoints
|
|
data_output = 'data-output/',
|
|
|
|
// Data import endpoints
|
|
import_session_list = 'importer/session/',
|
|
import_session_accept_fields = 'importer/session/:id/accept_fields/',
|
|
import_session_accept_rows = 'importer/session/:id/accept_rows/',
|
|
import_session_column_mapping_list = 'importer/column-mapping/',
|
|
import_session_row_list = 'importer/row/',
|
|
|
|
// Notification endpoints
|
|
notifications_list = 'notifications/',
|
|
notifications_readall = 'notifications/readall/',
|
|
|
|
// Build API endpoints
|
|
build_order_list = 'build/',
|
|
build_order_issue = 'build/:id/issue/',
|
|
build_order_cancel = 'build/:id/cancel/',
|
|
build_order_hold = 'build/:id/hold/',
|
|
build_order_complete = 'build/:id/finish/',
|
|
build_output_complete = 'build/:id/complete/',
|
|
build_output_create = 'build/:id/create-output/',
|
|
build_output_scrap = 'build/:id/scrap-outputs/',
|
|
build_output_delete = 'build/:id/delete-outputs/',
|
|
build_order_auto_allocate = 'build/:id/auto-allocate/',
|
|
build_order_allocate = 'build/:id/allocate/',
|
|
build_order_consume = 'build/:id/consume/',
|
|
build_order_deallocate = 'build/:id/unallocate/',
|
|
|
|
build_line_list = 'build/line/',
|
|
build_item_list = 'build/item/',
|
|
|
|
bom_list = 'bom/',
|
|
bom_item_validate = 'bom/:id/validate/',
|
|
bom_validate = 'part/:id/bom-validate/',
|
|
bom_substitute_list = 'bom/substitute/',
|
|
|
|
// Part API endpoints
|
|
part_list = 'part/',
|
|
part_thumbs_list = 'part/thumbs/',
|
|
part_pricing = 'part/:id/pricing/',
|
|
part_requirements = 'part/:id/requirements/',
|
|
part_serial_numbers = 'part/:id/serial-numbers/',
|
|
part_scheduling = 'part/:id/scheduling/',
|
|
part_pricing_internal = 'part/internal-price/',
|
|
part_pricing_sale = 'part/sale-price/',
|
|
part_stocktake_list = 'part/stocktake/',
|
|
part_stocktake_generate = 'part/stocktake/generate/',
|
|
category_list = 'part/category/',
|
|
category_tree = 'part/category/tree/',
|
|
category_parameter_list = 'part/category/parameters/',
|
|
related_part_list = 'part/related/',
|
|
part_test_template_list = 'part/test-template/',
|
|
|
|
// Company API endpoints
|
|
company_list = 'company/',
|
|
contact_list = 'company/contact/',
|
|
address_list = 'company/address/',
|
|
supplier_part_list = 'company/part/',
|
|
supplier_part_pricing_list = 'company/price-break/',
|
|
manufacturer_part_list = 'company/part/manufacturer/',
|
|
|
|
// Stock location endpoints
|
|
stock_location_list = 'stock/location/',
|
|
stock_location_type_list = 'stock/location-type/',
|
|
stock_location_tree = 'stock/location/tree/',
|
|
|
|
// Stock item API endpoints
|
|
stock_item_list = 'stock/',
|
|
stock_tracking_list = 'stock/track/',
|
|
stock_test_result_list = 'stock/test/',
|
|
stock_transfer = 'stock/transfer/',
|
|
stock_remove = 'stock/remove/',
|
|
stock_return = 'stock/return/',
|
|
stock_add = 'stock/add/',
|
|
stock_count = 'stock/count/',
|
|
stock_change_status = 'stock/change_status/',
|
|
stock_merge = 'stock/merge/',
|
|
stock_assign = 'stock/assign/',
|
|
stock_status = 'stock/status/',
|
|
stock_convert = 'stock/:id/convert/',
|
|
stock_disassemble = 'stock/:id/disassemble/',
|
|
stock_install = 'stock/:id/install/',
|
|
stock_uninstall = 'stock/:id/uninstall/',
|
|
stock_serialize = 'stock/:id/serialize/',
|
|
stock_serial_info = 'stock/:id/serial-numbers/',
|
|
|
|
// Generator API endpoints
|
|
generate_batch_code = 'generate/batch-code/',
|
|
generate_serial_number = 'generate/serial-number/',
|
|
|
|
// Order API endpoints
|
|
purchase_order_list = 'order/po/',
|
|
purchase_order_issue = 'order/po/:id/issue/',
|
|
purchase_order_hold = 'order/po/:id/hold/',
|
|
purchase_order_cancel = 'order/po/:id/cancel/',
|
|
purchase_order_complete = 'order/po/:id/complete/',
|
|
purchase_order_line_list = 'order/po-line/',
|
|
purchase_order_extra_line_list = 'order/po-extra-line/',
|
|
purchase_order_receive = 'order/po/:id/receive/',
|
|
|
|
sales_order_list = 'order/so/',
|
|
sales_order_issue = 'order/so/:id/issue/',
|
|
sales_order_hold = 'order/so/:id/hold/',
|
|
sales_order_cancel = 'order/so/:id/cancel/',
|
|
sales_order_ship = 'order/so/:id/ship/',
|
|
sales_order_complete = 'order/so/:id/complete/',
|
|
sales_order_allocate = 'order/so/:id/allocate/',
|
|
sales_order_allocate_serials = 'order/so/:id/allocate-serials/',
|
|
sales_order_auto_allocate = 'order/so/:id/auto-allocate/',
|
|
|
|
sales_order_line_list = 'order/so-line/',
|
|
sales_order_extra_line_list = 'order/so-extra-line/',
|
|
sales_order_allocation_list = 'order/so-allocation/',
|
|
|
|
sales_order_shipment_list = 'order/so/shipment/',
|
|
sales_order_shipment_complete = 'order/so/shipment/:id/ship/',
|
|
|
|
return_order_list = 'order/ro/',
|
|
return_order_issue = 'order/ro/:id/issue/',
|
|
return_order_hold = 'order/ro/:id/hold/',
|
|
return_order_cancel = 'order/ro/:id/cancel/',
|
|
return_order_complete = 'order/ro/:id/complete/',
|
|
return_order_receive = 'order/ro/:id/receive/',
|
|
return_order_line_list = 'order/ro-line/',
|
|
return_order_extra_line_list = 'order/ro-extra-line/',
|
|
|
|
transfer_order_list = 'order/transfer-order/',
|
|
transfer_order_issue = 'order/transfer-order/:id/issue/',
|
|
transfer_order_hold = 'order/transfer-order/:id/hold/',
|
|
transfer_order_cancel = 'order/transfer-order/:id/cancel/',
|
|
transfer_order_complete = 'order/transfer-order/:id/complete/',
|
|
transfer_order_allocate = 'order/transfer-order/:id/allocate/',
|
|
transfer_order_allocate_serials = 'order/transfer-order/:id/allocate-serials/',
|
|
|
|
transfer_order_line_list = 'order/transfer-order-line/',
|
|
transfer_order_allocation_list = 'order/transfer-order-allocation/',
|
|
|
|
// Template API endpoints
|
|
label_list = 'label/template/',
|
|
label_print = 'label/print/',
|
|
report_list = 'report/template/',
|
|
report_print = 'report/print/',
|
|
report_snippet = 'report/snippet/',
|
|
report_asset = 'report/asset/',
|
|
|
|
// Plugin API endpoints
|
|
plugin_list = 'plugins/',
|
|
plugin_setting_list = 'plugins/:plugin/settings/',
|
|
plugin_user_setting_list = 'plugins/:plugin/user-settings/',
|
|
plugin_registry_status = 'plugins/status/',
|
|
plugin_install = 'plugins/install/',
|
|
plugin_reload = 'plugins/reload/',
|
|
plugin_activate = 'plugins/:key/activate/',
|
|
plugin_uninstall = 'plugins/:key/uninstall/',
|
|
plugin_admin = 'plugins/:key/admin/',
|
|
|
|
// User interface plugin endpoints
|
|
plugin_ui_features_list = 'plugins/ui/features/:feature_type/',
|
|
|
|
// Special plugin endpoints
|
|
plugin_locate_item = 'locate/',
|
|
plugin_supplier_list = 'supplier/list/',
|
|
plugin_supplier_search = 'supplier/search/',
|
|
plugin_supplier_import = 'supplier/import/',
|
|
|
|
// Machine API endpoints
|
|
machine_types_list = 'machine/types/',
|
|
machine_driver_list = 'machine/drivers/',
|
|
machine_registry_status = 'machine/status/',
|
|
machine_list = 'machine/',
|
|
machine_restart = 'machine/:machine/restart/',
|
|
machine_setting_list = 'machine/:machine/settings/',
|
|
machine_setting_detail = 'machine/:machine/settings/:config_type/',
|
|
|
|
// Miscellaneous API endpoints
|
|
attachment_list = 'attachment/',
|
|
instance_info = 'instance-info/',
|
|
error_report_list = 'error-report/',
|
|
project_code_list = 'project-code/',
|
|
custom_unit_list = 'units/',
|
|
note_list = 'note/',
|
|
notes_image_list = 'note/image/',
|
|
email_list = 'admin/email/',
|
|
email_test = 'admin/email/test/',
|
|
scim_config = 'admin/scim/',
|
|
scim_generate = 'admin/scim/generate/',
|
|
scim_disable = 'admin/scim/disable/',
|
|
config_list = 'admin/config/',
|
|
parameter_list = 'parameter/',
|
|
parameter_template_list = 'parameter/template/',
|
|
tag_list = 'tag/',
|
|
|
|
// Internal system things
|
|
system_internal_trace_end = 'system-internal/observability/end'
|
|
}
|