Compare commits

...

781 Commits

Author SHA1 Message Date
snipe
f028f54d9e More API doc tweaks 2025-10-10 14:13:15 +01:00
snipe
9dad6908a9 API doc tweaks 2025-10-09 18:33:35 +01:00
snipe
a386dfc1ca Setup Scribe 2025-10-09 17:20:58 +01:00
snipe
fab85dafa8 Added employee number and email to acceptance PDF 2025-10-09 11:24:16 +01:00
snipe
955faed919 Merge pull request #18018 from grokability/advanced-user-search
Normalize advanced search
2025-10-09 11:04:28 +01:00
snipe
0c8ca6d6b0 Search on status label name 2025-10-09 10:54:11 +01:00
snipe
a5de077e04 Merge pull request #17975 from marcusmoore/replace-date-and-time-display-macros
Removed date and time display format form macros
2025-10-09 04:54:05 +01:00
Marcus Moore
a1e65cd897 Merge branch 'develop' into replace-date-and-time-display-macros
# Conflicts:
#	resources/macros/macros.php
2025-10-08 13:10:56 -07:00
snipe
5d65f1ffc5 Merge pull request #17976 from marcusmoore/17204-replace-form-digit-separator
Fixed #17204 - replace Form::digit_separator macro
2025-10-08 21:01:11 +01:00
snipe
b7193a06fd Normalize advanced search 2025-10-08 20:51:35 +01:00
snipe
bc60d796a3 Fixed RB-20329 - ambiguous clause on deleted_at 2025-10-08 15:28:48 +01:00
snipe
c3ac0a750d Added licenses checkin permission 2025-10-08 10:37:58 +01:00
snipe
0f111127a5 Merge pull request #18005 from marcusmoore/fixes/drop-index-migration
Fixed exception when rolling back migrations
2025-10-08 05:26:22 +01:00
snipe
0f4945621c Merge pull request #18009 from grokability/#18002-audit-image-location
Fixed #18002 - use correct path for audit images to determine validity
2025-10-08 05:12:54 +01:00
snipe
9a477f227b Fixed #18002 - use correct path for audit images to determine validity 2025-10-08 05:09:04 +01:00
Marcus Moore
218fe9ebdc Allow Laravel to calculate index name 2025-10-07 16:04:12 -07:00
snipe
85f39de540 Merge pull request #18001 from grokability/#17670-fixes-advanced-search-on-assets
Fixed #17670 - advanced search on relationships not working
2025-10-07 17:35:05 +01:00
snipe
5cc3277e2d Merge pull request #18003 from uberbrady/fix_file_upload_base64
Fixed [FD-50921] - base64-encoded image files for asset creation was broken
2025-10-07 17:34:53 +01:00
snipe
cb47d01f51 Fixed variable name in location print 2025-10-07 17:29:12 +01:00
Brady Wetherington
ee499c1385 Fix base64-encoded image files for asset creation; add test 2025-10-07 16:00:16 +01:00
snipe
4ae4af5c10 Fixed #17670 - advanced search on relationships not working 2025-10-07 15:39:09 +01:00
snipe
fd32585efc Added notes back to audit email 2025-10-07 14:32:24 +01:00
snipe
e65d11d71e Pulled incorrect button label 2025-10-07 14:29:10 +01:00
snipe
c2680334f1 Clearer title on maintenances within asset context 2025-10-07 14:28:38 +01:00
snipe
1217a02ec1 Merge pull request #17992 from marcusmoore/17963-undelete-files-command
Added command to remove invalid "upload deleted" entries from the action log
2025-10-07 14:17:56 +01:00
snipe
49ecc93dbe Merge pull request #17999 from grokability/updated-audit-report
Improved upcoming audit email layout and cli feedback
2025-10-07 14:15:44 +01:00
snipe
1735fb6bed Improved audit email 2025-10-07 14:08:33 +01:00
snipe
1a3b22171c Merge pull request #17997 from grokability/#17924-add-url-to-maintenances
Fixed #17924 - added url to maintenances
2025-10-07 12:09:06 +01:00
snipe
5e773be260 Enhanced tests 2025-10-07 12:05:37 +01:00
snipe
c317a1dc8b Added url to factory 2025-10-07 12:03:35 +01:00
snipe
9401ffc83c Added link to view 2025-10-07 11:55:32 +01:00
snipe
479a852446 Fixed #17924 - added url to maintenances 2025-10-07 11:49:10 +01:00
snipe
36bb91cbc3 Merge pull request #17995 from grokability/#17910-show-counts-on-mobile
Fixed #17910 - added counts to mobile view for assets
2025-10-07 10:47:41 +01:00
snipe
56e5ab8bc6 Fixed #17910 - added counts to mobile view for assets 2025-10-07 10:41:03 +01:00
snipe
ad745cc84b Fixed #17911 - updated language string 2025-10-07 09:42:30 +01:00
Marcus Moore
5a13d5ea6f Update command description 2025-10-06 15:23:55 -07:00
Marcus Moore
0b065eb7fe Improve command 2025-10-06 15:20:43 -07:00
Marcus Moore
e2c0e4bc66 WIP build out command 2025-10-06 15:14:15 -07:00
Marcus Moore
655b0e6778 Scaffold command 2025-10-06 14:59:25 -07:00
Marcus Moore
cd785c9fc3 Remove name_display_format macro that was accidentally re-added 2025-10-06 13:06:52 -07:00
Marcus Moore
23885f5166 Merge branch 'develop' into 17204-replace-form-digit-separator
# Conflicts:
#	resources/macros/macros.php
2025-10-06 13:04:34 -07:00
snipe
e05a0ef565 Merge pull request #17967 from marcusmoore/fixes/17963-delete-file-via-api-fix
Fixed #17963 - over eager deletion of asset files via api
2025-10-06 20:52:57 +01:00
snipe
00b9ba2b75 Merge pull request #17989 from grokability/fixes-tcpdf-png-handling
Fixed #17940 - pngs not showing in acceptance PDFs
2025-10-06 15:13:58 +01:00
snipe
f1e3bc9531 Fixed #17940 - use base64encoding on images in acceptance PDF 2025-10-06 15:02:53 +01:00
snipe
7360e093b2 Bumped version 2025-10-06 10:41:15 +01:00
snipe
5f639bc24f Updated translations 2025-10-06 10:39:04 +01:00
snipe
fd8a8b29b1 Added inactive and expired to licenses table listing 2025-10-04 13:18:51 +01:00
snipe
4e1ef40c05 Updated active button colors 2025-10-04 13:16:46 +01:00
snipe
00af0ddff5 Merge pull request #17982 from grokability/expiring-alerts-improvements
Small expiring alerts improvements
2025-10-04 01:11:03 +01:00
snipe
2467e823a5 Reordered buttons 2025-10-04 01:06:56 +01:00
snipe
224642fcb5 Removed funky search cookie 2025-10-04 01:04:25 +01:00
snipe
59518ca2c5 Small style updates 2025-10-04 00:31:17 +01:00
snipe
dfb7c73069 Added column search to users 2025-10-04 00:31:06 +01:00
snipe
70eccceab3 Updated button class for add new 2025-10-04 00:18:09 +01:00
snipe
3f69b70367 Moved btn methods closer to the BS table 2025-10-03 23:54:38 +01:00
snipe
94a0a2f8be Fixed dropdown toggle 2025-10-03 23:50:40 +01:00
snipe
7e23596ab8 Translate export to CSV 2025-10-03 23:09:33 +01:00
snipe
3c58a5dd3d Fixed column selector 2025-10-03 20:36:52 +01:00
snipe
51789ccbf3 Got tooltips to work on built-in buttons! 2025-10-03 18:54:05 +01:00
snipe
6ae4a9aa1a Added tooltips to custom btn methods 2025-10-03 17:14:47 +01:00
snipe
0aebd669b2 Fixed accessor for console view 2025-10-03 16:25:31 +01:00
snipe
2a92c4899d Don’t use parenthases unless a manufacturer is given 2025-10-03 16:19:00 +01:00
snipe
530089895a Added category and manufacturer to expiring license report 2025-10-03 16:13:00 +01:00
snipe
ae8289fc8c Eager load cagory and manufacturer 2025-10-03 16:12:40 +01:00
snipe
90f4dfb48b Use regular blade syntax 2025-10-03 16:03:03 +01:00
snipe
ec2eddf538 Add order scope to query 2025-10-03 16:02:07 +01:00
snipe
44d31d4b39 Moved date fields closer together 2025-10-03 16:01:49 +01:00
snipe
4934e7666c Added text string 2025-10-03 16:01:38 +01:00
snipe
35bf0d020e Added breadcrumb to expiring 2025-10-03 16:01:27 +01:00
snipe
4934dc85ac Reverse expires diff direction 2025-10-03 16:00:58 +01:00
snipe
5ceb50d7e5 Added expiring licenses to API and UI 2025-10-03 16:00:23 +01:00
snipe
ae7ccbb7bd Fixed icons 2025-10-03 15:59:55 +01:00
snipe
1cd9fc47aa Use diff_in_days instead 2025-10-03 15:03:14 +01:00
snipe
013c50607a Put old setter back because reasons? 2025-10-03 14:46:32 +01:00
snipe
d7bf9b7f2e Added more accessors and mutators 2025-10-03 14:38:37 +01:00
snipe
4702fdddc6 Nicer output in console command 2025-10-03 14:38:08 +01:00
snipe
dd06a530c0 Added Terminates string 2025-10-03 14:37:43 +01:00
snipe
c36125dc95 Added CSS to the message blade 2025-10-03 14:37:25 +01:00
snipe
ae43f93d0a Improved expiring assets and licenses email 2025-10-03 14:37:12 +01:00
snipe
8918b17f77 Updated test 2025-10-03 14:36:16 +01:00
snipe
dfd05e8b5b Refactored scope 2025-10-03 14:13:58 +01:00
snipe
3daa6dd051 Added accessors for termination date 2025-10-03 14:13:28 +01:00
snipe
6cf88b1792 Merge pull request #17978 from marcusmoore/17205-replace-form-email-format
Fixed #17205 - replace Form:: email_format
2025-10-03 09:15:49 +01:00
snipe
6b9839367f Merge pull request #17973 from marcusmoore/fixes/17972-update-last-checkin-upon-edit
Fixed #17972 - set last_checkin if asset is checked in during an update
2025-10-03 09:15:35 +01:00
snipe
34fcf5d616 Merge pull request #17974 from marcusmoore/replace-form-checkbox
Replaced Form::checkbox with raw html
2025-10-03 09:15:12 +01:00
snipe
1cf3c74e67 Merge pull request #17979 from akemidx/term-date-on-license-report
Fixed #17977: Term date on license report
2025-10-03 09:14:07 +01:00
snipe
16b57b931e Merge pull request #17980 from marcusmoore/17206-replace-name-display-format-macro
Fixed #17206 - replace Form::name_display_format macro
2025-10-03 09:13:23 +01:00
Marcus Moore
3457e7d617 Remove Form::name_display_format macro 2025-10-02 16:08:37 -07:00
Marcus Moore
edbe8001e6 Replace Form::name_display_format 2025-10-02 16:08:16 -07:00
akemidx
71644c1cbe added term date 2025-10-02 19:00:18 -04:00
Marcus Moore
03fd8df8bd Remove Form::email_format 2025-10-02 15:52:09 -07:00
Marcus Moore
71d622b6dd Replace Form:: email_format 2025-10-02 15:51:41 -07:00
Marcus Moore
689d5a2d58 Remove digit_separator form macro 2025-10-02 15:39:28 -07:00
Marcus Moore
b2e9eb866c Replace digit_separator form macro
Fixes #17204
2025-10-02 15:38:59 -07:00
Marcus Moore
c8b7782d1d Remove date_display_format and time_display_format macros 2025-10-02 15:27:20 -07:00
Marcus Moore
673f936689 Replace Form:: time_display_format on localization screen 2025-10-02 15:26:31 -07:00
Marcus Moore
2ca0d39e51 Replace Form:: date_display_format on localization screen 2025-10-02 15:21:51 -07:00
Marcus Moore
908c8bc397 Remove Form::checkbox on user create screen 2025-10-02 14:33:48 -07:00
Marcus Moore
93082e1e87 Set last_checkin if asset checked in during update 2025-10-02 13:56:42 -07:00
Marcus Moore
ef0a6aa25e Add failing condition 2025-10-02 13:53:19 -07:00
snipe
90afec864e Fixed info text help block class 2025-10-02 08:07:54 +01:00
Marcus Moore
4bbbd786cd Constrain to "uploaded" action_type 2025-10-01 14:37:36 -07:00
snipe
a6ded20ede Merge pull request #17966 from uberbrady/fix_filetype_validation
Cleanups and improvements to output on snipeit:restore command
2025-10-01 22:26:49 +01:00
Brady Wetherington
9b96314371 Cleanups and improvements to output on snipeit:restore command 2025-10-01 22:07:45 +01:00
snipe
2ac36cdfd6 Fixed alignment on create-new dropdown in header 2025-10-01 21:32:28 +01:00
snipe
9404dff79c Added note about markdown 2025-10-01 12:12:56 +01:00
snipe
3ed2e2d79e Added link to docs for common issues in upgrading script 2025-10-01 11:49:05 +01:00
snipe
f1266ab5d6 Check if telescope tables already exist 2025-10-01 11:24:20 +01:00
snipe
664e3984e3 Merge pull request #17877 from grokability/label-cjk-fix
Fixed CJK on labels
2025-10-01 11:16:55 +01:00
snipe
665c13e238 Merge pull request #17957 from marcusmoore/fixes/17956-handle-force-deleted-model-in-asset-edit
Fixed #17956 - handle accessing deleted model during asset update
2025-10-01 11:10:11 +01:00
snipe
8a667b20c2 Merge branch 'develop' into fixes/17956-handle-force-deleted-model-in-asset-edit 2025-10-01 11:09:40 +01:00
snipe
3693241292 Merge pull request #17959 from marcusmoore/fixes/17958-handle-force-deleted-model-in-bulk-edit
Fixes #17958 - handle accessing deleted model during bulk asset update
2025-10-01 11:06:32 +01:00
Marcus Moore
3c3acff79b Fix more attempted access of deleted model 2025-09-30 12:22:26 -07:00
Marcus Moore
e15de83a95 Fix attempted access of deleted model 2025-09-30 12:19:12 -07:00
Marcus Moore
636fccbf97 Add failing test 2025-09-30 12:18:51 -07:00
Marcus Moore
7d8ed399a8 Fix accessing force deleted model 2025-09-30 11:27:56 -07:00
Marcus Moore
272385db6c Add failing test 2025-09-30 11:27:38 -07:00
snipe
291be64aa0 Refined remnaining asset count for archived 2025-09-30 11:40:21 +01:00
snipe
72be171917 Added archived to model view 2025-09-30 11:20:33 +01:00
snipe
43cd0d7eb3 Use min_amt formatter 2025-09-30 10:54:43 +01:00
snipe
eeea69d8f2 Make available_assets_count sortable 2025-09-30 10:51:25 +01:00
snipe
bec88a0441 Merge pull request #17950 from grokability/#17932-fix-remaining-counts-in-model-listing
Fixed #17932 - incorrect number for remaining assets in asset models
2025-09-29 20:55:52 +01:00
snipe
6e67e3a8a0 Fixed #17932 - incorrect number for remaining assets in asset models 2025-09-29 20:55:06 +01:00
snipe
947ccf911d Merge pull request #17868 from Godmartinz/adds-Tze_24mm-variant
Adds Brother Label TZe_24mm_E variant
2025-09-29 15:48:10 +01:00
snipe
06f313febe Merge pull request #17869 from marcusmoore/api-components-assigned-to-asset
Added api endpoint for retrieving components checked out to asset
2025-09-29 15:47:53 +01:00
snipe
b387136b8f Merge pull request #17883 from akemidx/purchasepricereportfilter
FEATURE: Purchase Cost Report Filter
2025-09-29 15:37:39 +01:00
snipe
31614c5da1 Merge pull request #17888 from marcusmoore/fixes/bulk-checkout-extra-requests
Fixed excessive api requests on bulk checkout page
2025-09-29 14:46:19 +01:00
snipe
146b5a3085 Merge pull request #17933 from marcusmoore/17914-bulk-checkout-error-ux
Fixed #17914 - Improve UX around attempted bulk checkout of assigned assets
2025-09-29 14:44:20 +01:00
snipe
ff1297cac5 Merge pull request #17945 from kingspride/develop
with --no-interactive, make composer non-interactive aswell
2025-09-29 11:04:30 +01:00
William Kirstaedter
8af3cf4056 with --no-interactive, make composer non-interactive aswell 2025-09-29 11:39:23 +02:00
Marcus Moore
9edec9e212 Extract translation 2025-09-25 11:09:27 -07:00
snipe
be4362c59a Merge pull request #17925 from Godmartinz/fix-factory-auto-gen-action-logs
Adds option to disable auto generating action log from acceptance factory
2025-09-25 11:10:34 +01:00
Marcus Moore
8461b147de Link to removed assets 2025-09-24 16:38:48 -07:00
Godfrey M
82bdd43168 renamed variable 2025-09-24 15:38:30 -07:00
Godfrey M
533d82d4d8 remove unnecessary changes 2025-09-24 15:34:02 -07:00
Godfrey M
6f990dd1de adds an option to disable Auto assigned an actionlogs in factories 2025-09-24 15:27:16 -07:00
Marcus Moore
be848598e3 Keep removed asset out of scope of partial 2025-09-24 14:32:25 -07:00
snipe
7d0742054f Merge pull request #17923 from uberbrady/fix_checkout_type_selector2
Fixed #17919 - correct the behavior of the checkout type selector
2025-09-24 14:52:05 +01:00
Brady Wetherington
dcf7e83507 Remove extra pointless class="active" 2025-09-24 14:47:13 +01:00
Brady Wetherington
407c2bf0c8 Switch to ?: from ?? to better handle empty strings 2025-09-24 14:45:43 +01:00
Brady Wetherington
c46227ee94 Fix to the checkout-selector issue 2025-09-24 14:28:49 +01:00
snipe
d8171eb056 Remove duplicate PUT route for hardware assets
Removed duplicate route definition for updating hardware assets.
2025-09-23 13:24:56 +01:00
Marcus Moore
c614c44d4c Remove assigned assets from bulk checkout 2025-09-22 16:04:29 -07:00
snipe
8a46579588 Merge pull request #17887 from marcusmoore/fixes/17404-prevent-bulk-checkout-across-companies
Fixed #17404 - Disallow bulk checkout of assets across companies
2025-09-22 18:57:43 +01:00
Marcus Moore
fb9fb9c097 Merge branch 'develop' into fixes/17404-prevent-bulk-checkout-across-companies
# Conflicts:
#	app/Http/Controllers/Assets/BulkAssetsController.php
#	tests/Feature/Checkouts/Ui/BulkAssetCheckoutTest.php
2025-09-22 10:52:04 -07:00
snipe
d9399534ce Merge pull request #17909 from spacjalex/17908-fix-typo
Fix #17908: typo in storage location of backups
2025-09-22 14:28:05 +01:00
spacjalex
17a749bbed fix typo 2025-09-22 15:23:14 +02:00
snipe
25ce63f00b Merge pull request #17904 from grokability/#17804-searchable-columns
Fixed #17804 - make columns searchable in column picker
2025-09-19 12:43:46 +01:00
snipe
2462bc05b3 Added column search to additional views 2025-09-19 12:41:30 +01:00
snipe
c3748da0b1 Fixed #17804 - make columns searchable in column picker 2025-09-19 12:16:56 +01:00
snipe
90c242a441 Merge pull request #17897 from marcusmoore/fixes/17896-prevent-bulk-checkout-of-checked-out-assets
Fixed #17896 - Prevent assigned assets from being bulk checked out
2025-09-19 07:03:43 +01:00
Marcus Moore
52239a88b5 Improve test name 2025-09-18 17:27:17 -07:00
Marcus Moore
7a3596c86d Test against other types 2025-09-18 17:21:27 -07:00
Marcus Moore
ac8a9e38f0 Implement fix 2025-09-18 17:18:27 -07:00
Marcus Moore
5c08f3a27e Add failing test 2025-09-18 17:14:33 -07:00
Marcus Moore
2dc11a84bf Fix test name 2025-09-18 17:05:08 -07:00
Marcus Moore
2960ea15f5 Consolidate to data provider 2025-09-18 14:29:12 -07:00
Marcus Moore
17aab4c490 Implement test 2025-09-18 14:20:05 -07:00
Marcus Moore
59d0f0d292 Re-order assertions 2025-09-18 14:05:13 -07:00
Marcus Moore
27d13a113a Implement test 2025-09-18 14:01:44 -07:00
Marcus Moore
c58e999fbb Scaffold tests 2025-09-18 13:11:06 -07:00
Marcus Moore
a02a96d5c4 Extract translation string 2025-09-18 12:57:56 -07:00
Marcus Moore
47e9e4704d Improve error message 2025-09-18 12:56:36 -07:00
Marcus Moore
b2ad9d404e Fix re-population of assets 2025-09-18 12:38:11 -07:00
snipe
5216dd75bf Bumped version 2025-09-18 14:49:15 +01:00
snipe
b8b45d2d81 Merge pull request #17892 from grokability/#17891-fixes-maintenance-file-route
Fixed #17891 - missing maintenance file deletion route
2025-09-18 13:59:10 +01:00
snipe
4b2b2cb68e Fixed #17891 - missing maintenance file deletion route 2025-09-18 13:58:30 +01:00
snipe
be4ace293e Use trans_choice for user acceptance 2025-09-18 13:51:57 +01:00
snipe
764b363bbc A few small tweaks to acceptance screen design 2025-09-18 13:38:37 +01:00
Marcus Moore
705474dc14 Avoid pre-loading all assets on page load 2025-09-17 16:56:37 -07:00
Marcus Moore
e639d7726b Disallow bulk checkout across companies 2025-09-17 14:32:27 -07:00
snipe
9da9166442 Merge pull request #17886 from grokability/small-tweaks-to-acceptance-pdf
Small adjustments for acceptance PDF layout
2025-09-17 22:01:41 +01:00
snipe
8ea339f0ef More small tweaks 2025-09-17 22:00:49 +01:00
Marcus Moore
e29b0aa6a4 Add todo 2025-09-17 13:55:54 -07:00
Marcus Moore
d2157868f2 Populate failing test 2025-09-17 13:49:32 -07:00
snipe
89b36ba63f Derp. Uncomment the acceptance. 2025-09-17 21:43:40 +01:00
snipe
1d3dfa1fa4 Pull the acceptance stuff into the model 2025-09-17 21:43:17 +01:00
Marcus Moore
89cfafd933 Scaffold test 2025-09-17 13:40:34 -07:00
snipe
ca567eec8a Small adjustments for layout 2025-09-17 21:08:13 +01:00
snipe
41da31c379 Merge pull request #17885 from grokability/#8859-show-cost-footer-on-models
Fixed #8859 - adds purchase sums on model view
2025-09-17 14:04:38 +01:00
snipe
e81f63f46b Fixed #8859 - adds purchase sums on model view 2025-09-17 14:03:48 +01:00
snipe
ade03e4827 Merge pull request #17882 from Godmartinz/add-total-cost-columns
Adds total cost to Accessories, Consumables, Components
2025-09-17 13:56:08 +01:00
snipe
33a4c88c3a Added table to deleted_at clauses to resolve ambiguity 2025-09-17 11:44:28 +01:00
akemidx
69c5dbfc23 formatting 2025-09-17 05:39:45 -04:00
akemidx
cf1bccfd65 prep for val 2025-09-16 15:24:44 -04:00
akemidx
99acf018f1 validation rule & query 2025-09-16 15:17:59 -04:00
snipe
1f79776b8f Pull HTML tags out before converting markdown 2025-09-16 19:21:39 +01:00
Godfrey M
11e5f851f0 typo 2025-09-16 10:49:33 -07:00
Godfrey M
4ca1db8a1b remove footer formatter from consumable purchase cost 2025-09-16 10:43:02 -07:00
Godfrey M
14b829aa30 add total cost to components and consumables 2025-09-16 10:37:32 -07:00
Godfrey M
384652b3df add total cost to accessories 2025-09-16 10:10:49 -07:00
snipe
9db65c6ae9 Merge pull request #17881 from grokability/#17873-eula-tab-on-users
Fixed #17873 - Added EULA tab to user view
2025-09-16 14:28:50 +01:00
snipe
1346e33e99 Check that the person trying to download can see both the user and the target 2025-09-16 14:21:03 +01:00
snipe
ab9cc447aa Use more specific filename 2025-09-16 14:20:20 +01:00
akemidx
cb63c12d2f i think this is gonna need livewire to validate lol 2025-09-16 08:24:22 -04:00
snipe
fe9e0444b4 Added EULA tab to user view 2025-09-16 13:20:50 +01:00
akemidx
6ce0fd20ce works, needs error handling 2025-09-16 08:11:42 -04:00
snipe
a18957dbe9 Include output even if there is nothing to send 2025-09-16 12:33:06 +01:00
snipe
13d5b724ee Fixed tests 2025-09-16 12:16:18 +01:00
snipe
b383cd9493 Fixed CJK on labels 2025-09-16 12:10:01 +01:00
snipe
c7d8203da9 Merge pull request #17866 from grokability/_reworked_tcpdf
Fixed #14744 and #17808 - Added CJK and Arabic font support for asset acceptance
2025-09-16 12:04:15 +01:00
snipe
96b5c1d8e1 Merge pull request #17876 from uberbrady/add_users_location_index
Add new index to users over deleted_at and location_id
2025-09-16 12:03:45 +01:00
Brady Wetherington
882ee80424 Add new index to users over deleted_at and location_id 2025-09-16 11:54:24 +01:00
snipe
e977771fe4 One more query tweak 2025-09-16 11:50:50 +01:00
snipe
4339e4552e Fixed nesting in orWhere 2025-09-16 11:50:50 +01:00
snipe
b54d222943 One more query tweak 2025-09-16 11:39:02 +01:00
snipe
e4e613550a Merge pull request #17875 from grokability/fixed-eol-query
Fixed nesting in orWhere
2025-09-16 11:27:07 +01:00
snipe
d1207444db Fixed nesting in orWhere 2025-09-16 11:20:49 +01:00
Marcus Moore
06f060161d Apply offset and limit 2025-09-15 15:43:54 -07:00
Marcus Moore
73e0628124 Populate test 2025-09-15 15:26:30 -07:00
Marcus Moore
7393c4170b Apply first pass and scaffold additional test 2025-09-15 15:22:35 -07:00
Marcus Moore
73e185bf9d Scaffold route and tests 2025-09-15 15:12:05 -07:00
snipe
0bad75b263 Fixed declined asset name 2025-09-15 20:56:57 +01:00
snipe
74b98083e2 Override the getEula() method at the SnipeModel level 2025-09-15 20:05:35 +01:00
snipe
9034b5ec11 Slightly nicer display 2025-09-15 20:04:17 +01:00
Godfrey M
77153c3e78 adds Tze_24mm variant 2025-09-15 11:20:35 -07:00
snipe
927f557672 Fixed sorting on updated/created at 2025-09-15 18:13:46 +01:00
snipe
86fb089901 Remove unused blades 2025-09-15 18:13:32 +01:00
snipe
630ea05e17 A little more cleanup 2025-09-15 17:16:05 +01:00
snipe
7df5196083 A little cleanup 2025-09-15 16:09:49 +01:00
snipe
01f7b5d709 Added CJK and Arabic font support 2025-09-15 14:46:11 +01:00
snipe
ec47ee3573 Merge pull request #17850 from Godmartinz/change-purchase-cost-to-unit
Rewords Purchase cost to Unit Cost for Accessories, Components, Consumables
2025-09-15 14:20:04 +01:00
snipe
7062962cc8 Show warnings on the dates if expired or terminated 2025-09-15 13:43:08 +01:00
snipe
fde447846a Merge pull request #17865 from grokability/show-inactive-licenses
Show inactive licenses
2025-09-15 13:42:22 +01:00
snipe
319cb1bd1e Removed logging 2025-09-15 13:23:44 +01:00
snipe
58cda5ae6d Added scopes 2025-09-15 13:22:25 +01:00
snipe
251a3db880 Fixed factory 2025-09-15 13:20:34 +01:00
snipe
30b6dcd767 Added status to breadcrumbs 2025-09-15 13:13:50 +01:00
snipe
05f6622912 Added status to URL 2025-09-15 13:13:32 +01:00
snipe
36183ac19d Fixed url and tooltip text 2025-09-15 13:13:18 +01:00
snipe
f6a823e0a8 Escape text 2025-09-15 13:13:04 +01:00
snipe
312353551d Changed button color 2025-09-15 13:11:58 +01:00
snipe
fd5c9cee38 Merge pull request #17863 from grokability/added-status-label-to-asset-view
Added status label to asset view
2025-09-15 10:31:54 +01:00
snipe
84bf71802c Added status label to asset view 2025-09-15 10:31:06 +01:00
snipe
35739c2eef Merge pull request #17835 from marcusmoore/feature/10052-assigned-assets-via-api
Fixed #10052 - Added api endpoint for retrieving assets checked out to asset
2025-09-15 08:38:35 +01:00
snipe
1914a71623 Merge pull request #17851 from marcusmoore/fixes/qty-in-component-email
Fixed potentially incorrect qty in component checkout email
2025-09-15 08:37:48 +01:00
snipe
dcc53886d9 Merge pull request #17857 from uberbrady/fix_client_tls_ldap
Fixed #17414 - client-side TLS certificate didn't work in Google LDAP
2025-09-15 08:37:14 +01:00
Brady Wetherington
21ef87ef09 Merge branch 'develop' into fix_client_tls_ldap 2025-09-12 18:52:43 +01:00
snipe
b67f808da9 Fixed fieldname 2025-09-12 18:07:40 +01:00
snipe
ad69447b53 Merge pull request #17858 from grokability/ignore-expiring-licenses-with-past-termination-date
Ignore expiring licenses with past termination date
2025-09-12 17:55:14 +01:00
snipe
b4614df88c Removed awkward period 2025-09-12 17:39:52 +01:00
snipe
7171247cdc Updated tests 2025-09-12 17:37:36 +01:00
snipe
6d0084f108 Nicer alert layout for expiring asset report 2025-09-12 17:37:27 +01:00
snipe
29359f42ae Added table printout 2025-09-12 17:37:12 +01:00
snipe
cf875bf872 Changed verbiage 2025-09-12 17:37:03 +01:00
snipe
13c0d335d3 Refactor alert query 2025-09-12 17:36:51 +01:00
snipe
ceb33409b5 Removed duplicate array key 2025-09-12 17:36:33 +01:00
Brady Wetherington
83597d4a8b Possible fix to client-side TLS certificate issue for google LDAP 2025-09-12 17:12:35 +01:00
Marcus Moore
81eefc5448 Merge branch 'develop' into fixes/qty-in-component-email 2025-09-11 14:14:42 -07:00
Marcus Moore
082bc3ece4 Use correct qty in component checkout email 2025-09-11 14:10:31 -07:00
snipe
b2406b61fb Merge pull request #17826 from marcusmoore/fixes/17585-accessory-checkout-amount-in-subject
Fixed #17585 - Display accessory checkout qty in subject line and intro text
2025-09-11 21:55:20 +01:00
Marcus Moore
15698d7694 Update introduction lines with qty 2025-09-11 13:50:48 -07:00
Godfrey M
990cd82f97 change purchase cost to unit cost in several places 2025-09-11 10:46:20 -07:00
snipe
c87829b3e8 Merge pull request #17849 from Godmartinz/rollbar-unreassignablecount-fix
Fixed typo in UnreassignableCount
2025-09-11 18:43:07 +01:00
Godfrey M
6799c41d65 fixed typo 2025-09-11 10:23:53 -07:00
snipe
80c059be58 Skip terminated licenses in alert 2025-09-11 13:14:53 +01:00
snipe
aa3f896538 Merge pull request #17842 from Godmartinz/expiration-and-termination-license-enhancement
Adds #8799 Prevention of checkout of expired or terminated licenses
2025-09-11 11:46:15 +01:00
snipe
d8c17a8a5e One more small tweak to language 2025-09-11 11:40:15 +01:00
akemidx
50e210b2db fixing naming convention to match 2025-09-10 17:35:09 -04:00
Godfrey M
850939367c adds translation warning message 2025-09-10 12:59:35 -07:00
Marcus Moore
bf4fef9bf7 Merge branch 'develop' into fixes/17585-accessory-checkout-amount-in-subject 2025-09-10 12:49:41 -07:00
Godfrey M
d5175961a4 adds a seperate formatter for checking out on license index, fix interactions 2025-09-10 12:42:10 -07:00
snipe
e7e1d6a232 Small tweaks to language 2025-09-10 20:17:33 +01:00
snipe
712345f3a0 Added link to discussions and discord 2025-09-10 20:14:19 +01:00
snipe
54c9bc3dcb Merge pull request #17840 from marcusmoore/issue-template
Made install method required in issue template
2025-09-10 20:14:10 +01:00
Godfrey M
e796c0da4a disallows checkout of expired or terminated licenses 2025-09-10 12:08:14 -07:00
Marcus Moore
cf8ff0f43e Add note on English 2025-09-10 10:41:20 -07:00
Marcus Moore
e67ce23a7c Require installation method 2025-09-10 10:23:22 -07:00
snipe
a66bb95a81 A few more tweaks 2025-09-10 15:48:21 +01:00
snipe
c66fa33b2e Have I mentioned how much I hate YAML? 2025-09-10 15:43:09 +01:00
snipe
56eebb9db4 Small tweaks to templates 2025-09-10 15:40:12 +01:00
snipe
d9773f107e Added feature request form
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 15:38:19 +01:00
snipe
e09112f46a Require installation type
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 15:33:06 +01:00
snipe
50a17a82b6 Sigh
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 15:30:42 +01:00
snipe
7eb032d646 Rename issue template (I guess?)
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 15:25:51 +01:00
snipe
e065f22f8e Merge pull request #17838 from grokability/issue-form
New GH issue form
2025-09-10 15:20:51 +01:00
snipe
c1b4ba1f85 Last one for now
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 15:20:27 +01:00
snipe
eeaec471f0 Dunno if this will work
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 15:19:29 +01:00
snipe
0d3c8678d8 Moved text
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 15:17:16 +01:00
snipe
bbddf5f95b Still a few more tweaks
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 15:15:09 +01:00
snipe
3b8c8b3af9 Nicer markdown
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 15:12:38 +01:00
snipe
84753aa13f Added browser console
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 15:08:37 +01:00
snipe
90b84451d8 Fixed indenting
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 15:07:04 +01:00
snipe
54c8ae41cc Still hate YAML
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 15:06:03 +01:00
snipe
7d32b1a724 God I hate YAML
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 15:05:27 +01:00
snipe
69ffd63ca6 Removed backticks
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 15:02:50 +01:00
snipe
4857c19eb6 More tweaks
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 15:02:07 +01:00
snipe
d535e23da0 More template tweaks
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 14:51:33 +01:00
snipe
30e02544ab Try renaming so I can preview
via https://github.com/orgs/community/discussions/7039#discussioncomment-5327083

Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 14:43:16 +01:00
snipe
ee53925bd2 Starter for preview
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 14:40:38 +01:00
snipe
40495b8a17 Small demo tweaks
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 12:33:33 +01:00
akemidx
b1de98f05d first front end 2025-09-09 19:18:29 -04:00
Marcus Moore
6bc9a82a7a Formatting 2025-09-09 14:51:22 -07:00
Marcus Moore
6504ee37bd Remove dump 2025-09-09 13:09:52 -07:00
Marcus Moore
082bff2fa8 Add and use query scope helper 2025-09-09 13:04:14 -07:00
Marcus Moore
ab7bd86336 Improve assertions 2025-09-09 13:01:59 -07:00
Marcus Moore
eada0b0bb5 Implement test 2025-09-09 11:58:43 -07:00
Marcus Moore
f221f9f22a Implement test 2025-09-09 11:50:41 -07:00
snipe
6731e44a0d Merge pull request #17828 from marcusmoore/fixes/17586-acceptance-banner-qty
Fixed #17586 - Display accurate quantity in banner
2025-09-09 19:38:34 +01:00
Marcus Moore
acc37045e4 Implement test 2025-09-09 11:34:50 -07:00
Marcus Moore
a7c5899c16 Implement test 2025-09-09 11:33:54 -07:00
Marcus Moore
80b02635a9 Add test stub 2025-09-09 10:10:53 -07:00
snipe
f90de5ec67 Merge pull request #17833 from grokability/tighter-controls-on-licenses
Tighter controls on license deletion, also fixes #16227 adding more tables to location print
2025-09-09 15:35:12 +01:00
snipe
9a3e046530 Fixed HTML
Signed-off-by: snipe <snipe@snipe.net>
2025-09-09 15:30:34 +01:00
snipe
7f56e461fe Added child location icon
Signed-off-by: snipe <snipe@snipe.net>
2025-09-09 15:19:00 +01:00
snipe
1da37e0d38 Added child location count
Signed-off-by: snipe <snipe@snipe.net>
2025-09-09 15:18:47 +01:00
snipe
0004d4936c Cleaned up print view
Signed-off-by: snipe <snipe@snipe.net>
2025-09-09 15:18:28 +01:00
snipe
7a6fdc4e0a Added parent ID to location API
Signed-off-by: snipe <snipe@snipe.net>
2025-09-09 15:18:09 +01:00
snipe
2eb727bd0c Added tests
Signed-off-by: snipe <snipe@snipe.net>
2025-09-09 13:51:56 +01:00
snipe
57af507170 Added deleted button to locations, check for additional relations
Signed-off-by: snipe <snipe@snipe.net>
2025-09-09 12:20:34 +01:00
snipe
e37f87465c Merge pull request #17827 from Godmartinz/duplicate-emails-fix
Fixed #17756 - Duplicate checkout emails
2025-09-09 09:33:03 +01:00
Marcus Moore
324070f345 Begin to build out test 2025-09-08 17:20:22 -07:00
Marcus Moore
e1aa843b6d Scaffold test 2025-09-08 17:05:14 -07:00
Godfrey M
e652a7fd61 fix tests 2025-09-08 14:56:15 -07:00
Marcus Moore
2397bfbad0 Improve variable name 2025-09-08 14:51:19 -07:00
Marcus Moore
7e2bc8e452 Display accurate quantity in banner 2025-09-08 14:48:11 -07:00
Godfrey M
00e8fd0483 cloned mailable 2025-09-08 14:44:58 -07:00
Marcus Moore
6d8bf2c665 Display accessory checkout qty in subject line 2025-09-08 14:25:56 -07:00
snipe
72466f1aab Revert "Merge pull request #17823 from grokability/#17822-fix-n+1-in-topmenu"
This reverts commit 6901deccbf, reversing
changes made to 6b87c90e02.

Signed-off-by: snipe <snipe@snipe.net>
2025-09-08 15:04:28 +01:00
snipe
6901deccbf Merge pull request #17823 from grokability/#17822-fix-n+1-in-topmenu
Fixed #17822 - n+1 in top menu check
2025-09-08 14:33:47 +01:00
snipe
5a9c906eb9 Added filter to assets loading
Signed-off-by: snipe <snipe@snipe.net>
2025-09-08 14:32:58 +01:00
snipe
b95b60b49e Use eager-loaded model assets
Signed-off-by: snipe <snipe@snipe.net>
2025-09-08 14:07:49 +01:00
snipe
14408ef18f Fixed n+1 in top menu check
Signed-off-by: snipe <snipe@snipe.net>
2025-09-08 13:55:22 +01:00
snipe
6b87c90e02 Use scope for assets for show in sidebar
Signed-off-by: snipe <snipe@snipe.net>
2025-09-08 13:33:19 +01:00
snipe
2b4d5222eb Made “add new” buttons clearer on table headers
Signed-off-by: snipe <snipe@snipe.net>
2025-09-08 12:17:29 +01:00
snipe
9604ecebad Fixed jobtitle in advanced search
Signed-off-by: snipe <snipe@snipe.net>
2025-09-08 12:01:59 +01:00
snipe
0d67970a45 Update @swift2512 as a contributor 2025-09-08 09:27:34 +01:00
snipe
913b9f0c40 Reworks PR #15490 - adds location to inventory email
Signed-off-by: snipe <snipe@snipe.net>
2025-09-08 09:26:36 +01:00
snipe
610a5745f0 Merge pull request #17818 from grokability/dependabot/github_actions/develop/actions/stale-10
Bump actions/stale from 9 to 10
2025-09-08 09:17:19 +01:00
dependabot[bot]
dff12324c6 Bump actions/stale from 9 to 10
Bumps [actions/stale](https://github.com/actions/stale) from 9 to 10.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v9...v10)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-version: '10'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 08:16:24 +00:00
snipe
f340390fc8 Merge pull request #17703 from marcusmoore/17369-accessory-checkout-qty-scaffold
Fixed issues around accessory acceptance
2025-09-08 09:09:26 +01:00
snipe
be81e74921 Shifted log meta position
Signed-off-by: snipe <snipe@snipe.net>
2025-09-08 08:24:50 +01:00
snipe
2bee8729e4 Better escaping for display_name in API controller
Signed-off-by: snipe <snipe@snipe.net>
2025-09-08 08:14:33 +01:00
snipe
5d03038734 Use auto-direction for <p> in preview
Signed-off-by: snipe <snipe@snipe.net>
2025-09-05 15:12:38 +01:00
snipe
75b11de0f4 Bumped composer packages
Signed-off-by: snipe <snipe@snipe.net>
2025-09-04 19:55:30 +01:00
snipe
c5bede8594 More small display_name fixes
Signed-off-by: snipe <snipe@snipe.net>
2025-09-04 17:15:06 +01:00
snipe
cd9ea6ae3b Fixed typo
Signed-off-by: snipe <snipe@snipe.net>
2025-09-04 16:56:43 +01:00
snipe
113b762ec7 Fix for null location in locations print
Signed-off-by: snipe <snipe@snipe.net>
2025-09-04 16:55:44 +01:00
snipe
78704d8b85 Fixed #17803 - checked out to name in custom report
Signed-off-by: snipe <snipe@snipe.net>
2025-09-04 16:51:10 +01:00
snipe
1109db76fe Merge pull request #17797 from grokability/#17796-search-on-model-name-and-number
Fixed #17796 - search on model name and number on importer
2025-09-04 16:35:43 +01:00
snipe
b1b390febf Removed flaky test
Signed-off-by: snipe <snipe@snipe.net>
2025-09-04 16:30:02 +01:00
snipe
be451fa0c0 Removed asset model from original factory
Signed-off-by: snipe <snipe@snipe.net>
2025-09-04 16:14:27 +01:00
snipe
1fa553c785 Use nths
Signed-off-by: snipe <snipe@snipe.net>
2025-09-04 16:04:16 +01:00
snipe
905f61371d Fixed tests
Signed-off-by: snipe <snipe@snipe.net>
2025-09-04 16:02:40 +01:00
snipe
7da5210a01 Switched to nth from fetchOne in CSV reader
Signed-off-by: snipe <snipe@snipe.net>
2025-09-04 12:50:12 +01:00
snipe
18172d3896 Merge pull request #17752 from marcusmoore/fixes/existing-assets-report
Improve expiring alerts notification layout
2025-09-04 12:33:32 +01:00
snipe
c28e78b9e2 Merge pull request #16063 from Godmartinz/checkin_non_reassignable_license
Allows check-ins of unreassignable licenses
2025-09-04 11:22:17 +01:00
snipe
e7827a3847 Merge pull request #17800 from marcusmoore/chore/test-action-logs
Upload log file in GitHub Action tests
2025-09-04 10:20:12 +01:00
Marcus Moore
039564e74c Wrap migration in check 2025-09-03 12:52:46 -07:00
Marcus Moore
e164595a0f Fall back to displaying 1 2025-09-03 12:35:18 -07:00
Marcus Moore
d29e09a3ff Merge branch 'develop' into 17369-accessory-checkout-qty-scaffold
# Conflicts:
#	resources/views/account/accept/create.blade.php
#	resources/views/account/accept/index.blade.php
2025-09-03 12:26:43 -07:00
Godfrey M
db9f85e9da Merge branch 'develop' into checkin_non_reassignable_license
# Conflicts:
#	app/Models/License.php
#	resources/views/licenses/view.blade.php
#	tests/Feature/Checkins/Api/LicenseCheckInTest.php
2025-09-03 11:09:51 -07:00
Marcus Moore
27022954b1 Inline icon 2025-09-03 10:44:19 -07:00
Marcus Moore
30362c924f Upload log as artifact 2025-09-03 10:13:01 -07:00
snipe
bf63b15b46 Merge pull request #17799 from grokability/#17798-adds-require-serial-to-importer
Fixed #17798 - added `require_serial` to model importer
2025-09-03 15:32:42 +01:00
snipe
19aea4bd6c Fixed #17798 - added require_serial to model importer
Signed-off-by: snipe <snipe@snipe.net>
2025-09-03 15:25:56 +01:00
snipe
090890e9c6 Fixed #17796 - search on model name and number on importer
Signed-off-by: snipe <snipe@snipe.net>
2025-09-03 15:15:29 +01:00
snipe
605022a9e3 Merge pull request #17795 from grokability/#17791-larger-currency-field
Fixed #17791 - increase size of purchase cost field
2025-09-03 15:09:28 +01:00
snipe
b06c58fe7b Switch to older style rules for consistency
Signed-off-by: snipe <snipe@snipe.net>
2025-09-03 15:06:27 +01:00
snipe
f5c8b3eb04 Fixed #17791 - increase size of purchase cost field
Signed-off-by: snipe <snipe@snipe.net>
2025-09-03 15:03:49 +01:00
snipe
739980aa09 Merge pull request #16947 from Godmartinz/add-require-serial-to-models
Adds require serial as Asset Model option
2025-09-03 14:53:15 +01:00
snipe
afde5943e3 Fixed typo - #17784
Signed-off-by: snipe <snipe@snipe.net>
2025-09-03 14:39:59 +01:00
snipe
32300cb42c Merge pull request #17788 from grokability/add-delete-log-instead-of-soft-deleting-the-log-itself
Fixed #17777 - Log upload deletion
2025-09-03 14:37:32 +01:00
snipe
de3b1697c8 Merge pull request #17760 from Godmartinz/fix-translation-string-in-notifications
Fixes #17759 translation used in asset check in/out notifications
2025-09-03 14:33:57 +01:00
snipe
a18fb10b5a Merge pull request #17783 from marcusmoore/fixes/company-in-location-print
Fixed company name reference in location print
2025-09-03 08:44:40 +01:00
snipe
52140dbe06 Log upload deletion
Signed-off-by: snipe <snipe@snipe.net>
2025-09-03 08:37:42 +01:00
Marcus Moore
db5bb1928e Merge branch 'develop' into fixes/existing-assets-report
# Conflicts:
#	resources/views/notifications/markdown/report-expiring-assets.blade.php
2025-09-02 15:07:23 -07:00
Marcus Moore
65b66beb07 Make icon more prominent 2025-09-02 14:55:46 -07:00
Marcus Moore
c83504b4e7 Use display_name in place of presenter 2025-09-02 12:57:40 -07:00
Godfrey M
cd2e7ee31d fix google and slack notifications 2025-09-02 10:53:42 -07:00
Godfrey M
c3a0a0415a fix MS Teams Notifications 2025-09-02 10:48:02 -07:00
snipe
709f4672b7 Merge pull request #17771 from grokability/#10107-remember-checkout-to-type
Fixed #10107 - remember checkout to type
2025-09-02 13:46:13 +01:00
snipe
e6c030b050 Merge pull request #17781 from grokability/#17780-add-withtrashed-to-files
Fixed #17780 - Added `withTrashed()` to allow viewing files on deleted objects
2025-09-02 13:45:18 +01:00
snipe
7bd3a791a1 Added withTrashed() to allow viewing files on deleted objects
Signed-off-by: snipe <snipe@snipe.net>
2025-09-02 13:39:35 +01:00
snipe
b9cfc03b4f display name fix
Signed-off-by: snipe <snipe@snipe.net>
2025-09-02 11:30:34 +01:00
snipe
131327a64d Fixed “undefined” error on status labels in BS tables
Signed-off-by: snipe <snipe@snipe.net>
2025-09-01 20:32:42 +01:00
snipe
77d002a158 Use null for role as well
Signed-off-by: snipe <snipe@snipe.net>
2025-09-01 16:43:05 +01:00
snipe
94699893ac Updated fieldname in user API request
Signed-off-by: snipe <snipe@snipe.net>
2025-09-01 16:17:39 +01:00
snipe
9f81989bdd Return null instead of blank for display_name in API
Signed-off-by: snipe <snipe@snipe.net>
2025-09-01 16:06:28 +01:00
snipe
15abe36c53 More tweaks to display
Signed-off-by: snipe <snipe@snipe.net>
2025-09-01 13:58:02 +01:00
snipe
3094e007ee Set session to remember checkout type
Signed-off-by: snipe <snipe@snipe.net>
2025-09-01 13:28:07 +01:00
snipe
eb259aee22 Set asset selector to true for components since it will always be required
Signed-off-by: snipe <snipe@snipe.net>
2025-09-01 13:18:58 +01:00
snipe
c05c8defb9 Merge pull request #17769 from grokability/#9978-add-pivot-to-accessories-api
Fixes #9978 - Added payload to accessories API
2025-09-01 12:28:08 +01:00
snipe
bf5668a42e Added payload to accessories API
Signed-off-by: snipe <snipe@snipe.net>
2025-09-01 12:23:39 +01:00
snipe
ec310bc8fb Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2025-09-01 11:56:01 +01:00
snipe
db477421b2 Bumped to 8.3.1
Signed-off-by: snipe <snipe@snipe.net>
2025-09-01 11:54:53 +01:00
snipe
30a9496cf5 Merge pull request #17748 from Godmartinz/parent-location-in-asset-view
Adds #10969 Parent location to Asset Checked out to info
2025-09-01 11:49:42 +01:00
snipe
6cefa0d0b3 Merge pull request #17745 from Godmartinz/dropdown-link-color-fix
Fixes #17488 (Part 2) Nav dropdown link color and skin names
2025-09-01 11:48:29 +01:00
snipe
9284984265 Merge pull request #17768 from Speedyduck300000/develop
Fixed #17742: don't delete random actionlog when trying to delete a file
2025-09-01 11:40:06 +01:00
Speedyduck300000
53b96168a9 fixed uploadfilescontroller to use the file_id to delete the correct
entry.
2025-09-01 07:34:18 +02:00
Godfrey M
eadce51f10 fixes check in check out translations for assets in notiications 2025-08-29 11:12:05 -07:00
snipe
b3c583b6dc Few more ->display_name
Signed-off-by: snipe <snipe@snipe.net>
2025-08-29 10:17:16 +01:00
snipe
28abeab31d Fixed a few more display_name instances
Signed-off-by: snipe <snipe@snipe.net>
2025-08-29 10:06:58 +01:00
snipe
12a649ec4b Merge pull request #17751 from marcusmoore/fixes/name-in-expiring-assets
Fixed user display name in expiring asset notification
2025-08-29 01:11:05 +01:00
Marcus Moore
35b79e4d14 Remove old comments 2025-08-28 16:56:40 -07:00
Marcus Moore
751dad7f2e Inline days 2025-08-28 16:56:12 -07:00
Marcus Moore
b08d86220a First pass at moving to table structure 2025-08-28 16:53:13 -07:00
Marcus Moore
3a27ecc475 Use display_name in place of name() 2025-08-28 16:22:24 -07:00
Godfrey M
da6fab5d43 adds parent location to checked out to location 2025-08-28 13:37:40 -07:00
snipe
ca95b29cd6 Add telescope tables to the excepted tables
Signed-off-by: snipe <snipe@snipe.net>
2025-08-28 19:52:56 +01:00
Godfrey M
c5c68e9dd5 fix dropdown link color and skin names 2025-08-28 11:49:37 -07:00
snipe
44fbde26fa Merge pull request #17743 from grokability/normalize-trait-locations
Moved model traits into proper directory
2025-08-28 18:52:43 +01:00
snipe
6e2bcd6aa9 Merge pull request #17680 from grokability/added-telescope
Added laravel telescope for dev environment
2025-08-28 18:52:18 +01:00
snipe
9c0202e5ce Bumped to 8.3.0
Signed-off-by: snipe <snipe@snipe.net>
2025-08-28 18:33:46 +01:00
snipe
39ef353073 Bumped version
Signed-off-by: snipe <snipe@snipe.net>
2025-08-28 18:32:07 +01:00
snipe
7b5d90dd81 Moved model traits into proper directory
Signed-off-by: snipe <snipe@snipe.net>
2025-08-28 18:23:26 +01:00
snipe
d1129081df Asset nothing is sent if send_welcome is not checked/passed
Signed-off-by: snipe <snipe@snipe.net>
2025-08-28 18:05:40 +01:00
snipe
315a812df5 Fixed typos
Signed-off-by: snipe <snipe@snipe.net>
2025-08-28 16:41:56 +01:00
snipe
cfc979acf0 Merge pull request #17432 from oolivero45/patch-1
Fixed #17431: EULA not displaying on asset acceptance page
2025-08-28 16:09:36 +01:00
snipe
d7407d70a3 Merge pull request #17741 from grokability/improved-user-create-tests
Improved user create tests
2025-08-28 13:32:46 +01:00
snipe
8ccd2e97a8 Improved user create tests
Signed-off-by: snipe <snipe@snipe.net>
2025-08-28 13:27:08 +01:00
snipe
988204619f Merge pull request #17740 from grokability/renamed-user-test
Renamed the test for consistency
2025-08-28 13:05:05 +01:00
snipe
cad6cc3007 Renamed the test for consistency
Signed-off-by: snipe <snipe@snipe.net>
2025-08-28 13:02:01 +01:00
snipe
b303875f1d Merge pull request #17734 from grokability/#17726-add-welcome-email-to-new-user-form
Fixed #17726: add welcome email to new user form
2025-08-28 07:29:56 +01:00
snipe
d5cc61f378 Added send to API call for creating users
Signed-off-by: snipe <snipe@snipe.net>
2025-08-28 07:28:51 +01:00
snipe
0d7ec43262 Fixed typo
Signed-off-by: snipe <snipe@snipe.net>
2025-08-28 06:19:41 +01:00
snipe
d3747f4daa Added welcome email to controller
Signed-off-by: snipe <snipe@snipe.net>
2025-08-28 06:12:01 +01:00
snipe
af695e7dc8 Added help to user importer
Signed-off-by: snipe <snipe@snipe.net>
2025-08-28 06:11:52 +01:00
snipe
1edbfd87df Added welcome email checkbox to user create form
Signed-off-by: snipe <snipe@snipe.net>
2025-08-28 06:11:40 +01:00
snipe
454be01a6c Updated translations
Signed-off-by: snipe <snipe@snipe.net>
2025-08-28 06:11:23 +01:00
snipe
745fc515f1 Merge pull request #17713 from Godmartinz/fix-localization-for-email-notifications
Adds #5554 locale for acceptance notifications and checkin/out emails
2025-08-28 05:29:28 +01:00
snipe
715b9c1182 Merge pull request #17730 from Godmartinz/update-asset-accepance-with-category
Adds #9000 Item type to Account Asset Acceptance index
2025-08-28 05:22:54 +01:00
Godfrey M
95be847d87 renamed attribute 2025-08-27 14:10:51 -07:00
Godfrey M
c1a6546eba change column header 2025-08-27 14:09:13 -07:00
Godfrey M
648c25a0a7 adds item type to Accept asset index 2025-08-27 14:06:10 -07:00
Godfrey M
f2ec7f2975 fix tests 2025-08-27 13:22:35 -07:00
Godfrey M
f518af6d61 fix class name 2025-08-27 13:09:05 -07:00
snipe
b11c6a5c06 Updated depreciation translation with more information.
Signed-off-by: snipe <snipe@snipe.net>
2025-08-27 16:35:49 +01:00
snipe
5822e4e692 Merge pull request #17729 from grokability/exit-early-if-ldap-troubleshooter-cannot-decrypt-ldap-pw
Put LDAP troubleshooter's decrypt in a try/catch to avoid crashing if it cannot decrypt the password
2025-08-27 15:47:22 +01:00
snipe
e4f06b0ca8 One last time
Signed-off-by: snipe <snipe@snipe.net>
2025-08-27 15:43:48 +01:00
snipe
2f093c0e82 Added early exist on step 4 as well
Signed-off-by: snipe <snipe@snipe.net>
2025-08-27 15:41:39 +01:00
snipe
5d9dc0e74d Put decrypt in a try/catch
Signed-off-by: snipe <snipe@snipe.net>
2025-08-27 15:33:26 +01:00
snipe
adc3a34929 Fixed copy for encrypted custom fields
Signed-off-by: snipe <snipe@snipe.net>
2025-08-27 14:38:36 +01:00
snipe
cb2ffe6b3f Updated translations
Signed-off-by: snipe <snipe@snipe.net>
2025-08-27 14:02:39 +01:00
snipe
b3e3d01672 Fixed LDAP icon spacing
Signed-off-by: snipe <snipe@snipe.net>
2025-08-27 13:32:02 +01:00
snipe
4a6520fc78 Fixed address field
Signed-off-by: snipe <snipe@snipe.net>
2025-08-27 13:30:07 +01:00
snipe
75ab6c9b13 Merge pull request #17723 from uberbrady/improve_ldap_certificate_ignoring
Improve ldap certificate ignoring
2025-08-27 13:29:33 +01:00
snipe
2f77fcb526 Merge pull request #17724 from Godmartinz/checkout2location_email_fix
Fixes #17642 Checkouts to location email for Assets and Accessories
2025-08-27 13:02:57 +01:00
Brady Wetherington
60604c3481 With the new SSL stuff, we are calling ldap_set_option() one more time now 2025-08-27 12:25:39 +01:00
Godfrey M
671c113cd2 add coma to translation" 2025-08-26 16:07:04 -07:00
Godfrey M
8a74d21ede fixes checkout emails to location for assets and accessories" 2025-08-26 16:00:26 -07:00
Godfrey M
75995b2109 fix checkout to location email 2025-08-26 15:34:38 -07:00
Marcus Moore
4298aad008 Merge branch 'develop' into 17369-accessory-checkout-qty-scaffold
# Conflicts:
#	app/Http/Controllers/Account/AcceptanceController.php
#	resources/views/notifications/markdown/asset-acceptance.blade.php
2025-08-26 11:39:52 -07:00
Marcus Moore
823c67400d Fix indent 2025-08-26 11:34:10 -07:00
Marcus Moore
3160d1064d Remove unused import 2025-08-26 11:32:38 -07:00
snipe
d1eefc3fea Merge pull request #17692 from grokability/#17387-make-saml-key-size-an-env
Fixed #17386 - Added SAML key size to env - possible alternative to #17387
2025-08-26 16:28:27 +01:00
Brady Wetherington
16795382fc Many cleanups to default-mode of LDAP troubleshooter 2025-08-26 15:53:18 +01:00
snipe
eb17974adc Merge pull request #17722 from grokability/#17704-retain-linebreaks
Fixed #17704 -  retain linebreaks on custom field clipboard copy
2025-08-26 15:44:38 +01:00
snipe
22852c27f8 Use generic length for asterisks
Signed-off-by: snipe <snipe@snipe.net>
2025-08-26 15:38:56 +01:00
snipe
f4a94d975d Fixes #17704 - retain linebreaks in clipboard for multi-line custom field copying
Signed-off-by: snipe <snipe@snipe.net>
2025-08-26 15:33:19 +01:00
snipe
7a36bbbd1e Merge pull request #17721 from grokability/small-ldap-preview-display-tweaks
Improved LDAP field sync preview
2025-08-26 15:26:09 +01:00
snipe
2b401b965b Fixed casing
Signed-off-by: snipe <snipe@snipe.net>
2025-08-26 15:22:00 +01:00
snipe
314bc5b44f Added manager
Signed-off-by: snipe <snipe@snipe.net>
2025-08-26 15:14:29 +01:00
snipe
76374f0d5a Updated text
Signed-off-by: snipe <snipe@snipe.net>
2025-08-26 15:14:22 +01:00
snipe
264efb015e Fixed jobtitle field mapping
Signed-off-by: snipe <snipe@snipe.net>
2025-08-26 15:05:05 +01:00
Brady Wetherington
e74460aefc Merge branch 'develop' into improve_ldap_certifcate_ignoring 2025-08-26 15:01:11 +01:00
Brady Wetherington
55a5a12b30 Formalize the 'double-barrel' method of setting TLS cert ignores 2025-08-26 15:00:33 +01:00
snipe
58944a38eb Make screen and table wider
Signed-off-by: snipe <snipe@snipe.net>
2025-08-26 14:59:11 +01:00
snipe
469e3bd475 Nicer ldap preview layout, show all mapped fields
Signed-off-by: snipe <snipe@snipe.net>
2025-08-26 14:51:34 +01:00
snipe
17650c5735 Changed field title
Signed-off-by: snipe <snipe@snipe.net>
2025-08-26 14:03:11 +01:00
Brady Wetherington
15e64155b5 Add version checking to LDAP troubleshooter, clean up ldap model 2025-08-26 13:57:25 +01:00
snipe
39955ac760 Add @akaspeh1 as a contributor 2025-08-26 12:42:20 +01:00
snipe
855a176ca9 Add @nickwest as a contributor 2025-08-26 12:42:15 +01:00
snipe
47b2b30455 Merge pull request #17710 from akaspeh1/develop
Adds support for label sheets Avery L4736 & L6009
2025-08-26 12:42:02 +01:00
snipe
b702e3e2de Merge pull request #17492 from ischooluw/17448-feature-notes-api-endpoints
Fixes #17448: feat(api) - API endpoint for Adding Ad-Hoc Notes to Assets
2025-08-26 12:40:52 +01:00
snipe
a6b74d56c6 Merge pull request #17709 from grokability/add-display-name-to-users-fixed
Added display name to users for LDAP/SCIM, added new sync fields (replaced #17650)
2025-08-26 12:39:25 +01:00
snipe
a4222bcaef Merge pull request #17711 from grokability/dependabot/github_actions/develop/actions/checkout-5
Bump actions/checkout from 4 to 5
2025-08-26 12:10:24 +01:00
snipe
ecf24511cd Fixed tests for real this time tho
Signed-off-by: snipe <snipe@snipe.net>
2025-08-26 12:09:55 +01:00
snipe
abb097a391 Merge pull request #17714 from Godmartinz/Audit_null_fix
Added null checks to MS Teams Audit notification
2025-08-26 10:44:51 +01:00
Godfrey M
dd742a2e4a add a check for audit notification variables in MS Teams and a translation 2025-08-25 15:10:41 -07:00
Godfrey M
128bdf500a sends an email for to locale and cc locale 2025-08-25 12:02:23 -07:00
dependabot[bot]
73ac00bc51 Bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-25 16:25:39 +00:00
snipe
3524e23e38 Fixed tests
Signed-off-by: snipe <snipe@snipe.net>
2025-08-25 17:17:45 +01:00
Jakub Aqaba Štarman
be0f3910bb Fixed: Old computation 2025-08-25 16:57:32 +02:00
snipe
07dbc6842c Are you KIDDING ME, Github??
This reverts commit c8e79aa5ca, reversing
changes made to e60f2b2332.

Signed-off-by: snipe <snipe@snipe.net>
2025-08-25 15:56:28 +01:00
Jakub Aqaba Štarman
5a16b59462 Adds support for label sheets Avery L4736 & L6009 2025-08-25 16:47:52 +02:00
Brady Wetherington
13cd7071b8 WIP improving some LDAP stuff 2025-08-25 15:41:01 +01:00
snipe
40108b196c Trying to fix import tests :(
Signed-off-by: snipe <snipe@snipe.net>
2025-08-25 15:28:43 +01:00
snipe
c8e79aa5ca Merge branch 'develop' into add-display-name-to-users-fixed 2025-08-25 15:28:20 +01:00
snipe
e60f2b2332 Tightened up accessor code for better inheritence
Signed-off-by: snipe <snipe@snipe.net>
2025-08-25 15:00:10 +01:00
snipe
b6d397bcca Updated ->present()->fullName() to ->display_name
Signed-off-by: snipe <snipe@snipe.net>
2025-08-25 14:57:34 +01:00
Marcus Moore
918426a2fa Add qty to accept assets table 2025-08-21 15:49:36 -07:00
Marcus Moore
c076b37c9b Add qty to accessory eula pdf 2025-08-21 15:05:24 -07:00
Marcus Moore
7c58bfa282 Add qty to AcceptanceAssetDeclinedNotification 2025-08-21 14:56:24 -07:00
Marcus Moore
0caaba156d Add qty to AcceptanceAssetAcceptedNotification 2025-08-21 14:54:43 -07:00
Marcus Moore
c22575812d Add qty to AcceptanceAssetAcceptedToUserNotification 2025-08-21 14:53:00 -07:00
Marcus Moore
0ede4da816 Remove CleanDeclinedAccessoryCheckouts command 2025-08-21 14:34:31 -07:00
Marcus Moore
98e23ff92e Remove legacy testing from test 2025-08-21 14:34:16 -07:00
snipe
6503f9c667 Revert "Merge pull request #17650 from grokability/add-displayName-to-users"
This reverts commit 4770e469b4, reversing
changes made to 29a18c7c8b.

Signed-off-by: snipe <snipe@snipe.net>
2025-08-21 20:23:47 +01:00
snipe
4770e469b4 Merge pull request #17650 from grokability/add-displayName-to-users
Add display name to users for LDAP/SCIM, added new sync fields
2025-08-21 18:22:34 +01:00
snipe
29a18c7c8b Merge pull request #17696 from uberbrady/add_created_at_index_to_models
Fixed [FD-49550] - added a 'created_at' index to the models table
2025-08-21 14:54:20 +01:00
Brady Wetherington
6db0003e3f Adds a 'created_at' index to the models table 2025-08-21 13:44:14 +01:00
snipe
c538c460fa Merge pull request #17695 from grokability/#17482-better-localization-indates-on-asset-view
Use nicer local for purchase date
2025-08-21 13:13:26 +01:00
snipe
822339fe42 Moved warning
Signed-off-by: snipe <snipe@snipe.net>
2025-08-21 13:13:11 +01:00
snipe
b84d9282ca Use normal locale for warranty
Signed-off-by: snipe <snipe@snipe.net>
2025-08-21 13:05:01 +01:00
snipe
952b6f33bb Add @strobelm as a contributor 2025-08-21 11:51:37 +01:00
snipe
c57c4b8ff2 Merge pull request #17691 from qay21/fix-components-url
Fix components presenting wrong URLs
2025-08-21 11:37:27 +01:00
snipe
39e6223ff2 POssible alternative to #17386 - adding SAML key size to env
Signed-off-by: snipe <snipe@snipe.net>
2025-08-21 11:27:50 +01:00
qay
d8dd274c08 Fix components presenting wrong URLs 2025-08-21 12:26:13 +02:00
snipe
15f97b6cb9 Merge pull request #17591 from Godmartinz/add-serial-to-expiring-asset-report
Adds #17440 serial number column to Expiring Assets Report
2025-08-21 11:14:45 +01:00
snipe
fc091c1174 Added comments
Signed-off-by: snipe <snipe@snipe.net>
2025-08-21 09:29:12 +01:00
snipe
c07ef4d87f A few small tweaks
Signed-off-by: snipe <snipe@snipe.net>
2025-08-21 09:25:42 +01:00
Marcus Moore
c7bdad649a Build out command 2025-08-20 16:06:11 -07:00
Marcus Moore
18c2508d2f Scaffold command for cleaning accessory_checkout 2025-08-20 13:49:19 -07:00
Marcus Moore
4dcfd8b353 Improve method name 2025-08-20 13:19:00 -07:00
Marcus Moore
726116574d Improve readability? 2025-08-20 12:40:03 -07:00
Marcus Moore
27f02014ca Add failing test 2025-08-20 12:26:55 -07:00
Marcus Moore
f80f1acaa7 Improve variable name 2025-08-20 12:15:58 -07:00
Marcus Moore
39d5ffeceb Implement fix 2025-08-20 12:05:58 -07:00
Marcus Moore
48ba7eed3e Remove legacy checks from test 2025-08-20 11:45:36 -07:00
snipe
11eee833bb Fixed #17667 - Switch to hyphens for windows
Signed-off-by: snipe <snipe@snipe.net>
2025-08-20 15:56:10 +01:00
snipe
35b358d336 Check for $user to handle tests
Signed-off-by: snipe <snipe@snipe.net>
2025-08-20 14:47:58 +01:00
snipe
ae109be631 Small tweaks
Signed-off-by: snipe <snipe@snipe.net>
2025-08-20 14:43:52 +01:00
snipe
3f7ed73395 Added laravel telescope for dev environment
Signed-off-by: snipe <snipe@snipe.net>
2025-08-20 14:26:28 +01:00
snipe
fec9d716ee Merge pull request #17679 from grokability/#17674-add-ods-and-odt
Fixed #17674: added .ods, .odp, and .odt as acceptable upload types
2025-08-20 14:17:08 +01:00
snipe
da5b1afd19 Removed logging
Signed-off-by: snipe <snipe@snipe.net>
2025-08-20 14:11:42 +01:00
snipe
618106c103 Fixed #17674 - added odp, ods, odt to accepted files
Signed-off-by: snipe <snipe@snipe.net>
2025-08-20 14:11:20 +01:00
snipe
312be98132 Add @FlorestanII as a contributor 2025-08-20 12:43:43 +01:00
snipe
e0bb77a6d6 Merge pull request #17664 from FlorestanII/feature/support-for-dymo-11354-labels
Support for Dymo 11354 Labels.
2025-08-20 12:43:29 +01:00
snipe
855922c21a Account for null in tetss (vs 0)
Signed-off-by: snipe <snipe@snipe.net>
2025-08-20 11:32:16 +01:00
snipe
bc645d2621 Use email formatter in licensed_to_email display
Signed-off-by: snipe <snipe@snipe.net>
2025-08-20 11:24:16 +01:00
snipe
9c06ff3899 Check for numeric
Signed-off-by: snipe <snipe@snipe.net>
2025-08-20 11:00:18 +01:00
snipe
2a37aa3b49 Fixed tooltip
Signed-off-by: snipe <snipe@snipe.net>
2025-08-20 10:34:05 +01:00
snipe
bf591320af Fixed #17665 - delete custom report modal
Signed-off-by: snipe <snipe@snipe.net>
2025-08-20 09:58:30 +01:00
snipe
56e687bed2 Retuen the display name in the API call
Signed-off-by: snipe <snipe@snipe.net>
2025-08-20 09:33:00 +01:00
Marcus Moore
9caa240fdb Revert "Remove total qty of accessory checkouts"
This reverts commit 3ffb73a516.
2025-08-19 17:17:46 -07:00
Marcus Moore
3ffb73a516 Remove total qty of accessory checkouts 2025-08-19 17:04:13 -07:00
Marcus Moore
cc1132be87 Remove flakiness 2025-08-19 16:50:36 -07:00
Marcus Moore
1c31f126ef Clear some flakiness 2025-08-19 16:46:41 -07:00
Marcus Moore
d8eaf2676f Add a couple of notes 2025-08-19 15:54:46 -07:00
snipe
07b25fe376 Add display name to summary
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 20:52:18 +01:00
snipe
c2ecd20b7d Updated field text
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 20:47:48 +01:00
snipe
1b42abcc98 Fixed mapping
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 19:54:32 +01:00
snipe
9efb49d510 Merge pull request #17663 from Godmartinz/sub-out-translation
Fixes #17653 changes translation to administrator
2025-08-19 19:43:47 +01:00
snipe
2d6270c697 Updated validation, switch to string() as db field type
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 19:19:29 +01:00
snipe
0823c23a6e Fixed placeholder text
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 18:51:56 +01:00
snipe
b3f0ce4b2a Use fieldsets for LDAP settings
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 18:38:47 +01:00
snipe
8b83584b67 Added mapping fields to LDAP
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 18:31:58 +01:00
Godfrey M
9eb686fe08 changes translation to administrator 2025-08-19 10:23:15 -07:00
Johannes Pollitt
765051ce88 Added LabelWriter for 11354 format labels.
Printable for example with the Dymo LabelWriter 450.
2025-08-19 19:21:48 +02:00
Godfrey M
ed402e0122 adds serial underneath name 2025-08-19 10:10:20 -07:00
snipe
1488271a83 Added #8522 - depreciation info on Asset API
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 14:48:48 +01:00
snipe
48bbf8d005 Merge pull request #17655 from uberbrady/add_category_indexes
Add new indexes to category_id and deleted_at
2025-08-19 14:26:38 +01:00
Brady Wetherington
e97b969d66 Add new indexes to category_id and deleted_at 2025-08-19 14:20:36 +01:00
snipe
cdd12df81a Fixed #17627 - jquery UI fix for draggable/sortable
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 14:12:06 +01:00
snipe
050a3afc74 Fixed #17649 - nicer layout on new location modal
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 13:56:21 +01:00
snipe
270401c693 Added display name to user create modal
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 13:12:57 +01:00
snipe
551822ce7d Merge pull request #17648 from grokability/possible-fix-for-#17641-map-mobile-via-scim
Fixed #17641: map mobile number via SCIM
2025-08-19 13:09:07 +01:00
snipe
4b8c371097 Updated true to false
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 12:59:28 +01:00
snipe
90fbf6da46 Modify the presenter to see if they have a display_name set
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 12:56:44 +01:00
snipe
0c3103e3d2 Modify the getter
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 12:56:30 +01:00
snipe
6a8e1566fe Added display_name to a few more places
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 12:56:11 +01:00
snipe
ced30082a6 Added display_name as user field
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 12:10:28 +01:00
snipe
f6c64abc1a Fixed #17641 - map mobile number via SCIM
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 11:41:02 +01:00
snipe
7f9939a896 Merge pull request #17638 from Godmartinz/asset-tag-added-to-subject-line
Adds asset tag to subject line of check in check out
2025-08-19 09:36:25 +01:00
Godfrey M
1c99f2dfdd readd doesntorequireacceptance() to test 2025-08-18 10:52:35 -07:00
Godfrey M
1974fccac3 add tag to other notification test 2025-08-18 10:48:39 -07:00
Godfrey M
911552035e fix other test 2025-08-18 10:39:10 -07:00
Godfrey M
ff25d275ee fix tests 2025-08-18 10:31:03 -07:00
Godfrey M
1fcf5e03e7 adds asset tag to subject line of checkin/out 2025-08-18 10:16:47 -07:00
snipe
9b4101855f Undo double-float
Signed-off-by: snipe <snipe@snipe.net>
2025-08-18 15:24:15 +01:00
snipe
9253d894d3 Removed XSS-Protection header
@see https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-XSS-Protection#security_considerations

Signed-off-by: snipe <snipe@snipe.net>
2025-08-18 13:30:53 +01:00
snipe
ebd79f22c7 Merge pull request #17636 from grokability/#17627-custom-fields-sorting
Fixed #17627: custom fields not sorting correctly
2025-08-18 12:47:03 +01:00
snipe
c1b139fb9a Fixed #17627: custom fields not sorting correctly
Signed-off-by: snipe <snipe@snipe.net>
2025-08-18 12:31:03 +01:00
snipe
a88bcea8ca Merge pull request #17635 from grokability/#17367-fixed-padlock-icon
Fixed #17367: Small adjustment to css-padlock
2025-08-18 11:25:55 +01:00
snipe
21566560a7 Fixed #17367: Small adjustment to css-padlock
Signed-off-by: snipe <snipe@snipe.net>
2025-08-18 11:24:05 +01:00
snipe
e3ca43bf40 Remove use of formatCurrencyOutput for input display
Signed-off-by: snipe <snipe@snipe.net>
2025-08-18 11:00:19 +01:00
snipe
61abb8d5cb Fixed hardware.bulkedit redirect
Signed-off-by: snipe <snipe@snipe.net>
2025-08-18 09:45:02 +01:00
snipe
ecad656551 Merge pull request #17626 from grokability/#17606-s3-url-for-models-on-requestable-view
Fixed #17606 - use `getImageUrl()` to determine if local or S3
2025-08-17 14:54:13 +01:00
snipe
615e6d6e4f Fixes #17606 - use getImageUrl() to determine if local or S3
Signed-off-by: snipe <snipe@snipe.net>
2025-08-17 14:51:52 +01:00
snipe
6dceefb96e Merge pull request #17625 from grokability/#17620-delete-method-custom-fields
Fixed #17620 - delete method custom fields causing method not allowed error
2025-08-17 14:11:17 +01:00
snipe
69eff394fd Removed use statement
Signed-off-by: snipe <snipe@snipe.net>
2025-08-17 14:06:56 +01:00
snipe
a9da3aca81 Combine fields and fieldset exception
Signed-off-by: snipe <snipe@snipe.net>
2025-08-17 14:06:49 +01:00
snipe
91f3556375 Added delete test
Signed-off-by: snipe <snipe@snipe.net>
2025-08-17 13:33:53 +01:00
snipe
aab7c3a840 Updated custom fields and fieldset pages to use standard delete modal
Signed-off-by: snipe <snipe@snipe.net>
2025-08-17 13:33:47 +01:00
snipe
9c823119e3 Added new factories for user custom field permissions
Signed-off-by: snipe <snipe@snipe.net>
2025-08-17 13:31:14 +01:00
snipe
f5128833f6 Updated comments
Signed-off-by: snipe <snipe@snipe.net>
2025-08-17 13:30:52 +01:00
snipe
2bc144354a Use translations and more standard error bag
Signed-off-by: snipe <snipe@snipe.net>
2025-08-17 13:30:43 +01:00
snipe
e6fec6ec34 Trim model name for display
Signed-off-by: snipe <snipe@snipe.net>
2025-08-17 13:30:28 +01:00
snipe
53389875bf Merge pull request #17611 from grokability/#9965-fallback-to-category-image-for-consumables
Fixed #9965 - fallback to category images (f there are any) when no c…
2025-08-15 15:07:13 +02:00
snipe
3b243b38c8 Fixed #9965 - fallback to category images (f there are any) when no consumable image is present
Signed-off-by: snipe <snipe@snipe.net>
2025-08-15 15:03:09 +02:00
snipe
3d9580808b Merge pull request #17524 from Godmartinz/add-category-and-model-to-checkout-emial
Adds #17507 Category and Model No. to accessory checkout markdown
2025-08-15 14:39:58 +02:00
snipe
2141ee71d4 Merge pull request #17544 from marcusmoore/fixes/custom-field-filter
Fixed invalid custom fields being used for filtering
2025-08-15 14:39:09 +02:00
snipe
01dd07083e Merge pull request #17584 from spencerrlongg/bug/17312-custom-field-checkbox-will-not-clear-if-no-checkboxes-should-be-selected
Fixed #17312 - Fix Nulling Checkboxes
2025-08-15 14:35:37 +02:00
snipe
42a28ea06b Merge pull request #17593 from Godmartinz/add-admin-to-acceptance-emails
FIXED #17380 Adds Admin name to acceptance emails
2025-08-15 14:33:02 +02:00
snipe
180cb6ba8e Merge pull request #17610 from grokability/#17600-add-checkout-date-to-accessory-list
Fixed #17600 - adds checkout date to accessories tab in user view
2025-08-15 14:31:38 +02:00
snipe
a78762e40b Fixed #17600 - adds checkout date to accessories tab in user view
Signed-off-by: snipe <snipe@snipe.net>
2025-08-15 14:29:55 +02:00
snipe
9797bb19e2 Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2025-08-15 14:23:22 +02:00
Marcus Moore
3101212c49 Continue to scaffold test 2025-08-14 17:24:36 -07:00
Marcus Moore
3f0ac103a1 Scaffold test 2025-08-14 13:29:18 -07:00
Marcus Moore
59bd6ca360 Update button text 2025-08-14 13:21:11 -07:00
Marcus Moore
22fe9a786e Display number of items being accepted 2025-08-14 12:36:46 -07:00
snipe
08a9554b3c Merge pull request #17607 from Godmartinz/color-corrections-pt9000
Fixes #17488 more info text colors
2025-08-14 20:39:26 +02:00
Godfrey M
d79bd825ee fix popover text color 2025-08-14 10:51:31 -07:00
Godfrey M
fe3d225cfa fix tests 2025-08-14 09:15:19 -07:00
Marcus Moore
d2ee8de9ac Attach qty to CheckoutAcceptance 2025-08-13 12:14:10 -07:00
Marcus Moore
03d3fb6a5f Add qty to checkout_acceptances table 2025-08-13 12:09:56 -07:00
snipe
376e0db66e Merge pull request #17601 from ubc-cpsc/bugfix/CVE-2025-55166
Fixes CVE-2025-55166
2025-08-13 20:49:41 +02:00
Joël Pittet
5fdabc1a62 Fixes CVE-2025-55166 2025-08-13 11:42:14 -07:00
Godfrey M
dfe2a75d72 adds user that checked out item to acceptance emails 2025-08-12 15:34:46 -07:00
Godfrey M
ba85af11aa adds serial to expiring assets report email 2025-08-12 14:59:20 -07:00
Godfrey M
db58b80d27 Merge branch 'develop' into add-category-and-model-to-checkout-emial
# Conflicts:
#	app/Mail/CheckoutLicenseMail.php
2025-08-12 14:20:08 -07:00
Godfrey M
5cb8aae383 add ternaries 2025-08-12 14:16:46 -07:00
spencerrlongg
817530429b added condition to make sure the request has checkbox 2025-08-12 14:52:52 -05:00
Marcus Moore
4a7b7183d2 Add custom_fields. prefix so custom fields can be filtered against 2025-08-11 14:58:41 -07:00
snipe
94bd39cf23 Merge pull request #17570 from grokability/#10038-add-active-flag-filter
Added sidenav to filter on activated vs inactive users
2025-08-11 20:45:22 +01:00
snipe
4038a22093 Added sidenav to filter on activated vs inactive users
Signed-off-by: snipe <snipe@snipe.net>
2025-08-11 20:41:55 +01:00
snipe
682baec0c9 Merge pull request #17569 from grokability/#10284-add-mobile-number
Fixed #10284: Added mobile phone to users
2025-08-11 18:49:49 +01:00
snipe
ff91be491d Added mobile to tests
Signed-off-by: snipe <snipe@snipe.net>
2025-08-11 18:43:37 +01:00
snipe
ef35a0f2f1 Fixed #10284: Added mobile phone to users
Signed-off-by: snipe <snipe@snipe.net>
2025-08-11 18:38:22 +01:00
snipe
f12a3bb08b Fixed #10306 - cast purchase cost to a float
Signed-off-by: snipe <snipe@snipe.net>
2025-08-11 18:12:37 +01:00
snipe
c8a5065ffa Merge pull request #17567 from grokability/#11754-nicer-menu-alignment
Fixed #11754: nicer menu alignment for dropdowns
2025-08-11 14:57:59 +01:00
snipe
23da5573f3 Fixed #11754 - nicer top menu dropdown alignment
Signed-off-by: snipe <snipe@snipe.net>
2025-08-11 14:56:43 +01:00
snipe
b08f985776 Merge pull request #17566 from grokability/partial-fix-for-#17565-standard-layout
Show all icons on location table, even if no results
2025-08-11 14:17:59 +01:00
snipe
9b968baaa7 Show all icons, even if no results
Signed-off-by: snipe <snipe@snipe.net>
2025-08-11 14:14:15 +01:00
snipe
07edbe6f1c Add @mckaygerhard as a contributor 2025-08-11 13:08:54 +01:00
snipe
1f55a8b6e3 Added icon and tooltip
Signed-off-by: snipe <snipe@snipe.net>
2025-08-11 13:06:37 +01:00
snipe
f6b9e11810 Merge pull request #17538 from mckaygerhard/mail-log-improvements
Mail log for #17491 and some improvements on log errors
2025-08-11 13:05:56 +01:00
snipe
c18a3e4266 Fixed #17562 - bootstrap table formater undefined
Signed-off-by: snipe <snipe@snipe.net>
2025-08-11 11:18:20 +01:00
snipe
5840ef1c6f Fixed #17560
Signed-off-by: snipe <snipe@snipe.net>
2025-08-11 06:26:15 +01:00
snipe
7974baddf5 Merge pull request #17551 from grokability/move-file-uploads-paths-to-base-controller
Move the object type mapping and such to the base controller to de-dupe
2025-08-11 05:44:39 +01:00
snipe
4bf569758f Cleans up a few rmore outes
Signed-off-by: snipe <snipe@snipe.net>
2025-08-11 05:05:00 +01:00
snipe
f56fd9bb0b Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 21:04:33 +01:00
snipe
357ee5fc45 Copy over the old dirs just in case
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 21:02:37 +01:00
snipe
c6dea085b2 Missed a few
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 21:01:23 +01:00
snipe
8782c3ecec Merge pull request #17554 from grokability/#13997-add-ldap-sync-via-api
Adds #13997 - API endpoint to sync users via LDAP
2025-08-10 20:30:44 +01:00
snipe
b636cf2ef0 Merge pull request #17555 from grokability/#17490-use-numeric-for-purchase-cost
Fixed #17490: use numeric for purchase cost
2025-08-10 20:30:15 +01:00
snipe
6dee2b8601 Fixed 17490 - currency symbol breaks purchase_cost
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 19:04:52 +01:00
snipe
bcf301ac17 Adds #13997 - API endpoint to sync users via LDAP
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 18:48:01 +01:00
snipe
bf2120fb31 Use newer file path 2025-08-10 18:26:41 +01:00
snipe
de56b74f3e Merge branch 'develop' into move-file-uploads-paths-to-base-controller 2025-08-10 18:25:47 +01:00
snipe
2f146abe91 Let people upload images on the demo
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 18:20:35 +01:00
snipe
543d41b6ff Merge pull request #17553 from grokability/#17547-asset-model-images-not-loading
Fixed #17547: asset model images not loading
2025-08-10 18:15:57 +01:00
snipe
8da0dd7563 Use strtolower
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 18:11:39 +01:00
snipe
a2217d7dbc Specify the public disk for creating directories
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 18:08:15 +01:00
snipe
ea84728a3f Rename models uploads dir
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 17:58:11 +01:00
snipe
b2d10f7ccf Rename directory
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 17:56:59 +01:00
snipe
b6af25ce99 Fixed #17548 - treeview menu class on people menu
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 17:20:49 +01:00
snipe
7a9d2454d4 Move the object type mapping and such to the base controller to de-dupe
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 16:30:32 +01:00
snipe
a9254cff02 Merge pull request #17550 from grokability/addded-observer-for-maintenances
Added basic logging for maintenances
2025-08-10 16:00:49 +01:00
snipe
d14b34141c Updated comment
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 15:53:53 +01:00
snipe
14bc2cc1ba Added basic logging for maintenances
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 15:51:48 +01:00
snipe
a91b54b97a Added buttons to maintenances table
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 14:55:34 +01:00
snipe
ead655e1db Fixed translation
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 14:52:40 +01:00
snipe
c5f28748f7 Merge pull request #17549 from grokability/rename_title_to_name_for_maintenances
Renamed table from `asset_maintenances` to `maintenances` and `title` to `name` for maintenances
2025-08-10 14:28:51 +01:00
snipe
ee4831cb30 Removed followsRedirects so we can check the status
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 14:23:41 +01:00
snipe
deb1afd28b Few more replcamenents
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 14:14:21 +01:00
snipe
9e8eead71e Renamed routes and method names
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 13:29:48 +01:00
snipe
3f96f7cbd7 Updated file paths for uploads
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 13:24:45 +01:00
snipe
dde2e88332 Renamed variables in purge
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 13:24:32 +01:00
snipe
ff25015595 Renamed more files
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 13:24:14 +01:00
snipe
7d0c695808 Renamed language directories
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 13:23:52 +01:00
snipe
906385def9 Renamed directories
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 13:23:16 +01:00
snipe
a6c6c7eae9 Updated tests
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 13:11:50 +01:00
snipe
205725c767 Renamed model
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 12:30:50 +01:00
snipe
c207efbb35 Rename model in breadcrumbs
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 12:30:42 +01:00
snipe
c0211e59b3 Renames maintenances presenter
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 12:30:23 +01:00
snipe
dd2678cbb9 Rename maintenances path
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 12:30:09 +01:00
snipe
e2c87b664e Rename factory
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 12:28:58 +01:00
snipe
29d4b4dd53 Updated API routes
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 12:28:28 +01:00
snipe
3fba307e55 Updated routes
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 12:28:18 +01:00
snipe
7171fa36d8 Added migrations
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 12:27:59 +01:00
snipe
c570f656bf Renamed test
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 12:27:48 +01:00
snipe
a5e37519f5 Merge pull request #17539 from grokability/add-file-uploads-to-maintenances
WIP: Add file uploads to maintenances
2025-08-10 11:13:19 +01:00
snipe
0f88d6eec3 Removed error logging
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 11:09:29 +01:00
snipe
651c51bb01 Remove unused statements
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 10:41:46 +01:00
mckaygerhard
0fdbdfd5c2 Improve log error handling regarding notification sending for issue #17491
* when an error is generated when denying checkouts, there are not enough logs
to determine the problem from the email provider
* missing handling of log test mail config, there is none of logs cos there
is no log handling on test email, becouse all the results are just sent to
the http response and no log were writen.
2025-08-08 12:18:04 -04:00
snipe
31056ff858 Added new dirs to restore tool
Signed-off-by: snipe <snipe@snipe.net>
2025-08-08 12:56:07 +01:00
snipe
8d2643696b Deleted unused user file controller
Signed-off-by: snipe <snipe@snipe.net>
2025-08-08 12:55:59 +01:00
snipe
e7488d19e9 Fixed name for uploaded files controller
Signed-off-by: snipe <snipe@snipe.net>
2025-08-08 12:55:48 +01:00
snipe
2bb3b6d64c Fixed prefixes
Signed-off-by: snipe <snipe@snipe.net>
2025-08-08 12:55:24 +01:00
snipe
5744e48ae8 Added getDisplayNameAttribute() to maintenances
Signed-off-by: snipe <snipe@snipe.net>
2025-08-08 12:54:36 +01:00
snipe
82d0a21440 Added to actionlog model
Signed-off-by: snipe <snipe@snipe.net>
2025-08-08 12:54:09 +01:00
snipe
58133cffac Updated maintenance model
Signed-off-by: snipe <snipe@snipe.net>
2025-08-08 12:37:03 +01:00
snipe
bfd8c2f310 Added fles UI on maintenance page
Signed-off-by: snipe <snipe@snipe.net>
2025-08-08 12:36:51 +01:00
snipe
30d447c023 Updated urls/routes
Signed-off-by: snipe <snipe@snipe.net>
2025-08-08 12:36:35 +01:00
snipe
9a0846b8a6 Added directory
Signed-off-by: snipe <snipe@snipe.net>
2025-08-08 12:36:16 +01:00
snipe
3667fcddd7 Mark flappy API rate limiting tests as skipped :(
Signed-off-by: snipe <snipe@snipe.net>
2025-08-08 11:37:36 +01:00
snipe
906741d662 Bumped debug to warning
Signed-off-by: snipe <snipe@snipe.net>
2025-08-08 11:32:04 +01:00
snipe
12be088c4f Merge pull request #17523 from Godmartinz/fix-create-new-rediret
Fixes #17457 Previous Page redirect option
2025-08-08 09:50:40 +01:00
snipe
6737ba80cd Merge pull request #17489 from grokability/fixes/#17485-handle-alert-menu-better-if-no-alerts
Fixed #17485: nicer alert menu if no items are below qty
2025-08-08 09:50:14 +01:00
snipe
862a3d938e Merge pull request #17543 from Godmartinz/salutation-target-fix
Salutation target fix
2025-08-08 09:49:24 +01:00
snipe
09e82377a5 Merge pull request #17520 from marcusmoore/missing-user-redirect-fix
Fixed potential failure in license checkin due to redirect option
2025-08-08 09:48:43 +01:00
snipe
59470864e7 Merge pull request #17542 from akemidx/assetpolicyclassimport
AssetPolicy class import
2025-08-08 09:40:23 +01:00
Marcus Moore
c95aeb3730 Filter out unallowed columns (custom fields) 2025-08-07 17:25:20 -07:00
Godfrey M
5c55c90d68 add null checks to target 2025-08-07 15:27:50 -07:00
Godfrey M
e47972731b fixed target name for checkouts with licenses and assets 2025-08-07 15:12:23 -07:00
Godfrey M
5851cc9e41 fixed target name for checkouts with licenses and assets 2025-08-07 15:09:38 -07:00
akemidx
6f615230e9 class import 2025-08-07 17:00:28 -04:00
snipe
d91598a25e Merge pull request #17540 from marcusmoore/fixes/asset-serial-validation
Fixed 500 when sending non-string for serial property
2025-08-07 20:53:07 +01:00
snipe
9e416778d9 Merge pull request #17541 from marcusmoore/remove-dump-in-test
Removed debugging dump() in test
2025-08-07 20:52:07 +01:00
Marcus Moore
860a117567 Remove dump in test 2025-08-07 12:50:02 -07:00
Marcus Moore
b8fe3b18d4 Add "string" to serial rules for asset 2025-08-07 12:27:48 -07:00
snipe
40269a724b Fixed test
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 18:42:59 +01:00
snipe
ec828318d8 Merge pull request #17417 from marcusmoore/snipe-it-17073-asset-requests-are-not-deleted-when-asset-is-deleted
Fixed #17073 - delete old checkout requests
2025-08-07 18:32:13 +01:00
snipe
d31e7ed534 Use new route
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 18:24:02 +01:00
snipe
5c2dbe438b Added maintenances
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 18:23:57 +01:00
snipe
10857635ac Removed unused use statement
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 18:23:44 +01:00
snipe
df2545ef80 Updated routes
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 18:23:17 +01:00
snipe
f6ff729316 Added new generic files upload controller
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 18:22:57 +01:00
snipe
38678803eb Removed unused controllers
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 18:22:45 +01:00
snipe
67c931f196 Merge pull request #17080 from marcusmoore/allow-id-on-location-select
Allowed setting `id` on location-select component
2025-08-07 18:16:58 +01:00
snipe
1c23092d0e Merge pull request #17537 from grokability/add-maintenance-images-and-files
Fixed #10357: Add maintenance image upload
2025-08-07 17:02:34 +01:00
snipe
a90ff21cbf Cleaned up a few more tests
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 16:58:44 +01:00
snipe
0ce0cee81f Fixed tests
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 16:53:18 +01:00
Герхард PICCORO Lenz McKAY
f4be5ffb5d Fix workaround for #17491 log error on failed response for mail sending
* Part of bunch of fixes, this fix #17491 where admins at test install cannot see the log of errors for UI test mail button, we can just see that this is the correct form cos other parts of the code manage the exception inside the catch using log interface class
2025-08-07 11:42:17 -04:00
snipe
19958748bf Use image upload request
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 15:39:12 +01:00
snipe
d6ca8468e3 Use snake case for naming paths
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 15:39:01 +01:00
snipe
7bccb7718b Added partial and enctype="multipart/form-data for upload
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 15:38:22 +01:00
snipe
f6b63b5e44 Added image to view
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 15:38:04 +01:00
snipe
9a2c5ff195 Updated/added tests
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 15:37:57 +01:00
snipe
3597f759da Updated transformers and presenters
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 15:37:45 +01:00
snipe
3ed3b21286 Added maintenance file singleton
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 15:37:32 +01:00
snipe
b89b636474 Added migration
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 15:37:16 +01:00
snipe
2afc595452 Don’t show license key formatter if no value
Signed-off-by: snipe <snipe@snipe.net>
2025-08-06 16:47:47 +01:00
snipe
c7262f2885 Merge pull request #17532 from grokability/add-available-licenses-back-for-now
[FD-50162] Put remaining seats back on license view for now
2025-08-06 16:35:34 +01:00
snipe
8662aa2277 Put remaining seats back on license view for now
Signed-off-by: snipe <snipe@snipe.net>
2025-08-06 16:33:02 +01:00
snipe
8095e0ab72 Normalize consumables user response
Signed-off-by: snipe <snipe@snipe.net>
2025-08-06 16:25:51 +01:00
Godfrey M
ec5b9ce903 adds category and model no to accessory checkout markdown 2025-08-05 12:44:07 -07:00
Godfrey M
bd2acefecc rethought, keeping previous page as an option 2025-08-05 12:29:59 -07:00
Godfrey M
18e49e9067 only redirect to previous page if not creating 2025-08-05 12:05:22 -07:00
Marcus Moore
7abc3a7d7d Only push to session if user exists 2025-08-05 10:57:07 -07:00
Marcus Moore
ff39e8bd2c Merge branch 'develop' into snipe-it-17073-asset-requests-are-not-deleted-when-asset-is-deleted 2025-08-04 12:43:03 -07:00
Nicky West
c94a8c42f4 Changed NotesController::getList() to NotesController::index() & reordered methods for consistency 2025-07-28 16:57:46 -07:00
Nicky West
16fdb16a56 Changed over to route model binding and simplified logic & gates 2025-07-28 16:55:11 -07:00
Nicky West
822f9a6f28 Fixed deviations from code standards 2025-07-28 16:37:08 -07:00
Nicky West
b264bbf69f feat(api): Add API endpoints for managing asset history notes
- Add POST endpoint to create a history note attached to an asset
- Add GET endpoint to retrieve history notes for an asset
- Add ActionLog factory state for manual notes
- Implement controller methods with authorization checks
- Add feature tests for note creation, retrieval, and access control
- Register new API routes for these endpoints

Supports automation by enabling programmatic asset history note management.
2025-07-28 15:55:37 -07:00
snipe
2c33654395 Fixed #17485 - nicer alert menu if no items are below qty
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 17:50:26 +01:00
Oliver Cox
553ab8851a Fix #17431: EULA not displaying on asset acceptance page
Changed two instances of === to ==, as this was causing a comparison to fail and preventing EULAs from being displayed on asset acceptance pages as expected.
2025-07-20 23:00:18 +01:00
Marcus Moore
0102599708 Implement tests 2025-07-16 17:20:28 -07:00
Marcus Moore
960edd4adf Improve clarity 2025-07-16 17:11:00 -07:00
Marcus Moore
3547fa723c Delete requests when asset model is deleted 2025-07-16 17:04:14 -07:00
Marcus Moore
7a456185c6 Add explicit state for assets 2025-07-16 16:57:03 -07:00
Marcus Moore
dd79c3f2d6 Scaffold tests 2025-07-16 16:47:28 -07:00
Marcus Moore
35682d11f0 Add command to clean checkout requests 2025-07-16 14:49:45 -07:00
Marcus Moore
d04b3f0907 Enable test 2025-07-16 13:15:06 -07:00
Marcus Moore
c926358e04 Delete requests when user is deleted 2025-07-16 13:11:59 -07:00
Marcus Moore
856ba52f36 Delete requests when asset is deleted 2025-07-16 12:43:56 -07:00
Marcus Moore
a5bea31154 Scaffold tests 2025-07-16 12:38:08 -07:00
Marcus Moore
2afcc1e384 Add basic tests around asset request index 2025-07-16 12:25:37 -07:00
Godfrey M
2b8ea9a233 add required to input validation 2025-07-07 10:46:54 -07:00
Marcus Moore
69b9b0bbc0 Allow setting id within location-select 2025-06-02 15:53:25 -07:00
Marcus Moore
3c1088f030 Improve variable name 2025-06-02 15:49:16 -07:00
Godfrey M
b0067fee51 remove some N+1s, collect an array of missing serial errors 2025-05-20 12:31:34 -07:00
Godfrey M
732c3dae89 added require_serial to model factory 2025-05-20 09:53:51 -07:00
Godfrey M
d45bd67cae added corrections 2025-05-20 09:51:02 -07:00
Godfrey M
9200de5032 made require_serial column nullable 2025-05-19 09:58:37 -07:00
Godfrey M
3fbbff5a47 revert unnecessary change to laels 2025-05-14 12:57:01 -07:00
Godfrey M
c22efc2c3d add to present and transformer and api 2025-05-14 12:55:41 -07:00
Godfrey M
8c0281bf70 adds tests for requiring serial to asset model 2025-05-14 12:31:27 -07:00
Godfrey M
720a4bc4a2 add warning to update method for missing a serial 2025-05-13 12:54:28 -07:00
Godfrey M
7fd93645b3 valdiation fires for asset creation 2025-05-13 12:17:58 -07:00
Godfrey M
fcbfbca6d0 add checkbox to model edit and create 2025-05-13 11:10:46 -07:00
Godfrey M
f2bca9491c changed name of field in model fillable 2025-05-13 10:59:02 -07:00
Godfrey M
b48f309ab6 add require_serial to bulk asset model blades and lang 2025-05-13 10:58:05 -07:00
Godfrey M
0b1be3e63b add migration, model and controller update 2025-05-12 11:44:34 -07:00
Godfrey M
8c129c10af removed payload from api error message 2025-04-30 11:11:53 -07:00
Godfrey M
63ce2a14fe fix the ghosts pt2 2025-04-23 10:17:11 -07:00
Godfrey M
f435ebb110 fix the ghosts 2025-04-23 10:15:26 -07:00
Godfrey M
843f001bf6 rename test class 2025-04-23 09:33:56 -07:00
Godfrey M
0d28165c04 merged develop, fix conflicts 2025-04-21 10:54:01 -07:00
Godfrey M
ee31bfbcd4 Merge branch 'develop' into checkin_non_reassignable_license
# Conflicts:
#	app/Helpers/Helper.php
#	app/Http/Controllers/Api/LicenseSeatsController.php
#	app/Http/Transformers/LicensesTransformer.php
2025-04-21 10:49:35 -07:00
Godfrey M
1c67d6802d added testing to Api check in, renamed other test method 2025-01-27 12:18:24 -08:00
Godfrey M
5da8c86ec7 fix license query for bulk licenses checkin for assets 2025-01-22 10:55:41 -08:00
Godfrey Martinez
10a2d59ec1 Merge pull request #27 from Godmartinz/checkin_non_reassignable_license_cleanup
adds bulk check in of unreassinable licenses, cleans up methods used for counting.
2025-01-22 10:49:47 -08:00
Godfrey M
34e8360b10 moves counts to licenses, allows bulk check in of unreassignable licenses 2025-01-22 10:46:28 -08:00
Godfrey Martinez
ca259ee4c3 Merge pull request #26 from Godmartinz/checkin_non_reassignable_license_cleanup
moved methods to licenseSeat model, clean up code, removed unused namespaces etc
2025-01-21 11:47:42 -08:00
Godfrey M
2143952a1e removed unused models, castged unreassignable_seat, clean up in general 2025-01-21 11:43:47 -08:00
Godfrey M
6bab6e7151 remove unintended change 2025-01-16 12:27:01 -08:00
Godfrey M
d217c2e295 last rename 2025-01-16 12:24:32 -08:00
Godfrey M
52bf0faaa5 renamed unassignable to reassignable_seat 2025-01-16 12:19:59 -08:00
Godfrey M
3f3f2bfc61 fixed factory and test 2025-01-16 12:14:03 -08:00
Godfrey M
f050864fb4 renamed dead to unassigned, replaced 0 and 1 with true and flase 2025-01-16 12:12:14 -08:00
Godfrey M
db11fc35f4 fixed typo, fixed variable name 2025-01-16 12:00:49 -08:00
Godfrey M
f47a2b10c0 updated column name, updated Api license checkin and out 2025-01-16 11:53:15 -08:00
Godfrey M
344b4e7d60 fixes test to check if checked in licenses is unavailable 2025-01-16 09:46:03 -08:00
Godfrey M
7a23372489 adds migration for column unavailable, changes logic to utlize value 2025-01-15 15:36:12 -08:00
Godfrey M
9da15a8e58 get button color correct 2025-01-13 14:44:26 -08:00
Godfrey M
50e0e4a07b remove unrelated change 2025-01-13 14:37:03 -08:00
Godfrey M
5e1562ae4c adds count on tabs and reports and index 2025-01-13 14:31:54 -08:00
Godfrey M
8a0ed49623 allows checkin of unreassignable license seats 2025-01-13 13:35:48 -08:00
1999 changed files with 128497 additions and 13254 deletions

View File

@@ -3206,7 +3206,8 @@
"avatar_url": "https://avatars.githubusercontent.com/u/3755203?v=4",
"profile": "https://github.com/swift2512",
"contributions": [
"bug"
"bug",
"code"
]
},
{
@@ -4189,6 +4190,51 @@
"contributions": [
"code"
]
},
{
"login": "mckaygerhard",
"name": "Герхард PICCORO Lenz McKAY ",
"avatar_url": "https://avatars.githubusercontent.com/u/1571724?v=4",
"profile": "https://github-readme-stats.vercel.app/api?username=mckaygerhard",
"contributions": [
"code"
]
},
{
"login": "FlorestanII",
"name": "Johannes Pollitt",
"avatar_url": "https://avatars.githubusercontent.com/u/15015119?v=4",
"profile": "https://github.com/FlorestanII",
"contributions": [
"code"
]
},
{
"login": "strobelm",
"name": "Michael Strobel",
"avatar_url": "https://avatars.githubusercontent.com/u/14185442?v=4",
"profile": "https://strobelm.de",
"contributions": [
"code"
]
},
{
"login": "nickwest",
"name": "Nicky West",
"avatar_url": "https://avatars.githubusercontent.com/u/634790?v=4",
"profile": "http://nickwest.me",
"contributions": [
"code"
]
},
{
"login": "akaspeh1",
"name": "akaspeh1",
"avatar_url": "https://avatars.githubusercontent.com/u/1347327?v=4",
"profile": "https://github.com/akaspeh1",
"contributions": [
"code"
]
}
]
}

View File

@@ -193,11 +193,17 @@ LDAP_TIME_LIM=600
IMPORT_TIME_LIMIT=600
IMPORT_MEMORY_LIMIT=500M
REPORT_TIME_LIMIT=12000
REQUIRE_SAML=false
API_THROTTLE_PER_MINUTE=120
CSV_ESCAPE_FORMULAS=true
LIVEWIRE_URL_PREFIX=null
# --------------------------------------------
# OPTIONAL: SAML SETTINGS
# --------------------------------------------
REQUIRE_SAML=false
SAML_KEY_SIZE=2048
# --------------------------------------------
# OPTIONAL: HASHING
# --------------------------------------------

105
.github/ISSUE_TEMPLATE/Bug-Report.yml vendored Normal file
View File

@@ -0,0 +1,105 @@
name: Bug Report
description: File a bug report.
title: "[Bug]: "
projects: ["grokability/snipe-it"]
type: bug
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report! Most issues are documented in the [Snipe-IT repository's issues](https://github.com/grokability/snipe-it/issues) or in the official [Common Issues section of the Documentation](https://snipe-it.readme.io/docs/common-issues#/) and are due to the following:
- `.env` misconfiguration
- [Server Permissions](https://snipe-it.readme.io/docs/debugging-permissions#/)
- [Database Migrations](https://snipe-it.readme.io/docs/database-issues#run-migrations)
Please make sure you've checked these resources before submitting a new issue. If you find an existing issue, please add your context to it instead of opening a new issue. If your issue is more of a question, consider [opening a new discussion](https://github.com/grokability/snipe-it/discussions) or [pop by our Discord](https://discord.gg/yZFtShAcKk) instead of creating an issue.
**Please write your bug report in English.** You can use tools like [DeepL](https://www.deepl.com) or [Google Translate](https://translate.google.com/) to translate if necessary.
**If you choose to upload screenshots or videos (which we always encourage), please make sure they do not contain any sensitive information.**
- type: input
id: version
attributes:
label: Snipe-IT Version
description: What version of Snipe-IT are you seeing this issue on? You can find the version number in the footer of any page in Snipe-IT.
placeholder: ex. v8.3.1 - build 19577 (master)
validations:
required: true
- type: input
id: db-version
attributes:
label: MySQL/MariaDB version
description: What database are you using, and what version?
placeholder: ex. MySQL 5.7
validations:
required: true
- type: dropdown
id: install-method
attributes:
label: How did you install Snipe-IT?
options:
- Git install
- Manual install (downloading zip/tar.gz)
- Docker
- install.sh
- Hosted by Grokability
- Other
- Not sure
validations:
required: true
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Also tell us, what did you expect to happen?
placeholder: Tell us what you see! (Be nice!)
validations:
required: true
- type: dropdown
id: browsers
attributes:
label: What browsers are you seeing the problem on?
multiple: true
options:
- Firefox
- Chrome
- Safari
- Microsoft Edge
- Other
- type: textarea
id: server-logs
attributes:
label: Application log output
description: Please copy and paste any relevant log output from `storage/logs/laravel.log`. This will be automatically formatted into code, so no need for backticks.
render: shell
- type: textarea
id: browser-logs
attributes:
label: Browser console output
description: Please copy and paste any relevant log output from your browser console. This will be automatically formatted into code, so no need for backticks.
render: shell
- type: checkboxes
id: common-issues
attributes:
label: Common Issues
description: Please make sure you have done the following before submitting your issue.
options:
- label: I have searched this repo for existing issues related to my issue (including closed issues)
required: true
- label: My APP_URL is set correctly in my .env file (including http or https and no trailing slash)
required: true
- label: I have searched the official Snipe-IT documentation and have checked the Common Issues documentation (where applicable)
required: true
- label: I have run database migrations (where applicable).
required: true
- label: I have attached screenshots and/or videos of the issue (where applicable)
required: true
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/grokability/snipe-it/blob/master/CODE_OF_CONDUCT.md).
options:
- label: I agree to follow this project's Code of Conduct
required: true

View File

@@ -0,0 +1,38 @@
name: Feature Request
description: Request a new feature.
title: "[Feature]: "
projects: ["grokability/snipe-it"]
type: feature
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this feature request! Please make sure to search the existing issues in this repository to see if your feature has already been requested, and feel free to add your context to any existing requests.
**Please write your issue in English.** You can use tools like [DeepL](https://www.deepl.com) or [Google Translate](https://translate.google.com/) to translate if necessary.
**If you choose to upload screenshots or videos (which we always encourage), please make sure they do not contain any sensitive information.**
- type: input
id: version
attributes:
label: Snipe-IT Version
description: What version of Snipe-IT are you currently running? You can find the version number in the footer of any page in Snipe-IT.
placeholder: ex. v8.3.1 - build 19577 (master)
validations:
required: true
- type: textarea
id: feature-description
attributes:
label: How can we help?
description: Let us know in detail what feature you'd like to see added. While we can't promise to implement every feature request, we do read every one and take them into consideration when planning future releases.
placeholder: Tell us what you'd like to see in Snipe-IT! (Be nice!)
validations:
required: true
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/grokability/snipe-it/blob/master/CODE_OF_CONDUCT.md).
options:
- label: I agree to follow this project's Code of Conduct
required: true

View File

@@ -26,7 +26,7 @@ jobs:
language: [ 'javascript' ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL

View File

@@ -32,7 +32,7 @@ jobs:
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
- name: Run Codacy Analysis CLI

View File

@@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Crowdin push
uses: crowdin/github-action@v2

View File

@@ -42,7 +42,7 @@ jobs:
steps:
# https://github.com/actions/checkout
- name: Checkout codebase
uses: actions/checkout@v4
uses: actions/checkout@v5
# https://github.com/docker/setup-buildx-action
- name: Setup Docker Buildx

View File

@@ -42,7 +42,7 @@ jobs:
steps:
# https://github.com/actions/checkout
- name: Checkout codebase
uses: actions/checkout@v4
uses: actions/checkout@v5
# https://github.com/docker/setup-buildx-action
- name: Setup Docker Buildx

View File

@@ -11,7 +11,7 @@ jobs:
dockerHubDescription:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Docker Hub Description
uses: grokability/dockerhub-description@7ea9d275c7cdbe2b676a093a0308c50665e3b8b4

View File

@@ -11,7 +11,7 @@ jobs:
issues: write
# pull-requests: write
steps:
- uses: actions/stale@v9
- uses: actions/stale@v10
with:
debug-only: true
ascending: true

View File

@@ -37,7 +37,7 @@ jobs:
php-version: "${{ matrix.php-version }}"
coverage: none
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Get Composer Cache Directory
id: composer-cache
@@ -76,4 +76,16 @@ jobs:
DB_DATABASE: snipeit
DB_PORT: ${{ job.services.mysql.ports[3306] }}
DB_USERNAME: root
LOG_CHANNEL: single
LOG_LEVEL: debug
run: php artisan test
- name: Upload Laravel logs as artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: laravel-logs-php-${{ matrix.php-version }}-run-${{ github.run_attempt }}
path: |
storage/logs/*.log
if-no-files-found: ignore
retention-days: 7

View File

@@ -34,7 +34,7 @@ jobs:
php-version: "${{ matrix.php-version }}"
coverage: none
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Get Composer Cache Directory
id: composer-cache
@@ -75,4 +75,16 @@ jobs:
DB_PORT: ${{ job.services.postgresql.ports[5432] }}
DB_USERNAME: snipeit
DB_PASSWORD: password
LOG_CHANNEL: single
LOG_LEVEL: debug
run: php artisan test
- name: Upload Laravel logs as artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: laravel-logs-php-${{ matrix.php-version }}-run-${{ github.run_attempt }}
path: |
storage/logs/*.log
if-no-files-found: ignore
retention-days: 7

View File

@@ -25,7 +25,7 @@ jobs:
php-version: "${{ matrix.php-version }}"
coverage: none
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Get Composer Cache Directory
id: composer-cache
@@ -61,4 +61,16 @@ jobs:
- name: Execute tests (Unit and Feature tests) via PHPUnit
env:
DB_CONNECTION: sqlite
LOG_CHANNEL: single
LOG_LEVEL: debug
run: php artisan test
- name: Upload Laravel logs as artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: laravel-logs-php-${{ matrix.php-version }}-run-${{ github.run_attempt }}
path: |
storage/logs/*.log
if-no-files-found: ignore
retention-days: 7

4
.scribe/.filehashes Normal file
View File

@@ -0,0 +1,4 @@
# GENERATED. YOU SHOULDN'T MODIFY OR DELETE THIS FILE.
# Scribe uses this file to know when you change something manually in your docs.
.scribe/intro.md=f325b28dd095cc9f79495c3014b20f70
.scribe/auth.md=a1780016c25c90a3c1e981b22cfb10e6

7
.scribe/auth.md Normal file
View File

@@ -0,0 +1,7 @@
# Authenticating requests
To authenticate requests, include an **`Authorization`** header with the value **`"Bearer your-token"`**.
All authenticated endpoints are marked with a `requires authentication` badge in the documentation below.
If your account has API access enabled, you can generate a token by clicking in the top right account menu and clicking <b>API tokens</b>.

329
.scribe/endpoints/00.yaml Normal file
View File

@@ -0,0 +1,329 @@
name: Account
description: ''
endpoints:
-
httpMethods:
- GET
uri: api/v1/account/requests
metadata:
groupName: Account
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Display Requested Assets'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=qIWm6chVMaJXUcKG9E8EHhnb7F9wQT14AjEraiFE; expires=Sat, 18 Oct 2025 20:42:51 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: api/v1/account/eulas
metadata:
groupName: Account
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Display Accepted EULAs'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=nhItaWioeRLO0dKBgjno1X73ttHn50uXRQ7L7BAc; expires=Sat, 18 Oct 2025 20:42:51 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/v1/account/request/{asset_id}'
metadata:
groupName: Account
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Store Asset Request'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
asset_id:
name: asset_id
description: 'The ID of the asset.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
asset_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/v1/account/request/{asset_id}/cancel'
metadata:
groupName: Account
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Cancel Asset Request'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
asset_id:
name: asset_id
description: 'The ID of the asset.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
asset_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: api/v1/account/personal-access-tokens
metadata:
groupName: Account
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Create API token'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: api/v1/account/personal-access-tokens
metadata:
groupName: Account
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Show API tokens'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=yUjH3zpUXM18qZVCvvVEp1y5zfNNok8NctCrwGof; expires=Sat, 18 Oct 2025 20:42:51 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/v1/account/personal-access-tokens/{tokenId}'
metadata:
groupName: Account
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Delete API token'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
tokenId:
name: tokenId
description: ''
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
tokenId: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []

2180
.scribe/endpoints/01.yaml Normal file

File diff suppressed because it is too large Load Diff

636
.scribe/endpoints/02.yaml Normal file
View File

@@ -0,0 +1,636 @@
name: Accessories
description: ''
endpoints:
-
httpMethods:
- GET
uri: 'api/v1/accessories/{accessory}/checkedout'
metadata:
groupName: Accessories
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Show Accessory Checkouts'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
accessory:
name: accessory
description: 'The accessory.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
accessory: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=QwqPH3txF8T3F17zuocUxlzlAourAOPvfWbLeuj9; expires=Sat, 18 Oct 2025 20:42:51 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/v1/accessories/{accessory_id}/checkout'
metadata:
groupName: Accessories
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Checkout Accessory'
description: |-
If Slack is enabled and/or asset acceptance is enabled, it will also
trigger a Slack message and send an email.
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
accessory_id:
name: accessory_id
description: 'The ID of the accessory.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
accessory_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/v1/accessories/{accessory}/checkin'
metadata:
groupName: Accessories
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Checkin Accessory'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
accessory:
name: accessory
description: 'The accessory.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
accessory: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: api/v1/accessories/selectlist
metadata:
groupName: Accessories
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: Selectlist
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters:
search:
name: search
description: 'A search term to filter results by name.'
required: false
example: null
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=kCGqdKxExAZopEwv7oy5l7SRnyqXXXDCU5Jyu7jU; expires=Sat, 18 Oct 2025 20:42:51 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: api/v1/accessories
metadata:
groupName: Accessories
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'List accessories'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters:
search:
name: search
description: 'A search term to filter results by.'
required: false
example: keyboard
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
'filter[<fieldname>]':
name: 'filter[<fieldname>]'
description: 'A field to filter by. Example'
required: false
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
company_id:
name: company_id
description: 'Filter by company ID.'
required: false
example: 1
type: integer
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
category_id:
name: category_id
description: 'Filter by category ID.'
required: false
example: 1
type: integer
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
manufacturer_id:
name: manufacturer_id
description: 'Filter by manufacturer ID.'
required: false
example: 1
type: integer
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
supplier_id:
name: supplier_id
description: 'Filter by supplier ID.'
required: false
example: 1
type: integer
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
location_id:
name: location_id
description: 'Filter by location ID.'
required: false
example: 1
type: integer
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
notes:
name: notes
description: 'Filter by notes.'
required: false
example: 'For office use only'
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
offset:
name: offset
description: 'The number of items to skip before starting to collect the result set.'
required: false
example: 0
type: integer
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
limit:
name: limit
description: 'The number of items to return.'
required: false
example: 50
type: integer
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
sort:
name: sort
description: 'The field to sort by.'
required: false
example: created_at
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
order:
name: order
description: 'The order to sort by.'
required: false
example: desc
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
cleanQueryParameters:
search: keyboard
'filter[<fieldname>]': architecto
company_id: 1
category_id: 1
manufacturer_id: 1
supplier_id: 1
location_id: 1
notes: 'For office use only'
offset: 0
limit: 50
sort: created_at
order: desc
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=2HABGaRbPqMGeiNPKWTPnN0AwM4t7W2yN4TFOJqm; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: api/v1/accessories
metadata:
groupName: Accessories
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Create Accessory'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters:
name:
name: name
description: 'The name of the accessory.'
required: true
example: 'Apple Bluetooth Keyboard'
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
qty:
name: qty
description: 'The number of accessories to create.'
required: true
example: 10
type: integer
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
category_id:
name: category_id
description: 'The ID of the category to assign this accessory to.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
image:
name: image
description: ''
required: false
example: null
type: file
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
name: 'Apple Bluetooth Keyboard'
qty: 10
category_id: 1
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/v1/accessories/{id}'
metadata:
groupName: Accessories
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Show Accessory'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the accessory.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=1Tv5gekmNofKNDwolDkOEcEH9JUfM9rX0PaTFfWI; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- PUT
- PATCH
uri: 'api/v1/accessories/{id}'
metadata:
groupName: Accessories
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Update accessory.'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the accessory.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/v1/accessories/{id}'
metadata:
groupName: Accessories
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Delete Accessory'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the accessory.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []

306
.scribe/endpoints/03.yaml Normal file
View File

@@ -0,0 +1,306 @@
name: Categories
description: ''
endpoints:
-
httpMethods:
- GET
uri: 'api/v1/categories/{item_type}/selectlist'
metadata:
groupName: Categories
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: Selectlist
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
item_type:
name: item_type
description: ''
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
item_type: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=Wy5FSLyBn1xpLQy08hVrBlmoANJohF4ZIzpEcIZy; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: api/v1/categories
metadata:
groupName: Categories
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'List Categories'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=ErvltKvHZdVobMWCabFa83cWRCOTTtIgAPf7kLWS; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: api/v1/categories
metadata:
groupName: Categories
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Create Category'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/v1/categories/{id}'
metadata:
groupName: Categories
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Show Category'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the category.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=V2YFWiG0waCLFesMFr3kkLb0Io41yz4MPzVEfytq; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- PUT
- PATCH
uri: 'api/v1/categories/{id}'
metadata:
groupName: Categories
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Update Category'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the category.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/v1/categories/{id}'
metadata:
groupName: Categories
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Delete Category'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the category.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []

295
.scribe/endpoints/04.yaml Normal file
View File

@@ -0,0 +1,295 @@
name: Companies
description: ''
endpoints:
-
httpMethods:
- GET
uri: api/v1/companies/selectlist
metadata:
groupName: Companies
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: Selectlist
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=IqjgsK1DVTQS5qlZI7l96rTJH0m95aILfWx6eAS2; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: api/v1/companies
metadata:
groupName: Companies
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'List Companies'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=cEVlfAwtjQtu004rU9aEgFwcozHbApb3l0gEpL3C; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: api/v1/companies
metadata:
groupName: Companies
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Create Company'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/v1/companies/{id}'
metadata:
groupName: Companies
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Show Company'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the company.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=YqczMPKZfCp7CKkULGsRoDqufIWQ9yGkni3Cto4R; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- PUT
- PATCH
uri: 'api/v1/companies/{id}'
metadata:
groupName: Companies
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Update Company'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the company.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/v1/companies/{id}'
metadata:
groupName: Companies
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Delete Company'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the company.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []

394
.scribe/endpoints/05.yaml Normal file
View File

@@ -0,0 +1,394 @@
name: Departments
description: ''
endpoints:
-
httpMethods:
- GET
uri: api/v1/departments/selectlist
metadata:
groupName: Departments
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: Selectlist
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=0Ld2mnJEdBRIaREXQ37xGTuIS9SWJ4pT3WC79wc3; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: api/v1/departments
metadata:
groupName: Departments
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'List Departments'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters:
search:
name: search
description: 'Search term to filter results.'
required: false
example: IT
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
name:
name: name
description: 'Filter by exact department name.'
required: false
example: IT
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
company_id:
name: company_id
description: 'Filter by exact company ID.'
required: false
example: 1
type: integer
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
manager_id:
name: manager_id
description: 'Filter by exact manager (user) ID. Example:'
required: false
example: 16
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
location_id:
name: location_id
description: 'Filter by exact location ID.'
required: false
example: 1
type: integer
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
sort:
name: sort
description: 'Column to sort results by. Allowed values: id, name, image, users_count, notes, created_at, updated_at, location, manager, company. Default: created_at.'
required: false
example: name
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
order:
name: order
description: 'Order of sorted results. Allowed values: asc, desc. Default: desc.'
required: false
example: asc
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
offset:
name: offset
description: 'Offset/starting position of the results. Default: 0.'
required: false
example: 0
type: integer
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
limit:
name: limit
description: 'Limit the number of results returned. Default: 25. Maximum: 100.'
required: false
example: 50
type: integer
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
cleanQueryParameters:
search: IT
name: IT
company_id: 1
manager_id: 16
location_id: 1
sort: name
order: asc
offset: 0
limit: 50
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=A3I9GYZHlismQEeDjfx7XM9EFccWImskxth6x9OH; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: api/v1/departments
metadata:
groupName: Departments
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Create Department'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/v1/departments/{id}'
metadata:
groupName: Departments
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Show Department'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the department.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=f5nA1I31NqT4m4T3BeSDmKt2LuBQs7KtcZZNRDKq; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- PUT
- PATCH
uri: 'api/v1/departments/{id}'
metadata:
groupName: Departments
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Update Department'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the department.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/v1/departments/{id}'
metadata:
groupName: Departments
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Delete Department'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the department.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []

419
.scribe/endpoints/06.yaml Normal file
View File

@@ -0,0 +1,419 @@
name: Components
description: ''
endpoints:
-
httpMethods:
- GET
uri: 'api/v1/components/{component}/assets'
metadata:
groupName: Components
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Component Assets'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
component:
name: component
description: 'The component.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
component: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=wiPOiV7Xae1fyzS2Jv3w9d060WDRgnET70IrBjTj; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/v1/components/{id}/checkin'
metadata:
groupName: Components
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Checkin Component'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the component.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/v1/components/{id}/checkout'
metadata:
groupName: Components
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Checkout Component'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the component.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters:
assigned_to:
name: assigned_to
description: 'The <code>id</code> of an existing record in the assets table.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
assigned_qty:
name: assigned_qty
description: ''
required: false
example: null
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
assigned_to: architecto
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: api/v1/components
metadata:
groupName: Components
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'List Categories'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=vXpBDH4e4puagaeAOAWHnpHEOQ7rCwXKeEDeGn5W; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: api/v1/components
metadata:
groupName: Components
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Create Component'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/v1/components/{id}'
metadata:
groupName: Components
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Show Component'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the component.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=mIFtURJNZowrCIpSMAMYNVYW5XvKIReOCIJ57XgL; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- PUT
- PATCH
uri: 'api/v1/components/{id}'
metadata:
groupName: Components
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Update Component'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the component.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/v1/components/{id}'
metadata:
groupName: Components
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Delete Component'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the component.'
required: true
example: 3
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: 3
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []

535
.scribe/endpoints/07.yaml Normal file
View File

@@ -0,0 +1,535 @@
name: Consumables
description: ''
endpoints:
-
httpMethods:
- GET
uri: api/v1/consumables/selectlist
metadata:
groupName: Consumables
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: Selectlist
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=9SzZeaG6J8yoJtsrcqY5kJPcLvX7ObZeYK0JivkB; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/v1/consumables/{id}/users'
metadata:
groupName: Consumables
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'User Assignments'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the consumable.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=eO7NKRGNCHJ34NL6woGI5Ux80o2tg9rIBW0LuGGd; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/v1/consumables/{consumable}/checkout'
metadata:
groupName: Consumables
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Checkout Consumable'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
consumable:
name: consumable
description: 'The consumable.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
consumable: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: api/v1/consumables
metadata:
groupName: Consumables
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'List Consumables'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters:
filter:
name: filter
description: 'A JSON encoded array of key/value pairs to filter results by.'
required: false
example: '{"company":"1","location":"2"}'
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
search:
name: search
description: 'A search term to filter results by.'
required: false
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
name:
name: name
description: 'Filter by exact name.'
required: false
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
company_id:
name: company_id
description: 'Filter by exact company ID.'
required: false
example: 16
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
category_id:
name: category_id
description: 'Filter by exact category ID.'
required: false
example: 16
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
model_number:
name: model_number
description: 'Filter by exact model number.'
required: false
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
manufacturer_id:
name: manufacturer_id
description: 'Filter by exact manufacturer ID.'
required: false
example: 16
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
supplier_id:
name: supplier_id
description: 'Filter by exact supplier ID.'
required: false
example: 16
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
location_id:
name: location_id
description: 'Filter by exact location ID.'
required: false
example: 16
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
notes:
name: notes
description: 'Filter by exact notes.'
required: false
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
sort:
name: sort
description: 'The column to sort results by. Must be one of the following: id, name, order_number, min_amt, purchase_date, purchase_cost, company, category, model_number, item_no, manufacturer, location, qty, image, company, location, category, supplier, manufacturer. Default is created_at.'
required: false
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
order:
name: order
description: 'The order to sort results by. Must be one of the following: asc, desc. Default is desc.'
required: false
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanQueryParameters:
filter: '{"company":"1","location":"2"}'
search: architecto
name: architecto
company_id: 16
category_id: 16
model_number: architecto
manufacturer_id: 16
supplier_id: 16
location_id: 16
notes: architecto
sort: architecto
order: architecto
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=WMv6quPUXaLnZTkEXk5aBwdTDMuUgt7fQTd6uLZf; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: api/v1/consumables
metadata:
groupName: Consumables
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Store a newly created resource in storage.'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/v1/consumables/{id}'
metadata:
groupName: Consumables
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Show Consumable'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the consumable.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=oTfWSAjrq9p5g7qEYt7eFY4Dl7io060HverF1daF; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- PUT
- PATCH
uri: 'api/v1/consumables/{id}'
metadata:
groupName: Consumables
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Update Consumable'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the consumable.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/v1/consumables/{id}'
metadata:
groupName: Consumables
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Delete Consumable'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the consumable.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []

244
.scribe/endpoints/08.yaml Normal file
View File

@@ -0,0 +1,244 @@
name: Depreciations
description: ''
endpoints:
-
httpMethods:
- GET
uri: api/v1/depreciations
metadata:
groupName: Depreciations
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'List Depreciations'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=TaZAI56rS9h74YByHlSA9ZrXGsTjQD4onwKaqiFF; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: api/v1/depreciations
metadata:
groupName: Depreciations
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Create Depreciation'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/v1/depreciations/{depreciation_id}'
metadata:
groupName: Depreciations
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Show Depreciation'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
depreciation_id:
name: depreciation_id
description: 'The ID of the depreciation.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
depreciation_id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=qFky4u180BfuHQB1d4a5A7K5Q4MOHcVdqELFA4ow; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- PUT
- PATCH
uri: 'api/v1/depreciations/{depreciation_id}'
metadata:
groupName: Depreciations
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Update Depreciation'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
depreciation_id:
name: depreciation_id
description: 'The ID of the depreciation.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
depreciation_id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/v1/depreciations/{depreciation_id}'
metadata:
groupName: Depreciations
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Delete Depreciation'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
depreciation_id:
name: depreciation_id
description: 'The ID of the depreciation.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
depreciation_id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []

726
.scribe/endpoints/09.yaml Normal file
View File

@@ -0,0 +1,726 @@
name: 'Custom Fields'
description: ''
endpoints:
-
httpMethods:
- POST
uri: 'api/v1/fields/fieldsets/{id}/order'
metadata:
groupName: 'Custom Fields'
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Reorder Fields'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the fieldset.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/v1/fields/{field}/associate'
metadata:
groupName: 'Custom Fields'
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Add Field to Fieldset'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
field:
name: field
description: 'The field.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
field: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/v1/fields/{field}/disassociate'
metadata:
groupName: 'Custom Fields'
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Remove Field from Fieldset'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
field:
name: field
description: 'The field.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
field: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: api/v1/fields
metadata:
groupName: 'Custom Fields'
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'List Custom Fields'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=MTrOxDhLsWMBw1aLYKK9q1GA3VjT43PhCRp7KBa9; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: api/v1/fields
metadata:
groupName: 'Custom Fields'
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Create Field'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/v1/fields/{field}'
metadata:
groupName: 'Custom Fields'
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Show Field'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
field:
name: field
description: 'The field.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
field: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=jdlBn85i46xp3MdUb7Dbb1igonFqeCNdzQwTOmnl; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- PUT
- PATCH
uri: 'api/v1/fields/{field}'
metadata:
groupName: 'Custom Fields'
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Update Field'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
field:
name: field
description: 'The field.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
field: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/v1/fields/{field}'
metadata:
groupName: 'Custom Fields'
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Delete Field'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
field:
name: field
description: 'The field.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
field: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/v1/fieldsets/{fieldset}/fields'
metadata:
groupName: 'Custom Fields'
groupDescription: ''
subgroup: 'Custom Fieldsets'
subgroupDescription: ''
title: 'Show Fields in Fieldset'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
fieldset:
name: fieldset
description: 'The fieldset.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
fieldset: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/v1/fieldsets/{fieldset}/fields/{model}'
metadata:
groupName: 'Custom Fields'
groupDescription: ''
subgroup: 'Custom Fieldsets'
subgroupDescription: ''
title: 'Fields in Fieldset with Default Values for Model'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
fieldset:
name: fieldset
description: 'The fieldset.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
model:
name: model
description: ''
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
fieldset: architecto
model: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: api/v1/fieldsets
metadata:
groupName: 'Custom Fields'
groupDescription: ''
subgroup: 'Custom Fieldsets'
subgroupDescription: ''
title: 'List Fieldsets'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=DtH1Q5VV2HTu9NhlX5CxdYBImN4ZqxolMxRmhDyk; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: api/v1/fieldsets
metadata:
groupName: 'Custom Fields'
groupDescription: ''
subgroup: 'Custom Fieldsets'
subgroupDescription: ''
title: 'Create Fieldset'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/v1/fieldsets/{id}'
metadata:
groupName: 'Custom Fields'
groupDescription: ''
subgroup: 'Custom Fieldsets'
subgroupDescription: ''
title: 'Show Fieldset and Fields'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the fieldset.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=haApTgbAdDCFdvIN3hU8DshPXbfKMRdlXqBMBKdM; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- PUT
- PATCH
uri: 'api/v1/fieldsets/{id}'
metadata:
groupName: 'Custom Fields'
groupDescription: ''
subgroup: 'Custom Fieldsets'
subgroupDescription: ''
title: 'Update Fieldset'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the fieldset.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/v1/fieldsets/{id}'
metadata:
groupName: 'Custom Fields'
groupDescription: ''
subgroup: 'Custom Fieldsets'
subgroupDescription: ''
title: 'Delete Fieldset'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the fieldset.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []

244
.scribe/endpoints/10.yaml Normal file
View File

@@ -0,0 +1,244 @@
name: 'User Groups'
description: ''
endpoints:
-
httpMethods:
- GET
uri: api/v1/groups
metadata:
groupName: 'User Groups'
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Display a listing of the resource.'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=evRZVbrjaLPlDGuAmSjuQxAfBkaXVVI3h6YJ8xCC; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: api/v1/groups
metadata:
groupName: 'User Groups'
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Create Group'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/v1/groups/{id}'
metadata:
groupName: 'User Groups'
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Show Group'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the group.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=lUFcyrjpTiMJiziJCYaZzhxr9o4YDOHuJhtyxe9O; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- PUT
- PATCH
uri: 'api/v1/groups/{id}'
metadata:
groupName: 'User Groups'
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Update Group'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the group.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/v1/groups/{id}'
metadata:
groupName: 'User Groups'
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Remove the specified resource from storage.'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the group.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []

354
.scribe/endpoints/11.yaml Normal file
View File

@@ -0,0 +1,354 @@
name: Maintenances
description: ''
endpoints:
-
httpMethods:
- GET
uri: api/v1/maintenances
metadata:
groupName: Maintenances
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'List Maintenances'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters:
search:
name: search
description: 'Search term to filter results.'
required: false
example: repair
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
asset_id:
name: asset_id
description: 'Filter by exact asset ID.'
required: false
example: 1
type: integer
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
supplier_id:
name: supplier_id
description: 'Filter by exact supplier ID.'
required: false
example: 1
type: integer
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
created_by:
name: created_by
description: 'Filter by exact user ID who created the maintenance. Example'
required: false
example: 16
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
url:
name: url
description: 'Filter by exact URL.'
required: false
example: 'http://example.com'
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
asset_maintenance_type:
name: asset_maintenance_type
description: 'Filter by exact maintenance type.'
required: false
example: repair
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
sort:
name: sort
description: 'Column to sort results by. Allowed values: id, name, asset_maintenance_time, asset_maintenance_type, cost, start_date, completion_date, notes, asset_tag, asset_name, serial, created_by, supplier, location, is_warranty, status_label. Default: created_at.'
required: false
example: name
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
order:
name: order
description: 'Order of sorted results. Allowed values: asc, desc. Default: desc.'
required: false
example: asc
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
offset:
name: offset
description: 'Offset/starting position of the results. Default: 0.'
required: false
example: 0
type: integer
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
limit:
name: limit
description: 'Limit the number of results returned. Default: 25. Maximum: 100.'
required: false
example: 50
type: integer
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
cleanQueryParameters:
search: repair
asset_id: 1
supplier_id: 1
created_by: 16
url: 'http://example.com'
asset_maintenance_type: repair
sort: name
order: asc
offset: 0
limit: 50
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=HIPWn994ZVwWTllISCuyT1n0vLjhvE6GtJdyvVt5; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: api/v1/maintenances
metadata:
groupName: Maintenances
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Create Maintenance'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/v1/maintenances/{id}'
metadata:
groupName: Maintenances
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'View Maintenance'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the maintenance.'
required: true
example: 2
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: 2
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=SMRgTfJyiKW4MwqoQkxPhRwZ7s0NG6iXfqrgvOF3; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- PUT
- PATCH
uri: 'api/v1/maintenances/{id}'
metadata:
groupName: Maintenances
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Update Maintenance'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the maintenance.'
required: true
example: 2
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: 2
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/v1/maintenances/{id}'
metadata:
groupName: Maintenances
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Delete Maintenance'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the maintenance.'
required: true
example: 2
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: 2
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []

181
.scribe/endpoints/12.yaml Normal file
View File

@@ -0,0 +1,181 @@
name: Imports
description: ''
endpoints:
-
httpMethods:
- POST
uri: 'api/v1/imports/process/{import}'
metadata:
groupName: Imports
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Process Import'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
import:
name: import
description: ''
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
import: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: api/v1/imports
metadata:
groupName: Imports
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'List Import Files'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=lj8o7doJNMvuEIVNyZKehmNRHGnHDPN2afmwMD6i; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: api/v1/imports
metadata:
groupName: Imports
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Save Import File'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/v1/imports/{id}'
metadata:
groupName: Imports
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Delete Import File'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the import.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []

116
.scribe/endpoints/13.yaml Normal file
View File

@@ -0,0 +1,116 @@
name: Labels
description: ''
endpoints:
-
httpMethods:
- GET
uri: 'api/v1/labels/{name}'
metadata:
groupName: Labels
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Show Label'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
name:
name: name
description: ''
required: true
example: '|{+-0p'
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
name: '|{+-0p'
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=rEUcrmsA92vKXWOMa9gjkZircoRHtwh2NGzh46Ym; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: api/v1/labels
metadata:
groupName: Labels
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'List Labels'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=uOfOzJMa5lIhRnkxrSV7W6Lh6At2caeav8pgRq3i; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []

576
.scribe/endpoints/14.yaml Normal file
View File

@@ -0,0 +1,576 @@
name: Licenses
description: ''
endpoints:
-
httpMethods:
- GET
uri: api/v1/licenses/selectlist
metadata:
groupName: Licenses
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: Selectlist
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=WCUA668q64Tb6nEAAMH6QDj0KxiWwfnKfCVC1WL5; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: api/v1/licenses
metadata:
groupName: Licenses
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'List Licenses'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters:
status:
name: status
description: 'Filter by license status. Options: active, inactive, expiring'
required: false
example: '?status=active'
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
company_id:
name: company_id
description: 'Filter by exact company ID.'
required: false
example: 1
type: integer
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
name:
name: name
description: 'Filter by exact license name.'
required: false
example: 'Microsoft 365'
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
product_key:
name: product_key
description: 'Filter by exact product key.'
required: false
example: W269N
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
order_number:
name: order_number
description: 'Filter by exact order number.'
required: false
example: '12345'
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
purchase_order:
name: purchase_order
description: 'Filter by exact purchase order.'
required: false
example: PO12345
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
license_name:
name: license_name
description: 'Filter by exact licensee name.'
required: false
example: 'John Doe'
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
license_email:
name: license_email
description: 'Filter by exact licensee email.'
required: false
example: john.d
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
cleanQueryParameters:
status: '?status=active'
company_id: 1
name: 'Microsoft 365'
product_key: W269N
order_number: '12345'
purchase_order: PO12345
license_name: 'John Doe'
license_email: john.d
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=FsSfFEzLbFI2oqcTFwXV523YHYRteVgVbhwU1KjU; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: api/v1/licenses
metadata:
groupName: Licenses
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Create License'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/v1/licenses/{license_id}'
metadata:
groupName: Licenses
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Show License'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
license_id:
name: license_id
description: 'The ID of the license.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
license_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=fr7kJMaaASq4b53DwioCqOIG1A7k7COxiBsYFjXL; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- PUT
- PATCH
uri: 'api/v1/licenses/{license_id}'
metadata:
groupName: Licenses
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Update License'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
license_id:
name: license_id
description: 'The ID of the license.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
license_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/v1/licenses/{license_id}'
metadata:
groupName: Licenses
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Delete License'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
license_id:
name: license_id
description: 'The ID of the license.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
license_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/v1/licenses/{license_id}/seats'
metadata:
groupName: Licenses
groupDescription: ''
subgroup: 'License Seats'
subgroupDescription: ''
title: 'List License Seats'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
license_id:
name: license_id
description: 'The ID of the license.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
license_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=StfngPkbKXNpOhusZSc3gJVfFrY1dHeurAa4otwt; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/v1/licenses/{license_id}/seats/{id}'
metadata:
groupName: Licenses
groupDescription: ''
subgroup: 'License Seats'
subgroupDescription: ''
title: 'Show License Seat'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
license_id:
name: license_id
description: 'The ID of the license.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
id:
name: id
description: 'The ID of the seat.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
license_id: 1
id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=4NcQjrTDkyy5Ps1lwLlvwwkW8zLNdvkt4jLniAbj; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- PUT
- PATCH
uri: 'api/v1/licenses/{license_id}/seats/{id}'
metadata:
groupName: Licenses
groupDescription: ''
subgroup: 'License Seats'
subgroupDescription: ''
title: 'Update License Seat'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
license_id:
name: license_id
description: 'The ID of the license.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
id:
name: id
description: 'The ID of the seat.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
license_id: 1
id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []

644
.scribe/endpoints/15.yaml Normal file
View File

@@ -0,0 +1,644 @@
name: Locations
description: ''
endpoints:
-
httpMethods:
- GET
uri: api/v1/locations/selectlist
metadata:
groupName: Locations
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Gets a paginated collection for the select2 menus'
description: |-
This is handled slightly differently as of ~4.7.8-pre, as
we have to do some recursive magic to get the hierarchy to display
properly when looking at the parent/child relationship in the
rich menus.
This means we can't use the normal pagination that we use elsewhere
in our selectlists, since we have to get the full set before we can
determine which location is parent/child/grandchild, etc.
This also means that hierarchy display gets a little funky when people
use the Select2 search functionality, but there's not much we can do about
that right now.
As a result, instead of paginating as part of the query, we have to grab
the entire data set, and then invoke a paginator manually and pass that
through to the SelectListTransformer.
Many thanks to @uberbrady for the help getting this working better.
Recursion still sucks, but I guess he doesn't have to get in the
sea... this time.
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=UpVwalXoUKqNpdc1JZOoxLIbtfuGTDjmXv2FL0U4; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/v1/locations/{location_id}/assets'
metadata:
groupName: Locations
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Show Assets with Default Location'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
location_id:
name: location_id
description: 'The ID of the location.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
location_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=s6eLrXoHfx9aHRHsGokhuXGIfcWMyMK6s8Y7CuQb; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/v1/locations/{location_id}/assigned/assets'
metadata:
groupName: Locations
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Show Assets Assigned to Location'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
location_id:
name: location_id
description: 'The ID of the location.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
location_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=6IjNjFVBRoxfcpk3lgt97JCcwcwkJ18MblUUArEa; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/v1/locations/{location_id}/assigned/accessories'
metadata:
groupName: Locations
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Show Accessories Assigned to Location'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
location_id:
name: location_id
description: 'The ID of the location.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
location_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=8QVLWPz9VFdTVM9oelFsOvXEnefwKOeIuos7D23G; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: api/v1/locations
metadata:
groupName: Locations
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'List Locations'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters:
search:
name: search
description: 'Search term to filter results.'
required: false
example: Headquarters
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
name:
name: name
description: 'Filter by exact location name.'
required: false
example: Headquarters
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
address:
name: address
description: 'Filter by exact address.'
required: false
example: '123 Main St'
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
address2:
name: address2
description: 'Filter by exact address2.'
required: false
example: 'Suite 100'
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
city:
name: city
description: 'Filter by exact city.'
required: false
example: Springfield
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
zip:
name: zip
description: 'Filter by exact zip code.'
required: false
example: '12345'
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
country:
name: country
description: 'Filter by exact country.'
required: false
example: USA
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
manager_id:
name: manager_id
description: 'Filter by exact manager (user) ID.'
required: false
example: 1
type: integer
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
company_id:
name: company_id
description: 'Filter by exact company ID.'
required: false
example: 1
type: integer
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
parent_id:
name: parent_id
description: 'Filter by exact parent location ID.'
required: false
example: 1
type: integer
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
status:
name: status
description: 'Filter by location status. Allowed values: active, deleted.'
required: false
example: active
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
sort:
name: sort
description: 'Column to sort results by. Allowed values: accessorries_count, address, address2, assets_count, assigned_assets_count, rtd_assets_count, accessories_count, assigned_accessories_count, components_count, consumables_count, users_count, children_count, city, country, created_at, currency, id, image, ldap_ou, company_id, manager_id, name, rtd_assets_count, state, updated_at, zip. Default: created_at.'
required: false
example: name
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
order:
name: order
description: 'Order of sorted results. Allowed values: asc, desc. Default: desc.'
required: false
example: asc
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
cleanQueryParameters:
search: Headquarters
name: Headquarters
address: '123 Main St'
address2: 'Suite 100'
city: Springfield
zip: '12345'
country: USA
manager_id: 1
company_id: 1
parent_id: 1
status: active
sort: name
order: asc
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=OrGO92pRr2bN1MO0HEk74EaOyIBpyNWW8nBBM9w1; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: api/v1/locations
metadata:
groupName: Locations
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Create Location'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/v1/locations/{id}'
metadata:
groupName: Locations
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Show Location'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the location.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=r40jhYlCjVborgeetW7XFFJzC3FPckbK3wiqaq9b; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- PUT
- PATCH
uri: 'api/v1/locations/{id}'
metadata:
groupName: Locations
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Update Location'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the location.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/v1/locations/{id}'
metadata:
groupName: Locations
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Delete Location'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the location.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []

462
.scribe/endpoints/16.yaml Normal file
View File

@@ -0,0 +1,462 @@
name: Manufacturers
description: ''
endpoints:
-
httpMethods:
- GET
uri: api/v1/manufacturers/selectlist
metadata:
groupName: Manufacturers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: Selectlist
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=wsdZCoP7veaDGNxSgmEVyiIXMCynDJaplPtmclKS; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/v1/manufacturers/{id}/restore'
metadata:
groupName: Manufacturers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Restore Deleted Manufacturer'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the manufacturer.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: api/v1/manufacturers
metadata:
groupName: Manufacturers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'List Manufacturers'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters:
search:
name: search
description: 'Search term to filter results.'
required: false
example: Dell
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
name:
name: name
description: 'Filter by exact manufacturer name.'
required: false
example: Dell
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
url:
name: url
description: 'Filter by exact URL.'
required: false
example: 'http://example.com'
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
support_url:
name: support_url
description: 'Filter by exact support URL.'
required: false
example: 'http://support.example.com'
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
warranty_lookup_url:
name: warranty_lookup_url
description: 'Filter by exact warranty lookup URL.'
required: false
example: 'http://warranty.example.com'
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
support_phone:
name: support_phone
description: 'Filter by exact support phone number.'
required: false
example: 1-800-555-5555
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
support_email:
name: support_email
description: 'Filter by exact support email address.'
required: false
example: support@example.org
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
sort:
name: sort
description: 'Column to sort results by. Allowed values: id, name, url, support_url, support_email, warranty_lookup_url, support_phone, created_at, updated_at, assets_count, consumables_count, components_count, licenses_count. Default: created_at.'
required: false
example: name
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
order:
name: order
description: 'Order of sorted results. Allowed values: asc, desc. Default: desc.'
required: false
example: asc
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
offset:
name: offset
description: 'Offset/starting position of the results. Default: 0.'
required: false
example: 0
type: integer
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
limit:
name: limit
description: 'Limit the number of results returned. Default: 25. Maximum: 100.'
required: false
example: 50
type: integer
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
cleanQueryParameters:
search: Dell
name: Dell
url: 'http://example.com'
support_url: 'http://support.example.com'
warranty_lookup_url: 'http://warranty.example.com'
support_phone: 1-800-555-5555
support_email: support@example.org
sort: name
order: asc
offset: 0
limit: 50
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=hLpuGgLKlkZ3lxAdCVVQh6AknrP7V8ucHP12iJyL; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: api/v1/manufacturers
metadata:
groupName: Manufacturers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Create Maintenance'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/v1/manufacturers/{id}'
metadata:
groupName: Manufacturers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Show Manufacturer'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the manufacturer.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=AihyA0pGOpolpeaHgVkhwxZ48ZIGlH5C4cWn2ky1; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- PUT
- PATCH
uri: 'api/v1/manufacturers/{id}'
metadata:
groupName: Manufacturers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Update Manufacturer'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the manufacturer.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/v1/manufacturers/{id}'
metadata:
groupName: Manufacturers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Delete Manufacturer'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the manufacturer.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []

357
.scribe/endpoints/17.yaml Normal file
View File

@@ -0,0 +1,357 @@
name: Models
description: ''
endpoints:
-
httpMethods:
- GET
uri: api/v1/models/selectlist
metadata:
groupName: Models
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Selectlist of Models'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=jwtFIyYGPRatDfntlAj40jo0O4Sj0FCnKi976PR2; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: api/v1/models/assets
metadata:
groupName: Models
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'List Assets in Model'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the model.'
required: true
example: 16
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: 16
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=nvMGTR69fETV88dw8dfKSbREZAJ66IYQUUNSpf7Y; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: api/v1/models
metadata:
groupName: Models
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'List Models'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=QArLWCify7SZSmEfdwLa8MuiE73ySbcjczNWAP5t; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: api/v1/models
metadata:
groupName: Models
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Create Model'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/v1/models/{id}'
metadata:
groupName: Models
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Show Model'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the model.'
required: true
example: 16
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: 16
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=Fi7bcrWvfZzmZFbGKAT0DPwaht8G2vkcbjoJPdZ1; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- PUT
- PATCH
uri: 'api/v1/models/{id}'
metadata:
groupName: Models
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Update Model'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the model.'
required: true
example: 16
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: 16
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/v1/models/{id}'
metadata:
groupName: Models
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Delete Model'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the model.'
required: true
example: 16
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: 16
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []

117
.scribe/endpoints/18.yaml Normal file
View File

@@ -0,0 +1,117 @@
name: Notes
description: ''
endpoints:
-
httpMethods:
- POST
uri: 'api/v1/notes/{asset_id}/store'
metadata:
groupName: Notes
groupDescription: ''
subgroup: Assets
subgroupDescription: ''
title: 'Store Note'
description: |-
Checks authorization for updating assets, validates the presence of the 'note',
attempts to find the asset by ID, and creates a new ActionLog entry if successful.
Returns JSON responses indicating success or failure with appropriate HTTP status codes.
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
asset_id:
name: asset_id
description: 'The ID of the asset.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
asset_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/v1/notes/{asset_id}/index'
metadata:
groupName: Notes
groupDescription: ''
subgroup: Assets
subgroupDescription: ''
title: 'List Notes'
description: |-
Checks authorization to view assets, attempts to find the asset by ID,
and fetches related action log entries of type 'note added', including
user information for each note. Returns a JSON response with the notes or errors.
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
asset_id:
name: asset_id
description: 'The ID of the asset.'
required: true
example: 1
type: integer
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
asset_id: 1
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=0996I9pgG6hTiplyAUfm6hARQqlLp2KcZRKbrsM4; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []

398
.scribe/endpoints/19.yaml Normal file
View File

@@ -0,0 +1,398 @@
name: Settings
description: ''
endpoints:
-
httpMethods:
- GET
uri: api/v1/settings/ldaptest
metadata:
groupName: Settings
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Test LDAP Connection'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=sXQmK1seBet712r1kd4fxKvJ8eS1G5JIQGi7Jk76; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: api/v1/settings/purge_barcodes
metadata:
groupName: Settings
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Delete Barcode Cache'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: api/v1/settings/login-attempts
metadata:
groupName: Settings
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Get a list of login attempts'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=3WvRIFmkRUjvmDyyocP7gGkeVA8nsKCstMlpD2ll; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: api/v1/settings/ldaptestlogin
metadata:
groupName: Settings
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Test LDAP Login'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters:
ldaptest_user:
name: ldaptest_user
description: ''
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
ldaptest_password:
name: ldaptest_password
description: ''
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanBodyParameters:
ldaptest_user: architecto
ldaptest_password: architecto
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: api/v1/settings/mailtest
metadata:
groupName: Settings
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Test Email Configuration'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: api/v1/settings/backups
metadata:
groupName: Settings
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Lists backup files'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=c1LnO2y90g9cXIQdH1B3ALRTwBznlJR0MPn7UYwI; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: api/v1/settings/backups/download/latest
metadata:
groupName: Settings
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Determines and downloads the latest backup'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=h8vmsBd9n2ThBnox919dPAo17WMNdGSmFDgmUWbJ; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/v1/settings/backups/download/{file}'
metadata:
groupName: Settings
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Downloads a backup file.'
description: |-
We use response()->download() here instead of Storage::download() because Storage::download()
exhausts memory on larger files.
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
file:
name: file
description: ''
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
file: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=dEPJObU3yZeyRQ0ZNZQmLDg70DDH6mt8OLUoXk7b; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []

539
.scribe/endpoints/20.yaml Normal file
View File

@@ -0,0 +1,539 @@
name: 'Status Labels'
description: ''
endpoints:
-
httpMethods:
- GET
uri: api/v1/statuslabels/selectlist
metadata:
groupName: 'Status Labels'
groupDescription: ''
subgroup: Assets
subgroupDescription: ''
title: Selectlist
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=wkMPeN6kxHTgcy7pBWCmBb2skYp7Ozxo03ll2QRI; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: api/v1/statuslabels/assets/name
metadata:
groupName: 'Status Labels'
groupDescription: ''
subgroup: Assets
subgroupDescription: ''
title: 'Show Count for Pie Chart'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=BwSbIkmBBnKEl1eHDB5irvFrSmdOermismgPqdVt; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: api/v1/statuslabels/assets/type
metadata:
groupName: 'Status Labels'
groupDescription: ''
subgroup: Assets
subgroupDescription: ''
title: 'Show Count for Pie Chart by Meta Status'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=qgDpluENzw06DYesVDJ62VPNypFZR7TMXA5YuERD; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/v1/statuslabels/{id}/assetlist'
metadata:
groupName: 'Status Labels'
groupDescription: ''
subgroup: Assets
subgroupDescription: ''
title: 'Show Assets with Status Label'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the statuslabel.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=prHwFCnHCRfbaQBGGsb9zl9HAqpNQVahgTzOn5TU; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/v1/statuslabels/{statuslabel}/deployable'
metadata:
groupName: 'Status Labels'
groupDescription: ''
subgroup: Assets
subgroupDescription: ''
title: 'Check for Deployable Status'
description: |-
Returns a boolean response based on whether the status label
is one that is deployable or pending.
This is used by the hardware create/edit view to determine whether
we should provide a dropdown of users for them to check the asset out to,
and whether we show a warning that the asset will be checked in if it's already
assigned but the status is changed to one that isn't pending or deployable
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
statuslabel:
name: statuslabel
description: 'The statuslabel.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
statuslabel: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=gGlaRILsVZF4fEWWem29LTEhtwQLJo5jRgFzetFi; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: api/v1/statuslabels
metadata:
groupName: 'Status Labels'
groupDescription: ''
subgroup: Assets
subgroupDescription: ''
title: 'Show Status Labels'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters:
search:
name: search
description: 'Search term to filter results.'
required: false
example: Inventory
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
cleanQueryParameters:
search: Inventory
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=wZlTwk63tGu1kRBFJuzb8R1UY1k0ZU2YI5NAAZt8; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: api/v1/statuslabels
metadata:
groupName: 'Status Labels'
groupDescription: ''
subgroup: Assets
subgroupDescription: ''
title: 'Store a newly created resource in storage.'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/v1/statuslabels/{id}'
metadata:
groupName: 'Status Labels'
groupDescription: ''
subgroup: Assets
subgroupDescription: ''
title: 'Show Status Labels'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the statuslabel.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=BoPls7yDoCtaubgDPfK5nEabHin9oYkJpg9vZT3b; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- PUT
- PATCH
uri: 'api/v1/statuslabels/{id}'
metadata:
groupName: 'Status Labels'
groupDescription: ''
subgroup: Assets
subgroupDescription: ''
title: 'Update Status Label'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the statuslabel.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/v1/statuslabels/{id}'
metadata:
groupName: 'Status Labels'
groupDescription: ''
subgroup: Assets
subgroupDescription: ''
title: 'Delete Status Label'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the statuslabel.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []

482
.scribe/endpoints/21.yaml Normal file
View File

@@ -0,0 +1,482 @@
name: Suppliers
description: ''
endpoints:
-
httpMethods:
- GET
uri: api/v1/suppliers/selectlist
metadata:
groupName: Suppliers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: Selectlist
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=XCddlMqcqKqWUTBwJenBf996h9VUAuQn9onGzMNw; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: api/v1/suppliers
metadata:
groupName: Suppliers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'List Suppliers'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters:
search:
name: search
description: 'Search term to filter results.'
required: false
example: Acme
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
name:
name: name
description: 'Filter by exact supplier name.'
required: false
example: 'Acme Corp'
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
address:
name: address
description: 'Filter by exact address.'
required: false
example: '123 Main St'
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
address2:
name: address2
description: 'Filter by exact address2.'
required: false
example: 'Suite 100'
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
city:
name: city
description: 'Filter by exact city.'
required: false
example: Springfield
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
state:
name: state
description: 'Filter by exact state.'
required: false
example: IL
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
zip:
name: zip
description: 'Filter by exact zip code.'
required: false
example: '62701'
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
country:
name: country
description: 'Filter by exact country.'
required: false
example: USA
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
phone:
name: phone
description: 'Filter by exact phone number.'
required: false
example: 555-1234
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
fax:
name: fax
description: 'Filter by exact fax number.'
required: false
example: 555-5678
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
email:
name: email
description: 'Filter by exact email address.'
required: false
example: info@example.org
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
url:
name: url
description: 'Filter by exact URL.'
required: false
example: 'http://example.com'
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
notes:
name: notes
description: 'Filter by exact notes.'
required: false
example: 'This is a note.'
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
sort:
name: sort
description: 'Column to sort results by. Allowed values: id, name, address, address2, city, state, country, zip, phone, contact, fax, email, image, assets_count, licenses_count, accessories_count, components_count, consumables_count, url, notes. Default: created_at.'
required: false
example: name
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
order:
name: order
description: 'Order of sorted results. Allowed values: asc, desc. Default: desc.'
required: false
example: asc
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
offset:
name: offset
description: 'Offset/starting position of the results. Default: 0.'
required: false
example: 0
type: integer
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
limit:
name: limit
description: 'Limit the number of results returned. Default: 25. Maximum: 100.'
required: false
example: 50
type: integer
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
cleanQueryParameters:
search: Acme
name: 'Acme Corp'
address: '123 Main St'
address2: 'Suite 100'
city: Springfield
state: IL
zip: '62701'
country: USA
phone: 555-1234
fax: 555-5678
email: info@example.org
url: 'http://example.com'
notes: 'This is a note.'
sort: name
order: asc
offset: 0
limit: 50
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=R5PUii8mbVR2t8EyWTQHM80dstDyhZxcQR15nKb7; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: api/v1/suppliers
metadata:
groupName: Suppliers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Create Supplier'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/v1/suppliers/{id}'
metadata:
groupName: Suppliers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Show Supplier'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the supplier.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=aqFNCFcjAl7hMG1Q0RCnYmK7HTNWcq0kYhd1R9NN; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- PUT
- PATCH
uri: 'api/v1/suppliers/{id}'
metadata:
groupName: Suppliers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Update Supplier'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the supplier.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/v1/suppliers/{id}'
metadata:
groupName: Suppliers
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Delete Supplier'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
id:
name: id
description: 'The ID of the supplier.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []

1053
.scribe/endpoints/22.yaml Normal file

File diff suppressed because it is too large Load Diff

1117
.scribe/endpoints/23.yaml Normal file

File diff suppressed because it is too large Load Diff

207
.scribe/endpoints/24.yaml Normal file
View File

@@ -0,0 +1,207 @@
name: Reports
description: ''
endpoints:
-
httpMethods:
- GET
uri: api/v1/reports/activity
metadata:
groupName: Reports
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Activity Report'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters:
search:
name: search
description: 'Search term to filter results'
required: false
example: updated
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
target_type:
name: target_type
description: 'Filter by target type'
required: false
example: user
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
target_id:
name: target_id
description: 'Filter by target ID'
required: false
example: 1
type: integer
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
item_type:
name: item_type
description: 'Filter by item type'
required: false
example: asset
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
item_id:
name: item_id
description: 'Filter by item ID'
required: false
example: 1
type: integer
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
action_type:
name: action_type
description: 'Filter by action type'
required: false
example: create
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
created_by:
name: created_by
description: 'Filter by user ID who created the log'
required: false
example: 1
type: integer
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
action_source:
name: action_source
description: 'Filter by action source'
required: false
example: web
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
remote_ip:
name: remote_ip
description: 'Filter by remote IP address Example:'
required: false
example: null
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
uploads:
name: uploads
description: 'Filter to only show logs with file uploads'
required: false
example: true
type: boolean
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
sort:
name: sort
description: 'Column to sort by. Allowed values: id, created_at, target_id, created_by, accept_signature, action_type, note, remote_ip, user_agent, target_type, item_type, action_source, action_date. Default is created_at.'
required: false
example: created_at
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
order:
name: order
description: 'Order of sorting. Allowed values: asc, desc. Default is desc.'
required: false
example: desc
type: string
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
offset:
name: offset
description: 'Number of records to skip for pagination. Default is 0.'
required: false
example: 0
type: integer
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
limit:
name: limit
description: 'Maximum number of records to return. Default is 25.'
required: false
example: 25
type: integer
enumValues: []
exampleWasSpecified: true
nullable: false
custom: []
cleanQueryParameters:
search: updated
target_type: user
target_id: 1
item_type: asset
item_id: 1
action_type: create
created_by: 1
action_source: web
uploads: true
sort: created_at
order: desc
offset: 0
limit: 25
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=Q7c7iu2qi9Mil7UrdGdQhd5UHhMHwIs9J7wKxvhY; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []

54
.scribe/endpoints/25.yaml Normal file
View File

@@ -0,0 +1,54 @@
name: Misc
description: ''
endpoints:
-
httpMethods:
- GET
uri: api/v1/version
metadata:
groupName: Misc
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Version API routes'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters: []
cleanUrlParameters: []
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=4opUPyEuZlodDlaWWG7JNFN7lCuHNMim1KxZHPur; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=719999; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []

285
.scribe/endpoints/26.yaml Normal file
View File

@@ -0,0 +1,285 @@
name: Files
description: ''
endpoints:
-
httpMethods:
- GET
uri: 'api/v1/{object_type}/{id}/files'
metadata:
groupName: Files
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'List Files for an Object'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
object_type:
name: object_type
description: ''
required: true
example: accessories|assets|components|consumables|hardware|licenses|locations|maintenances|models|users
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
id:
name: id
description: 'The ID of the {object type}.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
object_type: accessories|assets|components|consumables|hardware|licenses|locations|maintenances|models|users
id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=HfR9HTwK8SuIGE2OuiaImTbUpBhp1HtUBHMeilHy; expires=Sat, 18 Oct 2025 20:42:53 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- GET
uri: 'api/v1/{object_type}/{id}/files/{file_id}'
metadata:
groupName: Files
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Display File'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
object_type:
name: object_type
description: ''
required: true
example: accessories|assets|components|consumables|hardware|licenses|locations|maintenances|models|users
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
id:
name: id
description: 'The ID of the {object type}.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
file_id:
name: file_id
description: 'The ID of the file.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
object_type: accessories|assets|components|consumables|hardware|licenses|locations|maintenances|models|users
id: architecto
file_id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses:
-
status: 401
content: '{"error":"Unauthorized or unauthenticated."}'
headers:
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
content-type: application/json
vary: Origin
pragma: no-cache
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
x-content-type-options: nosniff
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
referrer-policy: same-origin
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
set-cookie: 'snipe-dev_local=N688uqN5BWG2WKvT3v6TxAJAl1Il05lzaTycQ40x; expires=Sat, 18 Oct 2025 20:42:53 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
description: null
custom: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- POST
uri: 'api/v1/{object_type}/{id}/files'
metadata:
groupName: Files
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Upload File to an Object'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
object_type:
name: object_type
description: ''
required: true
example: accessories|assets|components|consumables|hardware|licenses|locations|maintenances|models|users
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
id:
name: id
description: 'The ID of the {object type}.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
object_type: accessories|assets|components|consumables|hardware|licenses|locations|maintenances|models|users
id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []
-
httpMethods:
- DELETE
uri: 'api/v1/{object_type}/{id}/files/{file_id}/delete'
metadata:
groupName: Files
groupDescription: ''
subgroup: ''
subgroupDescription: ''
title: 'Delete File'
description: ''
authenticated: true
deprecated: false
custom: []
headers:
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
Content-Type: application/json
Accept: application/json
urlParameters:
object_type:
name: object_type
description: ''
required: true
example: accessories|assets|components|consumables|hardware|licenses|locations|maintenances|models|users
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
id:
name: id
description: 'The ID of the {object type}.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
file_id:
name: file_id
description: 'The ID of the file.'
required: true
example: architecto
type: string
enumValues: []
exampleWasSpecified: false
nullable: false
custom: []
cleanUrlParameters:
object_type: accessories|assets|components|consumables|hardware|licenses|locations|maintenances|models|users
id: architecto
file_id: architecto
queryParameters: []
cleanQueryParameters: []
bodyParameters: []
cleanBodyParameters: []
fileParameters: []
responses: []
responseFields: []
auth:
- headers
- Authorization
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
controller: null
method: null
route: null
custom: []

View File

@@ -0,0 +1,53 @@
# To include an endpoint that isn't a part of your Laravel app (or belongs to a vendor package),
# you can define it in a custom.*.yaml file, like this one.
# Each custom file should contain an array of endpoints. Here's an example:
# See https://scribe.knuckles.wtf/laravel/documenting/custom-endpoints#extra-sorting-groups-in-custom-endpoint-files for more options
#- httpMethods:
# - POST
# uri: api/doSomething/{param}
# metadata:
# groupName: The group the endpoint belongs to. Can be a new group or an existing group.
# groupDescription: A description for the group. You don't need to set this for every endpoint; once is enough.
# subgroup: You can add a subgroup, too.
# title: Do something
# description: 'This endpoint allows you to do something.'
# authenticated: false
# headers:
# Content-Type: application/json
# Accept: application/json
# urlParameters:
# param:
# name: param
# description: A URL param for no reason.
# required: true
# example: 2
# type: integer
# queryParameters:
# speed:
# name: speed
# description: How fast the thing should be done. Can be `slow` or `fast`.
# required: false
# example: fast
# type: string
# bodyParameters:
# something:
# name: something
# description: The things we should do.
# required: true
# example:
# - string 1
# - string 2
# type: 'string[]'
# responses:
# - status: 200
# description: 'When the thing was done smoothly.'
# content: # Your response content can be an object, an array, a string or empty.
# {
# "hey": "ho ho ho"
# }
# responseFields:
# hey:
# name: hey
# description: Who knows?
# type: string # This is optional

11
.scribe/intro.md Normal file
View File

@@ -0,0 +1,11 @@
# Introduction
This documentation aims to provide the information you need to work with the Snipe-IT JSON REST API.
<aside>
<strong>Base URL</strong>: <code>https://snipe-it.test/api/v1</code>
</aside>
<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>

View File

@@ -52,7 +52,7 @@ Thanks goes to all of these wonderful people ([emoji key](https://github.com/ken
| [<img src="https://avatars.githubusercontent.com/u/2565989?v=4" width="110px;"/><br /><sub>coach1988</sub>](https://github.com/coach1988)<br />[💻](https://github.com/snipe/snipe-it/commits?author=coach1988 "Code") | [<img src="https://avatars.githubusercontent.com/u/11910225?v=4" width="110px;"/><br /><sub>MrM</sub>](https://github.com/mauro-miatello)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mauro-miatello "Code") | [<img src="https://avatars.githubusercontent.com/u/60405354?v=4" width="110px;"/><br /><sub>koiakoia</sub>](https://github.com/koiakoia)<br />[💻](https://github.com/snipe/snipe-it/commits?author=koiakoia "Code") | [<img src="https://avatars.githubusercontent.com/u/5323832?v=4" width="110px;"/><br /><sub>Mustafa Online</sub>](https://github.com/mustafa-online)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mustafa-online "Code") | [<img src="https://avatars.githubusercontent.com/u/104601439?v=4" width="110px;"/><br /><sub>franceslui</sub>](https://github.com/franceslui)<br />[💻](https://github.com/snipe/snipe-it/commits?author=franceslui "Code") | [<img src="https://avatars.githubusercontent.com/u/125313163?v=4" width="110px;"/><br /><sub>Q4kK</sub>](https://github.com/Q4kK)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Q4kK "Code") | [<img src="https://avatars.githubusercontent.com/u/55590532?v=4" width="110px;"/><br /><sub>squintfox</sub>](https://github.com/squintfox)<br />[💻](https://github.com/snipe/snipe-it/commits?author=squintfox "Code") |
| [<img src="https://avatars.githubusercontent.com/u/1380084?v=4" width="110px;"/><br /><sub>Jeff Clay</sub>](https://github.com/jeffclay)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jeffclay "Code") | [<img src="https://avatars.githubusercontent.com/u/52716446?v=4" width="110px;"/><br /><sub>Phil J R</sub>](https://github.com/PP-JN-RL)<br />[💻](https://github.com/snipe/snipe-it/commits?author=PP-JN-RL "Code") | [<img src="https://avatars.githubusercontent.com/u/1496725?v=4" width="110px;"/><br /><sub>i_virus</sub>](https://www.corelight.com/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=chandanchowdhury "Code") | [<img src="https://avatars.githubusercontent.com/u/1020541?v=4" width="110px;"/><br /><sub>Paul Grime</sub>](https://github.com/gitgrimbo)<br />[💻](https://github.com/snipe/snipe-it/commits?author=gitgrimbo "Code") | [<img src="https://avatars.githubusercontent.com/u/922815?v=4" width="110px;"/><br /><sub>Lee Porte</sub>](https://leeporte.co.uk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=LeePorte "Code") | [<img src="https://avatars.githubusercontent.com/u/23613427?v=4" width="110px;"/><br /><sub>BRYAN </sub>](https://github.com/bryanlopezinc)<br />[💻](https://github.com/snipe/snipe-it/commits?author=bryanlopezinc "Code") [⚠️](https://github.com/snipe/snipe-it/commits?author=bryanlopezinc "Tests") | [<img src="https://avatars.githubusercontent.com/u/64061710?v=4" width="110px;"/><br /><sub>U-H-T</sub>](https://github.com/U-H-T)<br />[💻](https://github.com/snipe/snipe-it/commits?author=U-H-T "Code") |
| [<img src="https://avatars.githubusercontent.com/u/5395363?v=4" width="110px;"/><br /><sub>Matt Tyree</sub>](https://github.com/Tyree)<br />[📖](https://github.com/snipe/snipe-it/commits?author=Tyree "Documentation") | [<img src="https://avatars.githubusercontent.com/u/292081?v=4" width="110px;"/><br /><sub>Florent Bervas</sub>](http://spoontux.net)<br />[💻](https://github.com/snipe/snipe-it/commits?author=FlorentDotMe "Code") | [<img src="https://avatars.githubusercontent.com/u/4498077?v=4" width="110px;"/><br /><sub>Daniel Albertsen</sub>](https://ditscheri.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=dbakan "Code") | [<img src="https://avatars.githubusercontent.com/u/100710244?v=4" width="110px;"/><br /><sub>r-xyz</sub>](https://github.com/r-xyz)<br />[💻](https://github.com/snipe/snipe-it/commits?author=r-xyz "Code") | [<img src="https://avatars.githubusercontent.com/u/47491036?v=4" width="110px;"/><br /><sub>Steven Mainor</sub>](https://github.com/DrekiDegga)<br />[💻](https://github.com/snipe/snipe-it/commits?author=DrekiDegga "Code") | [<img src="https://avatars.githubusercontent.com/u/65785975?v=4" width="110px;"/><br /><sub>arne-kroeger</sub>](https://github.com/arne-kroeger)<br />[💻](https://github.com/snipe/snipe-it/commits?author=arne-kroeger "Code") | [<img src="https://avatars.githubusercontent.com/u/167117705?v=4" width="110px;"/><br /><sub>Glukose1</sub>](https://github.com/Glukose1)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Glukose1 "Code") |
| [<img src="https://avatars.githubusercontent.com/u/1197791?v=4" width="110px;"/><br /><sub>Scarzy</sub>](https://github.com/Scarzy)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Scarzy "Code") | [<img src="https://avatars.githubusercontent.com/u/37372069?v=4" width="110px;"/><br /><sub>setpill</sub>](https://github.com/setpill)<br />[💻](https://github.com/snipe/snipe-it/commits?author=setpill "Code") | [<img src="https://avatars.githubusercontent.com/u/3755203?v=4" width="110px;"/><br /><sub>swift2512</sub>](https://github.com/swift2512)<br />[🐛](https://github.com/snipe/snipe-it/issues?q=author%3Aswift2512 "Bug reports") | [<img src="https://avatars.githubusercontent.com/u/6136439?v=4" width="110px;"/><br /><sub>Darren Rainey</sub>](https://darrenraineys.co.uk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=DarrenRainey "Code") | [<img src="https://avatars.githubusercontent.com/u/133033121?v=4" width="110px;"/><br /><sub>maciej-poleszczyk</sub>](https://github.com/maciej-poleszczyk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=maciej-poleszczyk "Code") | [<img src="https://avatars.githubusercontent.com/u/143394709?v=4" width="110px;"/><br /><sub>Sebastian Groß</sub>](https://github.com/sgross-emlix)<br />[💻](https://github.com/snipe/snipe-it/commits?author=sgross-emlix "Code") | [<img src="https://avatars.githubusercontent.com/u/41107778?v=4" width="110px;"/><br /><sub>Anouar Touati</sub>](https://github.com/AnouarTouati)<br />[💻](https://github.com/snipe/snipe-it/commits?author=AnouarTouati "Code") |
| [<img src="https://avatars.githubusercontent.com/u/1197791?v=4" width="110px;"/><br /><sub>Scarzy</sub>](https://github.com/Scarzy)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Scarzy "Code") | [<img src="https://avatars.githubusercontent.com/u/37372069?v=4" width="110px;"/><br /><sub>setpill</sub>](https://github.com/setpill)<br />[💻](https://github.com/snipe/snipe-it/commits?author=setpill "Code") | [<img src="https://avatars.githubusercontent.com/u/3755203?v=4" width="110px;"/><br /><sub>swift2512</sub>](https://github.com/swift2512)<br />[🐛](https://github.com/snipe/snipe-it/issues?q=author%3Aswift2512 "Bug reports") [💻](https://github.com/snipe/snipe-it/commits?author=swift2512 "Code") | [<img src="https://avatars.githubusercontent.com/u/6136439?v=4" width="110px;"/><br /><sub>Darren Rainey</sub>](https://darrenraineys.co.uk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=DarrenRainey "Code") | [<img src="https://avatars.githubusercontent.com/u/133033121?v=4" width="110px;"/><br /><sub>maciej-poleszczyk</sub>](https://github.com/maciej-poleszczyk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=maciej-poleszczyk "Code") | [<img src="https://avatars.githubusercontent.com/u/143394709?v=4" width="110px;"/><br /><sub>Sebastian Groß</sub>](https://github.com/sgross-emlix)<br />[💻](https://github.com/snipe/snipe-it/commits?author=sgross-emlix "Code") | [<img src="https://avatars.githubusercontent.com/u/41107778?v=4" width="110px;"/><br /><sub>Anouar Touati</sub>](https://github.com/AnouarTouati)<br />[💻](https://github.com/snipe/snipe-it/commits?author=AnouarTouati "Code") |
| [<img src="https://avatars.githubusercontent.com/u/25596663?v=4" width="110px;"/><br /><sub>aHVzY2g</sub>](https://github.com/aHVzY2g)<br />[💻](https://github.com/snipe/snipe-it/commits?author=aHVzY2g "Code") | [<img src="https://avatars.githubusercontent.com/u/13408130?v=4" width="110px;"/><br /><sub>林博仁 Buo-ren Lin</sub>](https://brlin.me)<br />[💻](https://github.com/snipe/snipe-it/commits?author=brlin-tw "Code") | [<img src="https://avatars.githubusercontent.com/u/18550946?v=4" width="110px;"/><br /><sub>Adugna Gizaw</sub>](https://orbalia.pythonanywhere.com/)<br />[🌍](#translation-addex12 "Translation") | [<img src="https://avatars.githubusercontent.com/u/760989?v=4" width="110px;"/><br /><sub>Jesse Ostrander</sub>](https://github.com/jostrander)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jostrander "Code") | [<img src="https://avatars.githubusercontent.com/u/31522486?v=4" width="110px;"/><br /><sub>James M</sub>](https://github.com/azmcnutt)<br />[💻](https://github.com/snipe/snipe-it/commits?author=azmcnutt "Code") | [<img src="https://avatars.githubusercontent.com/u/5183146?v=4" width="110px;"/><br /><sub>Fiala06</sub>](https://github.com/Fiala06)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Fiala06 "Code") | [<img src="https://avatars.githubusercontent.com/u/28693782?v=4" width="110px;"/><br /><sub>Nathan Taylor</sub>](https://github.com/ntaylor-86)<br />[💻](https://github.com/snipe/snipe-it/commits?author=ntaylor-86 "Code") |
| [<img src="https://avatars.githubusercontent.com/u/16699443?v=4" width="110px;"/><br /><sub>fvollmer</sub>](https://github.com/fvollmer)<br />[💻](https://github.com/snipe/snipe-it/commits?author=fvollmer "Code") | [<img src="https://avatars.githubusercontent.com/u/109086466?v=4" width="110px;"/><br /><sub>36864</sub>](https://github.com/36864)<br />[💻](https://github.com/snipe/snipe-it/commits?author=36864 "Code") | [<img src="https://avatars.githubusercontent.com/u/365751?v=4" width="110px;"/><br /><sub>Daniel O'Connor</sub>](http://clockwerx.blogspot.com/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=CloCkWeRX "Code") | [<img src="https://avatars.githubusercontent.com/u/102852568?v=4" width="110px;"/><br /><sub>BeatSpark</sub>](https://github.com/BeatSpark)<br />[💻](https://github.com/snipe/snipe-it/commits?author=BeatSpark "Code") | [<img src="https://avatars.githubusercontent.com/u/59203607?v=4" width="110px;"/><br /><sub>mrdahbi</sub>](https://github.com/mrdahbi)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mrdahbi "Code") | [<img src="https://avatars.githubusercontent.com/u/6661332?v=4" width="110px;"/><br /><sub>Fabian Schmid</sub>](http://sr.solutions)<br />[💻](https://github.com/snipe/snipe-it/commits?author=chfsx "Code") | [<img src="https://avatars.githubusercontent.com/u/1288116?v=4" width="110px;"/><br /><sub>Chris Olin</sub>](https://www.chrisolin.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=realchrisolin "Code") |
| [<img src="https://avatars.githubusercontent.com/u/3803132?v=4" width="110px;"/><br /><sub>Dan</sub>](https://github.com/mnemonicly)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mnemonicly "Code") | [<img src="https://avatars.githubusercontent.com/u/43917728?v=4" width="110px;"/><br /><sub>Nebel</sub>](https://github.com/NebelKreis)<br />[💻](https://github.com/snipe/snipe-it/commits?author=NebelKreis "Code") | [<img src="https://avatars.githubusercontent.com/u/132433803?v=4" width="110px;"/><br /><sub>test1337ahp</sub>](https://github.com/test1337ahp)<br />[💻](https://github.com/snipe/snipe-it/commits?author=test1337ahp "Code") | [<img src="https://avatars.githubusercontent.com/u/1916566?v=4" width="110px;"/><br /><sub>Jonathon Reinhart</sub>](https://github.com/JonathonReinhart)<br />[💻](https://github.com/snipe/snipe-it/commits?author=JonathonReinhart "Code") | [<img src="https://avatars.githubusercontent.com/u/484742?v=4" width="110px;"/><br /><sub>aranar-pro</sub>](https://github.com/aranar-pro)<br />[💻](https://github.com/snipe/snipe-it/commits?author=aranar-pro "Code") | [<img src="https://avatars.githubusercontent.com/u/27019397?v=4" width="110px;"/><br /><sub>Phil</sub>](https://github.com/phil-flip)<br />[💻](https://github.com/snipe/snipe-it/commits?author=phil-flip "Code") | [<img src="https://avatars.githubusercontent.com/u/6473460?v=4" width="110px;"/><br /><sub>Steffy Fort</sub>](https://fe80.fr/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=fe80 "Code") |
@@ -68,6 +68,7 @@ Thanks goes to all of these wonderful people ([emoji key](https://github.com/ken
| [<img src="https://avatars.githubusercontent.com/u/181059?v=4" width="110px;"/><br /><sub>Juan Font</sub>](https://github.com/juanfont)<br />[💻](https://github.com/snipe/snipe-it/commits?author=juanfont "Code") | [<img src="https://avatars.githubusercontent.com/u/13137708?v=4" width="110px;"/><br /><sub>Juho Taipale</sub>](https://github.com/juhotaipale)<br />[💻](https://github.com/snipe/snipe-it/commits?author=juhotaipale "Code") | [<img src="https://avatars.githubusercontent.com/u/1007419?v=4" width="110px;"/><br /><sub>Korvin Szanto</sub>](https://github.com/KorvinSzanto)<br />[💻](https://github.com/snipe/snipe-it/commits?author=KorvinSzanto "Code") | [<img src="https://avatars.githubusercontent.com/u/8513053?v=4" width="110px;"/><br /><sub>Lewis Foster</sub>](https://lewisfoster.foo/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=sniff122 "Code") | [<img src="https://avatars.githubusercontent.com/u/33877541?v=4" width="110px;"/><br /><sub>Logan Swartzendruber</sub>](https://github.com/loganswartz)<br />[💻](https://github.com/snipe/snipe-it/commits?author=loganswartz "Code") | [<img src="https://avatars.githubusercontent.com/u/1156208?v=4" width="110px;"/><br /><sub>Lorenzo P.</sub>](https://github.com/lopezio)<br />[💻](https://github.com/snipe/snipe-it/commits?author=lopezio "Code") | [<img src="https://avatars.githubusercontent.com/u/33946590?v=4" width="110px;"/><br /><sub>Lukas Jung</sub>](https://github.com/m4us1ne)<br />[💻](https://github.com/snipe/snipe-it/commits?author=m4us1ne "Code") |
| [<img src="https://avatars.githubusercontent.com/u/10965027?v=4" width="110px;"/><br /><sub>Ellie</sub>](https://leafedfox.xyz/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=LeafedFox "Code") | [<img src="https://avatars.githubusercontent.com/u/20960555?v=4" width="110px;"/><br /><sub>GA Stamper</sub>](https://github.com/gastamper)<br />[💻](https://github.com/snipe/snipe-it/commits?author=gastamper "Code") | [<img src="https://avatars.githubusercontent.com/u/206553556?v=4" width="110px;"/><br /><sub>Guillaume Lefranc</sub>](https://github.com/gl-pup)<br />[💻](https://github.com/snipe/snipe-it/commits?author=gl-pup "Code") | [<img src="https://avatars.githubusercontent.com/u/733892?v=4" width="110px;"/><br /><sub>Hajo Möller</sub>](https://github.com/dasjoe)<br />[💻](https://github.com/snipe/snipe-it/commits?author=dasjoe "Code") | [<img src="https://avatars.githubusercontent.com/u/3420063?v=4" width="110px;"/><br /><sub>Istvan Basa</sub>](https://github.com/pottom)<br />[💻](https://github.com/snipe/snipe-it/commits?author=pottom "Code") | [<img src="https://avatars.githubusercontent.com/u/810824?v=4" width="110px;"/><br /><sub>JJ Asghar</sub>](https://jjasghar.github.io/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jjasghar "Code") | [<img src="https://avatars.githubusercontent.com/u/40404495?v=4" width="110px;"/><br /><sub>James E. Msenga</sub>](https://github.com/JemCdo)<br />[💻](https://github.com/snipe/snipe-it/commits?author=JemCdo "Code") |
| [<img src="https://avatars.githubusercontent.com/u/6865786?v=4" width="110px;"/><br /><sub>Jan Felix Wiebe</sub>](https://github.com/jfwiebe)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jfwiebe "Code") | [<img src="https://avatars.githubusercontent.com/u/43412008?v=4" width="110px;"/><br /><sub>Jo Drexl</sub>](https://www.nfon.com/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=drexljo "Code") | [<img src="https://avatars.githubusercontent.com/u/4807843?v=4" width="110px;"/><br /><sub>Austin Sasko</sub>](https://github.com/austinsasko)<br />[💻](https://github.com/snipe/snipe-it/commits?author=austinsasko "Code") | [<img src="https://avatars.githubusercontent.com/u/4875039?v=4" width="110px;"/><br /><sub>Jasson</sub>](http://jassoncordones.github.io)<br />[💻](https://github.com/snipe/snipe-it/commits?author=JassonCordones "Code") | [<img src="https://avatars.githubusercontent.com/u/76069640?v=4" width="110px;"/><br /><sub>Okean</sub>](https://github.com/Tinyblargon)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Tinyblargon "Code") | [<img src="https://avatars.githubusercontent.com/u/6515064?v=4" width="110px;"/><br /><sub>Alejandro Medrano</sub>](https://www.lst.tfo.upm.es/alejandro-medrano/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=amedranogil "Code") | [<img src="https://avatars.githubusercontent.com/u/58696401?v=4" width="110px;"/><br /><sub>Lukas Kraic</sub>](https://github.com/lukaskraic)<br />[💻](https://github.com/snipe/snipe-it/commits?author=lukaskraic "Code") |
| [<img src="https://avatars.githubusercontent.com/u/1571724?v=4" width="110px;"/><br /><sub>Герхард PICCORO Lenz McKAY </sub>](https://github-readme-stats.vercel.app/api?username=mckaygerhard)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mckaygerhard "Code") | [<img src="https://avatars.githubusercontent.com/u/15015119?v=4" width="110px;"/><br /><sub>Johannes Pollitt</sub>](https://github.com/FlorestanII)<br />[💻](https://github.com/snipe/snipe-it/commits?author=FlorestanII "Code") | [<img src="https://avatars.githubusercontent.com/u/14185442?v=4" width="110px;"/><br /><sub>Michael Strobel</sub>](https://strobelm.de)<br />[💻](https://github.com/snipe/snipe-it/commits?author=strobelm "Code") | [<img src="https://avatars.githubusercontent.com/u/634790?v=4" width="110px;"/><br /><sub>Nicky West</sub>](http://nickwest.me)<br />[💻](https://github.com/snipe/snipe-it/commits?author=nickwest "Code") | [<img src="https://avatars.githubusercontent.com/u/1347327?v=4" width="110px;"/><br /><sub>akaspeh1</sub>](https://github.com/akaspeh1)<br />[💻](https://github.com/snipe/snipe-it/commits?author=akaspeh1 "Code") |
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!

View File

@@ -0,0 +1,74 @@
<?php
namespace App\Console\Commands;
use App\Models\CheckoutRequest;
use Illuminate\Console\Command;
class CleanOldCheckoutRequests extends Command
{
private int $deletions = 0;
private int $skips = 0;
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'snipeit:clean-old-checkout-requests';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Removes checkout requests that reference deleted assets or users.';
/**
* Execute the console command.
*/
public function handle()
{
$requests = CheckoutRequest::with([
'user' => function ($query) {
$query->withTrashed();
},
'requestedItem' => function ($query) {
$query->withTrashed();
},
])->get();
$this->info("Processing {$requests->count()} checkout requests");
$this->withProgressBar($requests, function ($request) {
if ($this->shouldForceDelete($request)) {
$request->forceDelete();
$this->deletions++;
return;
}
if ($this->shouldSoftDelete($request)) {
$request->delete();
$this->deletions++;
return;
}
$this->skips++;
});
$this->info("Final deletion count: $this->deletions, and skip count: $this->skips");
return 0;
}
private function shouldForceDelete(CheckoutRequest $request)
{
// check if the requestable or user relationship is null
return !$request->requestable || !$request->user;
}
private function shouldSoftDelete(CheckoutRequest $request)
{
return $request->requestable->trashed() || $request->user->trashed();
}
}

View File

@@ -55,6 +55,8 @@ class LdapSync extends Command
ini_set('max_execution_time', env('LDAP_TIME_LIM', 600)); //600 seconds = 10 minutes
ini_set('memory_limit', env('LDAP_MEM_LIM', '500M'));
// Map the LDAP attributes to the Snipe-IT user fields.
$ldap_map = [
"username" => Setting::getSettings()->ldap_username_field,
"last_name" => Setting::getSettings()->ldap_lname_field,
@@ -63,11 +65,17 @@ class LdapSync extends Command
"emp_num" => Setting::getSettings()->ldap_emp_num,
"email" => Setting::getSettings()->ldap_email,
"phone" => Setting::getSettings()->ldap_phone_field,
"mobile" => Setting::getSettings()->ldap_mobile,
"jobtitle" => Setting::getSettings()->ldap_jobtitle,
"address" => Setting::getSettings()->ldap_address,
"city" => Setting::getSettings()->ldap_city,
"state" => Setting::getSettings()->ldap_state,
"zip" => Setting::getSettings()->ldap_zip,
"country" => Setting::getSettings()->ldap_country,
"location" => Setting::getSettings()->ldap_location,
"dept" => Setting::getSettings()->ldap_dept,
"manager" => Setting::getSettings()->ldap_manager,
"display_name" => Setting::getSettings()->ldap_display_name,
];
$ldap_default_group = Setting::getSettings()->ldap_default_group;
@@ -234,9 +242,11 @@ class LdapSync extends Command
}
// Assign the mapped LDAP attributes for each user to the Snipe-IT user fields
for ($i = 0; $i < $results['count']; $i++) {
$item = [];
$item['username'] = $results[$i][$ldap_map["username"]][0] ?? '';
$item['display_name'] = $results[$i][$ldap_map["display_name"]][0] ?? '';
$item['employee_number'] = $results[$i][$ldap_map["emp_num"]][0] ?? '';
$item['lastname'] = $results[$i][$ldap_map["last_name"]][0] ?? '';
$item['firstname'] = $results[$i][$ldap_map["first_name"]][0] ?? '';
@@ -244,8 +254,13 @@ class LdapSync extends Command
$item['ldap_location_override'] = $results[$i]['ldap_location_override'] ?? '';
$item['location_id'] = $results[$i]['location_id'] ?? '';
$item['telephone'] = $results[$i][$ldap_map["phone"]][0] ?? '';
$item['mobile'] = $results[$i][$ldap_map["mobile"]][0] ?? '';
$item['jobtitle'] = $results[$i][$ldap_map["jobtitle"]][0] ?? '';
$item['address'] = $results[$i][$ldap_map["address"]][0] ?? '';
$item['city'] = $results[$i][$ldap_map["city"]][0] ?? '';
$item['state'] = $results[$i][$ldap_map["state"]][0] ?? '';
$item['country'] = $results[$i][$ldap_map["country"]][0] ?? '';
$item['zip'] = $results[$i][$ldap_map["zip"]][0] ?? '';
$item['department'] = $results[$i][$ldap_map["dept"]][0] ?? '';
$item['manager'] = $results[$i][$ldap_map["manager"]][0] ?? '';
$item['location'] = $results[$i][$ldap_map["location"]][0] ?? '';
@@ -278,6 +293,9 @@ class LdapSync extends Command
if($ldap_map["username"] != null){
$user->username = $item['username'];
}
if($ldap_map["display_name"] != null){
$user->display_name = $item['display_name'];
}
if($ldap_map["last_name"] != null){
$user->last_name = $item['lastname'];
}
@@ -293,6 +311,9 @@ class LdapSync extends Command
if($ldap_map["phone"] != null){
$user->phone = $item['telephone'];
}
if($ldap_map["mobile"] != null){
$user->mobile = $item['mobile'];
}
if($ldap_map["jobtitle"] != null){
$user->jobtitle = $item['jobtitle'];
}

View File

@@ -6,6 +6,7 @@ use Illuminate\Console\Command;
use App\Models\Setting;
use Exception;
use Illuminate\Support\Facades\Crypt;
use App\Models\Ldap;
/**
* Check if a given ip is in a network
@@ -160,7 +161,15 @@ class LdapTroubleshooter extends Command
$output[] = "-x";
$output[] = "-b ".escapeshellarg($settings->ldap_basedn);
$output[] = "-D ".escapeshellarg($settings->ldap_uname);
$output[] = "-w ".escapeshellarg(Crypt::Decrypt($settings->ldap_pword));
try {
$w = Crypt::Decrypt($settings->ldap_pword);
} catch (\Exception $e) {
$this->warn("Could not decrypt password. This usually means an LDAP password was not set or the APP_KEY was changed since the LDAP pasword was last saved. Aborting.");
exit(0);
}
$output[] = "-w ". escapeshellarg($w);
$output[] = escapeshellarg(parenthesized_filter($settings->ldap_filter));
if($settings->ldap_tls) {
$this->line("# adding STARTTLS option");
@@ -171,6 +180,23 @@ class LdapTroubleshooter extends Command
$this->line(implode(" \\\n",$output));
exit(0);
}
//PHP Version check for warning
$php_version = phpversion();
list($major, $minor, $patch) = explode('.', $php_version);
if (
$major < 8 ||
($major == 8 && $minor < 3) ||
($major == 8 && $minor == 3 && $patch < 21) ||
($major == 8 && $minor == 4 && $patch < 7)
) {
$this->warn("PHP Version: $php_version WARNING - Versions before 8.3.21 or 8.4.7 will return INCONSISTENT results!");
if (!$this->confirm("Are you sure you wish to continue?")) {
$this->warn("ABORTING");
exit(-1);
}
}
if(!$this->option('force')) {
$confirmation = $this->confirm('WARNING: This command will make several attempts to connect to your LDAP server. Are you sure this is ok?');
if(!$confirmation) {
@@ -179,7 +205,7 @@ class LdapTroubleshooter extends Command
}
}
//$this->line(print_r($settings,true));
$this->info("STAGE 1: Checking settings");
$this->line("STAGE 1: Checking settings");
if(!$settings->ldap_enabled) {
$this->error("WARNING: Snipe-IT's LDAP setting is not turned on. (That may be OK if you're still trying to figure out settings)");
}
@@ -210,32 +236,40 @@ class LdapTroubleshooter extends Command
$this->info("Determined LDAP hostname to be: ".$parsed['host']);
}
$this->info("Performing DNS lookup of: ".$parsed['host']);
$ips = dns_get_record($parsed['host']);
$raw_ips = [];
if (inet_pton($parsed['host']) !== false) {
$this->line($parsed['host'] . " already looks like an address; skipping DNS lookup");
$raw_ips[] = $parsed['host'];
} else {
$this->line("Performing DNS lookup of: " . $parsed['host']);
$ips = dns_get_record($parsed['host']);
//$this->info("Host IP is: ".print_r($ips,true));
if(!$ips || count($ips) == 0) {
$this->error("ERROR: DNS lookup of host: ".$parsed['host']." has failed. ABORTING.");
if (!$ips || count($ips) == 0) {
$this->error("ERROR: DNS lookup of host: " . $parsed['host'] . " has failed. ABORTING.");
exit(-1);
}
$this->debugout("IP's? ".print_r($ips,true));
foreach($ips as $ip) {
if(!isset($ip['ip'])) {
$this->debugout("IP's? " . print_r($ips, true));
foreach ($ips as $ip) {
if (!isset($ip['ip'])) {
continue;
}
$raw_ips[]=$ip['ip'];
if($ip['ip'] == "127.0.0.1") {
$raw_ips[] = $ip['ip'];
}
}
foreach ($raw_ips as $ip) {
if ($ip == "127.0.0.1") {
$this->error("WARNING: Using the localhost IP as the LDAP server. This is usually wrong");
}
if(ip_in_range($ip['ip'],'10.0.0.0/8') || ip_in_range($ip['ip'],'192.168.0.0/16') || ip_in_range($ip['ip'], '172.16.0.0/12')) {
if (ip_in_range($ip, '10.0.0.0/8') || ip_in_range($ip, '192.168.0.0/16') || ip_in_range($ip, '172.16.0.0/12')) {
$this->error("WARNING: Using an RFC1918 Private address for LDAP server. This may be correct, but it can be a problem if your Snipe-IT instance is not hosted on your private network");
}
}
$this->info("STAGE 2: Checking basic network connectivity");
$ports = [389,636];
$this->line("STAGE 2: Checking basic network connectivity");
$ports = [636, 389];
if(@$parsed['port'] && !in_array($parsed['port'],$ports)) {
$ports[] = $parsed['port'];
}
@@ -246,7 +280,7 @@ class LdapTroubleshooter extends Command
$errstr = '';
$timeout = 30.0;
$result = '';
$this->info("Attempting to connect to port: ".$port." - may take up to $timeout seconds");
$this->line("Attempting to connect to port: " . $port . " - may take up to $timeout seconds");
try {
$result = fsockopen($parsed['host'], $port, $errno, $errstr, 30.0);
} catch(Exception $e) {
@@ -265,9 +299,9 @@ class LdapTroubleshooter extends Command
exit(-1);
}
$this->info("STAGE 3: Determine encryption algorithm, if any");
$this->line("STAGE 3: Determine encryption algorithm, if any");
$ldap_urls = [];
$ldap_urls = []; // [url, cert-check?, start_tls?]
$pretty_ldap_urls = [];
foreach($open_ports as $port) {
$this->line("Trying TLS first for port $port");
@@ -275,35 +309,46 @@ class LdapTroubleshooter extends Command
if($this->test_anonymous_bind($ldap_url)) {
$this->info("Anonymous bind succesful to $ldap_url!");
$ldap_urls[] = [ $ldap_url, true, false ];
$pretty_ldap_urls[] = [ $ldap_url, "YES", "no" ];
$pretty_ldap_urls[] = [$ldap_url, "enabled", "n/a (no)"];
continue; // TODO - lots of copypasta in these if(test_anonymous_bind()) routines...
} else {
$this->error("WARNING: Failed to bind to $ldap_url - trying without certificate checks.");
}
if($this->test_anonymous_bind($ldap_url, false)) {
$this->info("Anonymous bind succesful to $ldap_url with certifcate-checks disabled");
$ldap_urls[] = [ $ldap_url, false, false ];
$pretty_ldap_urls[] = [ $ldap_url, "no", "no" ];
$this->info("Anonymous bind successful to $ldap_url with certificate-checks disabled");
$ldap_urls[] = [$ldap_url, false, false];
$pretty_ldap_urls[] = [$ldap_url, "DISABLED", "n/a (no)"];
continue;
} else {
$this->error("WARNING: Failed to bind to $ldap_url with certificate checks disabled. Trying unencrypted with STARTTLS");
}
// now switching to ldap:// URL's from ldaps://
$ldap_url = "ldap://".$parsed['host'].":$port";
if($this->test_anonymous_bind($ldap_url, true, true)) {
$this->info("Plain connection to $ldap_url with STARTTLS succesful!");
$ldap_urls[] = [ $ldap_url, true, true ];
$pretty_ldap_urls[] = [ $ldap_url, "YES", "YES" ];
$pretty_ldap_urls[] = [$ldap_url, "enabled", "STARTTLS ENABLED"];
continue;
} else {
$this->error("WARNING: Failed to bind to $ldap_url with STARTTLS enabled. Trying without STARTTLS");
$this->error("WARNING: Failed to bind to $ldap_url with STARTTLS enabled. Trying without certificate checks.");
}
if ($this->test_anonymous_bind($ldap_url, false, true)) {
$this->info("Plain connection to $ldap_url with STARTTLS and cert checks *disabled* successful!");
$ldap_urls[] = [$ldap_url, false, true];
$pretty_ldap_urls[] = [$ldap_url, "DISABLED", "STARTTLS ENABLED"];
continue;
} else {
$this->error("WARNING: Failed to bind to $ldap_url with STARTTLS enabled, and cert checks disabled. Trying without STARTTLS");
}
if($this->test_anonymous_bind($ldap_url)) {
$this->info("Plain connection to $ldap_url succesful!");
$ldap_urls[] = [ $ldap_url, true, false ];
$pretty_ldap_urls[] = [ $ldap_url, "YES", "no" ];
$pretty_ldap_urls[] = [$ldap_url, "n/a", "starttls disabled"];
continue;
} else {
$this->error("WARNING: Failed to bind to $ldap_url. Giving up on port $port");
@@ -313,23 +358,29 @@ class LdapTroubleshooter extends Command
$this->debugout(print_r($ldap_urls,true));
if(count($ldap_urls) > 0 ) {
$this->info("Found working LDAP URL's: ");
$this->debugout("Found working LDAP URL's: ");
foreach($ldap_urls as $ldap_url) { // TODO maybe do this as a $this->table() instead?
$this->info("LDAP URL: ".$ldap_url[0]);
$this->info($ldap_url[0]. ($ldap_url[1] ? " certificate checks enabled" : " certificate checks disabled"). ($ldap_url[2] ? " STARTTLS Enabled ": " STARTTLS Disabled"));
$this->debugout("LDAP URL: " . $ldap_url[0]);
$this->debugout($ldap_url[0] . ($ldap_url[1] ? " certificate checks enabled" : " certificate checks disabled") . ($ldap_url[2] ? " STARTTLS Enabled " : " STARTTLS Disabled"));
}
$this->table(["URL", "Cert Checks Enabled?", "STARTTLS Enabled?"],$pretty_ldap_urls);
$this->table(["URL", "Cert Checks?", "STARTTLS?"], $pretty_ldap_urls);
} else {
$this->error("ERROR - no valid LDAP URL's available - ABORTING");
exit(1);
}
$this->info("STAGE 4: Test Administrative Bind for LDAP Sync");
$this->line("STAGE 4: Test Administrative Bind for LDAP Sync");
foreach($ldap_urls AS $ldap_url) {
$this->test_authed_bind($ldap_url[0], $ldap_url[1], $ldap_url[2], $settings->ldap_uname, Crypt::decrypt($settings->ldap_pword));
try {
$w = Crypt::Decrypt($settings->ldap_pword);
} catch (\Exception $e) {
$this->warn("Could not decrypt password. This usually means an LDAP password was not set or the APP_KEY was changed since the LDAP pasword was last saved. Aborting.");
exit(0);
}
$this->test_authed_bind($ldap_url[0], $ldap_url[1], $ldap_url[2], $settings->ldap_uname, $w);
}
$this->info("STAGE 5: Test BaseDN");
$this->line("STAGE 5: Test BaseDN");
//grab all LDAP_ constants and fill up a reversed array mapping from weird LDAP dotted-strings to (Constant Name)
$all_defined_constants = get_defined_constants();
$ldap_constants = [];
@@ -341,16 +392,23 @@ class LdapTroubleshooter extends Command
$this->debugout("LDAP constants are: ".print_r($ldap_constants,true));
foreach($ldap_urls AS $ldap_url) {
if($this->test_informational_bind($ldap_url[0],$ldap_url[1],$ldap_url[2],$settings->ldap_uname,Crypt::decrypt($settings->ldap_pword),$settings)) {
try {
$w = Crypt::Decrypt($settings->ldap_pword);
} catch (\Exception $e) {
$this->warn("Could not decrypt password. This usually means an LDAP password was not set or the APP_KEY was changed since the LDAP pasword was last saved. Aborting.");
exit(0);
}
if($this->test_informational_bind($ldap_url[0],$ldap_url[1],$ldap_url[2],$settings->ldap_uname,$w,$settings)) {
$this->info("Success getting informational bind!");
} else {
$this->error("Unable to get information from bind.");
}
}
$this->info("STAGE 6: Test LDAP Login to Snipe-IT");
$this->line("STAGE 6: Test LDAP Login to Snipe-IT");
foreach($ldap_urls AS $ldap_url) {
$this->info("Starting auth to ".$ldap_url[0]);
$this->line("Starting auth to " . $ldap_url[0]);
while(true) {
$with_tls = $ldap_url[1] ? "with": "without";
$with_startssl = $ldap_url[2] ? "using": "not using";
@@ -359,7 +417,12 @@ class LdapTroubleshooter extends Command
}
$username = $this->ask("Username");
$password = $this->secret("Password");
$this->test_authed_bind($ldap_url[0], $ldap_url[1], $ldap_url[2], $username, $password); // FIXME - should do some other stuff here, maybe with the concatenating or something? maybe? and/or should put up some results?
$results = $this->test_authed_bind($ldap_url[0], $ldap_url[1], $ldap_url[2], $username, $password); // FIXME - should do some other stuff here, maybe with the concatenating or something? maybe? and/or should put up some results?
if ($results) {
$this->info("Success authenticating with " . $username);
} else {
$this->error("Unable to authenticate with " . $username);
}
}
}
@@ -368,14 +431,17 @@ class LdapTroubleshooter extends Command
public function connect_to_ldap($ldap_url, $check_cert, $start_tls)
{
if ($check_cert) {
$this->line("we *ARE* checking certs");
Ldap::ignoreCertificates(false);
} else {
$this->line("we are IGNORING certs");
Ldap::ignoreCertificates(true);
}
$lconn = ldap_connect($ldap_url);
ldap_set_option($lconn, LDAP_OPT_PROTOCOL_VERSION, 3); // should we 'test' different protocol versions here? Does anyone even use anything other than LDAPv3?
// no - it's formally deprecated: https://tools.ietf.org/html/rfc3494
if(!$check_cert) {
putenv('LDAPTLS_REQCERT=never'); // This is horrible; is this *really* the only way to do it?
} else {
putenv('LDAPTLS_REQCERT'); // have to very explicitly and manually *UN* set the env var here to ensure it works
}
if($this->settings->ldap_client_tls_cert && $this->settings->ldap_client_tls_key) {
// client-side TLS certificate support for LDAP (Google Secure LDAP)
putenv('LDAPTLS_CERT=storage/ldap_client_tls.cert');
@@ -404,9 +470,10 @@ class LdapTroubleshooter extends Command
return $this->timed_boolean_execute(function () use ($ldap_url, $check_cert , $start_tls) {
try {
$lconn = $this->connect_to_ldap($ldap_url, $check_cert, $start_tls);
$this->info("gonna try to bind now, this can take a while if we mess it up");
$this->line("Attempting to bind now, this can take a while if we mess it up");
$bind_results = ldap_bind($lconn);
$this->info("Bind results are: ".$bind_results." which translate into boolean: ".(bool)$bind_results);
$this->line("Bind results are: " . $bind_results . " which translate into boolean: " . (bool)$bind_results);
ldap_close($lconn);
return (bool)$bind_results;
} catch (Exception $e) {
$this->error("WARNING: Exception caught during bind - ".$e->getMessage());
@@ -421,6 +488,7 @@ class LdapTroubleshooter extends Command
try {
$lconn = $this->connect_to_ldap($ldap_url, $check_cert, $start_tls);
$bind_results = ldap_bind($lconn, $username, $password);
ldap_close($lconn);
if(!$bind_results) {
$this->error("WARNING: Failed to bind to $ldap_url as $username");
return false;
@@ -446,22 +514,62 @@ class LdapTroubleshooter extends Command
return false;
}
$this->info("SUCCESS - Able to bind to $ldap_url as $username");
$cleaned_results = [];
try {
// This _may_ only work for Active Directory?
$result = ldap_read($conn, '', '(objectClass=*)'/* , ['supportedControl']*/);
$results = ldap_get_entries($conn, $result);
$cleaned_results = $this->ldap_results_cleaner($results);
$this->line(print_r($cleaned_results,true));
//$this->line(print_r($cleaned_results,true));
$default_naming_contexts = $cleaned_results[0]['namingcontexts'];
$this->info("Default Naming Contexts:");
$this->info(implode(", ", $default_naming_contexts));
//okay, great - now how do we display those results? I have no idea.
} catch (\Exception $e) {
$this->error("Unable to get base naming contexts - here's what we *did* get:");
$this->line(print_r($cleaned_results, true));
}
// I don't see why this throws an Exception for Google LDAP, but I guess we ought to try and catch it?
$this->comment("I guess we're trying to do the ldap search here, but sometimes it takes too long?");
$this->debugout("I guess we're trying to do the ldap search here, but sometimes it takes too long?");
$this->debugout("Base DN is: ".$settings->ldap_basedn." and filter is: ".parenthesized_filter($settings->ldap_filter));
$search_results = ldap_search($conn, $settings->ldap_basedn, parenthesized_filter($settings->ldap_filter));
$entries = ldap_get_entries($conn, $search_results);
$this->info("Printing first 10 results: ");
for($i=0;$i<10;$i++) {
$this->info($search_results[$i]);
$pretty_data = array_slice($this->ldap_results_cleaner($entries), 0, 10);
//print_r($data);
$headers = [];
foreach ($pretty_data as $row) {
//populate headers
foreach ($row as $key => $value) {
//skip objectsid and objectguid because it junks up output
if ($key == "objectsid" || $key == "objectguid") {
continue;
}
if (!in_array($key, $headers)) {
$headers[] = $key;
}
}
}
$table = [];
//repeat again to populate table
foreach ($pretty_data as $row) {
$newrow = [];
foreach ($headers as $header) {
if (is_array(@$row[$header])) {
$newrow[] = "[" . implode(", ", $row[$header]) . "]";
} else {
$newrow[] = @$row[$header];
}
}
$table[] = $newrow;
}
$this->table($headers, $table);
} catch (\Exception $e) {
$this->error("WARNING: Exception caught during Authed bind to $username - ".$e->getMessage());
return false;
} finally {
ldap_close($conn);
}
});
}
@@ -477,7 +585,7 @@ class LdapTroubleshooter extends Command
{
if(!(function_exists('pcntl_sigtimedwait') && function_exists('posix_getpid') && function_exists('pcntl_fork') && function_exists('posix_kill') && function_exists('pcntl_wifsignaled'))) {
// POSIX functions needed for forking aren't present, just run the function inline (ignoring timeout)
$this->info('WARNING: Unable to execute POSIX fork() commands, timeout may not be respected');
$this->line('WARNING: Unable to execute POSIX fork() commands, timeout may not be respected');
return $function();
} else {
$parent_pid = posix_getpid();
@@ -514,4 +622,6 @@ class LdapTroubleshooter extends Command
}
}
}

View File

@@ -96,7 +96,7 @@ class MoveUploadsToNewDisk extends Command
$private_uploads['assets'] = glob('storage/private_uploads/assets'."/*.*");
$private_uploads['signatures'] = glob('storage/private_uploads/signatures'."/*.*");
$private_uploads['audits'] = glob('storage/private_uploads/audits'."/*.*");
$private_uploads['assetmodels'] = glob('storage/private_uploads/assetmodels'."/*.*");
$private_uploads['assetmodels'] = glob('storage/private_uploads/models'."/*.*");
$private_uploads['imports'] = glob('storage/private_uploads/imports'."/*.*");
$private_uploads['licenses'] = glob('storage/private_uploads/licenses'."/*.*");
$private_uploads['users'] = glob('storage/private_uploads/users'."/*.*");

View File

@@ -59,6 +59,9 @@ class PaveIt extends Command
'migrations',
'settings',
'users',
'telescope_entries',
'telescope_entries_tags',
'telescope_monitoring',
];
// We only need to find out what these are so we can nuke these columns on the assets table.

View File

@@ -62,19 +62,19 @@ class Purge extends Command
$assetcount = $assets->count();
$this->info($assets->count().' assets purged.');
$asset_assoc = 0;
$asset_maintenances = 0;
$maintenances = 0;
foreach ($assets as $asset) {
$this->info('- Asset "'.$asset->present()->name().'" deleted.');
$this->info('- Asset "'.$asset->display_name.'" deleted.');
$asset_assoc += $asset->assetlog()->count();
$asset->assetlog()->forceDelete();
$asset_maintenances += $asset->assetmaintenances()->count();
$asset->assetmaintenances()->forceDelete();
$maintenances += $asset->maintenances()->count();
$asset->maintenances()->forceDelete();
$asset->forceDelete();
}
$this->info($asset_assoc.' corresponding log records purged.');
$this->info($asset_maintenances.' corresponding maintenance records purged.');
$this->info($maintenances.' corresponding maintenance records purged.');
$locations = Location::whereNotNull('deleted_at')->withTrashed()->get();
$this->info($locations->count().' locations purged.');

View File

@@ -0,0 +1,56 @@
<?php
namespace App\Console\Commands;
use App\Models\Actionlog;
use Illuminate\Console\Command;
class RemoveInvalidUploadDeleteActionLogItems extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'snipeit:remove-invalid-upload-delete-action-log-items';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Permanently remove invalid "upload deleted" action log items that have a null filename. This command can potentially result in deleted files being "resurrected" in the UI.';
/**
* Execute the console command.
*/
public function handle()
{
$invalidLogs = Actionlog::query()
->where('action_type', 'upload deleted')
->whereNull('filename')
->withTrashed()
->get();
$this->info("{$invalidLogs->count()} invalid log items found.");
if ($invalidLogs->count() === 0) {
return 0;
}
$this->table(['ID', 'Action Type', 'Item Type', 'Item ID', 'Created At', 'Deleted At'], $invalidLogs->map(fn($log) => [
$log->id,
$log->action_type,
$log->item_type,
$log->item_id,
$log->created_at,
$log->deleted_at,
])->toArray());
if ($this->confirm("Do you wish to remove {$invalidLogs->count()} log items?")) {
$invalidLogs->each(fn($log) => $log->forceDelete());
}
return 0;
}
}

View File

@@ -5,6 +5,7 @@ namespace App\Console\Commands;
use Illuminate\Console\Command;
use ZipArchive;
use Illuminate\Support\Facades\Log;
use enshrined\svgSanitize\Sanitizer;
class SQLStreamer {
private $input;
@@ -242,7 +243,10 @@ class RestoreFromBackup extends Command
$private_dirs = [
'storage/private_uploads/accessories',
'storage/private_uploads/assetmodels',
'storage/private_uploads/assetmodels' => 'storage/private_uploads/models', //this was changed from assetmodels => models Aug 10 2025
'storage/private_uploads/asset_maintenances' => 'storage/private_uploads/maintenances', //this was changed from asset_maintenances => maintenances Aug 10 2025
'storage/private_uploads/maintenances', //but let 'maintenances' take precedence
'storage/private_uploads/models', //and let 'models' take precedence
'storage/private_uploads/assets', // these are asset _files_, not the pictures.
'storage/private_uploads/audits',
'storage/private_uploads/components',
@@ -260,9 +264,10 @@ class RestoreFromBackup extends Command
];
$public_dirs = [
'public/uploads/accessories',
// 'public/uploads/assetmodels' => 'public/uploads/models', //according to git, this was _never_ a thing... (see below)
'public/uploads/maintenances',
'public/uploads/assets', // these are asset _pictures_, not asset files
'public/uploads/avatars',
//'public/uploads/barcodes', // we don't want this, let the barcodes be regenerated
'public/uploads/categories',
'public/uploads/companies',
'public/uploads/components',
@@ -270,7 +275,7 @@ class RestoreFromBackup extends Command
'public/uploads/departments',
'public/uploads/locations',
'public/uploads/manufacturers',
'public/uploads/models',
'public/uploads/models', // ...it's been this way for 9 years (as of late 2025)
'public/uploads/suppliers',
];
@@ -283,8 +288,6 @@ class RestoreFromBackup extends Command
'public/uploads/favicon-uploaded.*',
];
$all_files = $private_dirs + $public_dirs;
$sqlfiles = [];
$sqlfile_indices = [];
@@ -292,6 +295,20 @@ class RestoreFromBackup extends Command
$boring_files = [];
$unsafe_files = [];
$good_extensions = config('filesystems.allowed_upload_extensions_array');
$private_extensions = array_merge($good_extensions, ["csv", "key"]); //add csv, and 'key'
$public_extensions = array_diff($good_extensions, ["xml"]); //remove xml
$sanitizer = new Sanitizer();
/**
* TODO: I _hate_ the "continue 3" thing we keep doing here
* I think a better approach might be to have the "each file" stuff be in a method on this class, and the
* boring_files and interesting_files be properties on it that we fill out. Then, in that method, we could
* just do a 'return' once the file is actually handled (yay or nay). We could also start to break out some of
* the _other_ things that we do into their own methods too? But I don't care about that as much.
*/
for ($i = 0; $i < $za->numFiles; $i++) {
$stat_results = $za->statIndex($i);
// echo "index: $i\n";
@@ -306,7 +323,7 @@ class RestoreFromBackup extends Command
// skip macOS resource fork files (?!?!?!)
if (strpos($raw_path, '__MACOSX') !== false && strpos($raw_path, '._') !== false) {
//print "SKIPPING macOS Resource fork file: $raw_path\n";
$boring_files[] = $raw_path;
// $boring_files[] = $raw_path; //stop adding this to the boring files list; it's just confusing
continue;
}
if (@pathinfo($raw_path, PATHINFO_EXTENSION) == 'sql') {
@@ -315,44 +332,70 @@ class RestoreFromBackup extends Command
$sqlfile_indices[] = $i;
continue;
}
if ($raw_path[-1] == '/') {
//last character is '/' - this is a directory, and we don't need it, and we don't need to warn about it
continue;
}
if (in_array(basename($raw_path), [".gitkeep", ".gitignore", ".DS_Store"])) {
//skip these boring files silently without reporting on them; they're stupid
continue;
}
$extension = strtolower(pathinfo($raw_path, PATHINFO_EXTENSION));
foreach (array_merge($private_dirs, $public_dirs) as $dir) {
foreach (['public' => $public_dirs, 'private' => $private_dirs] as $purpose => $dirs) {
$allowed_extensions = match ($purpose) {
'public' => $public_extensions,
'private' => $private_extensions,
};
foreach ($dirs as $dir => $destdir) {
if (is_int($dir)) {
$dir = $destdir;
}
$last_pos = strrpos($raw_path, $dir . '/');
if ($last_pos !== false) {
//print("INTERESTING - last_pos is $last_pos when searching $raw_path for $dir - last_pos+strlen(\$dir) is: ".($last_pos+strlen($dir))." and strlen(\$rawpath) is: ".strlen($raw_path)."\n");
//print("We would copy $raw_path to $dir.\n"); //FIXME append to a path?
$interesting_files[$raw_path] = ['dest' => $dir, 'index' => $i];
continue 2;
if ($last_pos + strlen($dir) + 1 == strlen($raw_path)) {
// we don't care about that; we just want files with the appropriate prefix
//print("FOUND THE EXACT DIRECTORY: $dir AT: $raw_path!!!\n");
//the CSV bit, below, is because we store CSV files as "blahcsv" - without an extension
if (!in_array($extension, $allowed_extensions) && !($dir == "storage/private_uploads/imports" && substr($raw_path, -3) == "csv" && $extension == "")) {
$unsafe_files[] = $raw_path;
Log::debug($raw_path . ' from directory ' . $dir . ' is being skipped');
} else {
if ($dir != $destdir) {
Log::debug("Getting ready to save file $raw_path to new directory $destdir");
}
$interesting_files[$raw_path] = ['dest' => $destdir, 'index' => $i];
}
continue 3;
}
}
}
$good_extensions = config('filesystems.allowed_upload_extensions_array');
foreach (array_merge($private_files, $public_files) as $file) {
foreach (['public' => $public_files, 'private' => $private_files] as $purpose => $files) {
$allowed_extensions = match ($purpose) {
'public' => $public_extensions,
'private' => $private_extensions,
};
foreach ($files as $file) {
$has_wildcard = (strpos($file, '*') !== false);
if ($has_wildcard) {
$file = substr($file, 0, -1); //trim last character (which should be the wildcard)
}
$last_pos = strrpos($raw_path, $file); // no trailing slash!
if ($last_pos !== false) {
$extension = strtolower(pathinfo($raw_path, PATHINFO_EXTENSION));
if (!in_array($extension, $good_extensions)) {
if (!in_array($extension, $allowed_extensions)) {
// gathering potentially unsafe files here to return at exit
$unsafe_files[] = $raw_path;
Log::debug('Potentially unsafe file '.$raw_path.' is being skipped');
Log::debug('Potentially unsafe file ' . $raw_path . ' is being skipped');
$boring_files[] = $raw_path;
continue 2;
continue 3;
}
//print("INTERESTING - last_pos is $last_pos when searching $raw_path for $file - last_pos+strlen(\$file) is: ".($last_pos+strlen($file))." and strlen(\$rawpath) is: ".strlen($raw_path)."\n");
//no wildcards found in $file, process 'normally'
if ($last_pos + strlen($file) == strlen($raw_path) || $has_wildcard) { //again, no trailing slash. or this is a wildcard and we just take it.
// print("FOUND THE EXACT FILE: $file AT: $raw_path!!!\n"); //we *do* care about this, though.
$interesting_files[$raw_path] = ['dest' => dirname($file), 'index' => $i];
continue 2;
continue 3;
}
}
}
}
@@ -489,18 +532,25 @@ class RestoreFromBackup extends Command
}
foreach ($interesting_files as $pretty_file_name => $file_details) {
$ugly_file_name = $za->statIndex($file_details['index'])['name'];
$migrated_file_name = $file_details['dest'] . '/' . basename($pretty_file_name);
if (strcasecmp(substr($pretty_file_name, -4), ".svg") === 0) {
$svg_contents = $za->getFromIndex($file_details['index']);
$cleaned_svg = $sanitizer->sanitize($svg_contents);
file_put_contents($migrated_file_name, $cleaned_svg);
} else {
$fp = $za->getStream($ugly_file_name);
//$this->info("Weird problem, here are file details? ".print_r($file_details,true));
if (!is_dir($file_details['dest'])) {
mkdir($file_details['dest'], 0755, true); //0755 is what Laravel uses, so we do that
}
$migrated_file = fopen($file_details['dest'].'/'.basename($pretty_file_name), 'w');
$migrated_file = fopen($migrated_file_name, 'w');
while (($buffer = fgets($fp, SQLStreamer::$buffer_size)) !== false) {
fwrite($migrated_file, $buffer);
}
fclose($migrated_file);
fclose($fp);
//$this->info("Wrote $ugly_file_name to $pretty_file_name");
}
if ($bar) {
$bar->advance();
}

View File

@@ -77,7 +77,7 @@ class SendAcceptanceReminder extends Command
if(!$email){
$no_email_list[] = [
'id' => $acceptance->assignedTo?->id,
'name' => $acceptance->assignedTo?->present()->fullName(),
'name' => $acceptance->assignedTo?->display_name,
];
} else {
$count++;

View File

@@ -2,6 +2,7 @@
namespace App\Console\Commands;
use App\Helpers\Helper;
use App\Mail\ExpiringAssetsMail;
use App\Mail\ExpiringLicenseMail;
use App\Models\Asset;
@@ -52,19 +53,73 @@ class SendExpirationAlerts extends Command
->filter(fn($item) => !empty($item))
->all();
// Expiring Assets
$assets = Asset::getExpiringWarrantee($alert_interval);
$assets = Asset::getExpiringWarrantyOrEol($alert_interval);
if ($assets->count() > 0) {
$this->info(trans_choice('mail.assets_warrantee_alert', $assets->count(), ['count' => $assets->count(), 'threshold' => $alert_interval]));
Mail::to($recipients)->send(new ExpiringAssetsMail($assets, $alert_interval));
$this->table(
[
trans('general.id'),
trans('admin/hardware/form.tag'),
trans('admin/hardware/form.model'),
trans('general.model_no'),
trans('general.purchase_date'),
trans('admin/hardware/form.eol_rate'),
trans('admin/hardware/form.eol_date'),
trans('admin/hardware/form.warranty_expires'),
],
$assets->map(fn($item) =>
[
trans('general.id') => $item->id,
trans('admin/hardware/form.tag') => $item->asset_tag,
trans('admin/hardware/form.model') => $item->model->name,
trans('general.model_no') => $item->model->model_number,
trans('general.purchase_date') => $item->purchase_date_formatted,
trans('admin/hardware/form.eol_rate') => $item->model->eol,
trans('admin/hardware/form.eol_date') => $item->eol_date ? $item->eol_formatted_date .' ('.$item->eol_diff_for_humans.')' : '',
trans('admin/hardware/form.warranty_expires') => $item->warranty_expires ? $item->warranty_expires_formatted_date .' ('.$item->warranty_expires_diff_for_humans.')' : '',
])
);
}
// Expiring licenses
$licenses = License::getExpiringLicenses($alert_interval);
$licenses = License::query()->ExpiringLicenses($alert_interval)
->with('manufacturer','category')
->orderBy('expiration_date', 'ASC')
->orderBy('termination_date', 'ASC')
->get();
if ($licenses->count() > 0) {
$this->info(trans_choice('mail.license_expiring_alert', $licenses->count(), ['count' => $licenses->count(), 'threshold' => $alert_interval]));
Mail::to($recipients)->send(new ExpiringLicenseMail($licenses, $alert_interval));
$this->table(
[
trans('general.id'),
trans('general.name'),
trans('general.purchase_date'),
trans('admin/licenses/form.expiration'),
trans('mail.expires'),
trans('admin/licenses/form.termination_date'),
trans('mail.terminates')],
$licenses->map(fn($item) => [
trans('general.id') => $item->id,
trans('general.name') => $item->name,
trans('general.purchase_date') => $item->purchase_date_formatted,
trans('admin/licenses/form.expiration') => $item->expires_formatted_date,
trans('mail.expires') => $item->expires_diff_for_humans,
trans('admin/licenses/form.termination_date') => $item->terminates_formatted_date,
trans('mail.terminates') => $item->terminates_diff_for_humans
])
);
}
// Send a message even if the count is 0
$this->info(trans_choice('mail.assets_warrantee_alert', $assets->count(), ['count' => $assets->count(), 'threshold' => $alert_interval]));
$this->info(trans_choice('mail.license_expiring_alert', $licenses->count(), ['count' => $licenses->count(), 'threshold' => $alert_interval]));
} else {
if ($settings->alert_email == '') {
$this->error('Could not send email. No alert email configured in settings');

View File

@@ -47,7 +47,7 @@ class SendUpcomingAuditReport extends Command
$today = Carbon::now();
$interval_date = $today->copy()->addDays($interval);
$assets = Asset::whereNull('deleted_at')->dueOrOverdueForAudit($settings)->orderBy('assets.next_audit_date', 'desc')->get();
$assets = Asset::whereNull('deleted_at')->dueOrOverdueForAudit($settings)->orderBy('assets.next_audit_date', 'asc')->get();
$this->info($assets->count() . ' assets must be audited in on or before ' . $interval_date . ' is deadline');
@@ -61,6 +61,28 @@ class SendUpcomingAuditReport extends Command
$this->info('Sending Admin SendUpcomingAuditNotification to: ' . $settings->alert_email);
Mail::to($recipients)->send(new SendUpcomingAuditMail($assets, $settings->audit_warning_days));
$this->table(
[
trans('general.id'),
trans('general.name'),
trans('general.last_audit'),
trans('general.next_audit_date'),
trans('mail.Days'),
trans('mail.supplier'),
trans('mail.assigned_to'),
],
$assets->map(fn($item) => [
trans('general.id') => $item->id,
trans('general.name') => $item->display_name,
trans('general.last_audit') => $item->last_audit_formatted_date,
trans('general.next_audit_date') => $item->next_audit_formatted_date,
trans('mail.Days') => round($item->next_audit_diff_in_days),
trans('mail.supplier') => $item->supplier ? $item->supplier->name : '',
trans('mail.assigned_to') => $item->assignedTo ? $item->assignedTo->display_name : '',
])
);
}
}

View File

@@ -94,7 +94,7 @@ class Handler extends ExceptionHandler
// Handle API requests that fail because Carbon cannot parse the date on validation (when a submitted date value is definitely not a date)
if ($e instanceof InvalidFormatException) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('validation.date', ['attribute' => 'date'])), 200);
return response()->json(Helper::formatStandardApiResponse('error', null, trans('validation.date', ['attribute' => 'date'])), config('app.validation_status_code'));
}
// Handle API requests that fail because the model doesn't exist
@@ -124,7 +124,7 @@ class Handler extends ExceptionHandler
// never even get to the controller where we normally nicely format JSON responses
if ($e instanceof ValidationException) {
$response = $this->invalidJson($request, $e);
return response()->json(Helper::formatStandardApiResponse('error', null, $e->errors()), 200);
return response()->json(Helper::formatStandardApiResponse('error', null, $e->errors()), config('app.validation_status_code'));
}
}
@@ -138,13 +138,13 @@ class Handler extends ExceptionHandler
if (in_array('bulkedit', $ids, true)) {
$error_array = session()->get('bulk_asset_errors');
return redirect()
->route('hardware.bulkedit')
->route('hardware.index')
->withErrors($error_array, 'bulk_asset_errors')
->withInput();
}
// This gets the MVC model name from the exception and formats in a way that's less fugly
$model_name = strtolower(implode(" ", preg_split('/(?=[A-Z])/', last(explode('\\', $e->getModel())))));
$model_name = trim(strtolower(implode(" ", preg_split('/(?=[A-Z])/', last(explode('\\', $e->getModel()))))));
$route = str_plural(strtolower(last(explode('\\', $e->getModel())))).'.index';
// Sigh.
@@ -160,9 +160,7 @@ class Handler extends ExceptionHandler
$route = 'maintenances.index';
} elseif ($route === 'licenseseats.index') {
$route = 'licenses.index';
} elseif ($route === 'customfields.index') {
$route = 'fields.index';
} elseif ($route === 'customfieldsets.index') {
} elseif (($route === 'customfieldsets.index') || ($route === 'customfields.index')) {
$route = 'fields.index';
}
@@ -200,7 +198,7 @@ class Handler extends ExceptionHandler
protected function invalidJson($request, ValidationException $exception)
{
return response()->json(Helper::formatStandardApiResponse('error', null, $exception->errors()), 200);
return response()->json(Helper::formatStandardApiResponse('error', null, $exception->errors()), config('app.validation_status_code'));
}

View File

@@ -95,7 +95,7 @@ class Helper
$Parsedown->setSafeMode(true);
if ($str) {
return $Parsedown->text($str);
return $Parsedown->text(strip_tags($str));
}
}
@@ -105,7 +105,7 @@ class Helper
$Parsedown->setSafeMode(true);
if ($str) {
return $Parsedown->line($str);
return $Parsedown->line(strip_tags($str));
}
}
@@ -435,6 +435,34 @@ class Helper
return $colors[$index];
}
/**
* Check if a string has any RTL characters
* @param $value
* @return bool
*/
public static function hasRtl($string) {
$rtlChar = '/[\x{0590}-\x{083F}]|[\x{08A0}-\x{08FF}]|[\x{FB1D}-\x{FDFF}]|[\x{FE70}-\x{FEFF}]/u';
return preg_match($rtlChar, $string) != 0;
}
// is chinese, japanese or korean language
public static function isCjk($string) {
return Helper::isChinese($string) || Helper::isJapanese($string) || Helper::isKorean($string);
}
public static function isChinese($string) {
return preg_match("/\p{Han}+/u", $string);
}
public static function isJapanese($string) {
return preg_match('/[\x{4E00}-\x{9FBF}\x{3040}-\x{309F}\x{30A0}-\x{30FF}]/u', $string);
}
public static function isKorean($string) {
return preg_match('/[\x{3130}-\x{318F}\x{AC00}-\x{D7AF}]/u', $string);
}
/**
* Increases or decreases the brightness of a color by a percentage of the current brightness.
*
@@ -1197,19 +1225,30 @@ class Helper
'webp' => 'far fa-image',
'avif' => 'far fa-image',
'svg' => 'fas fa-vector-square',
// word
'doc' => 'far fa-file-word',
'docx' => 'far fa-file-word',
// Excel
'xls' => 'far fa-file-excel',
'xlsx' => 'far fa-file-excel',
'ods' => 'far fa-file-excel',
// Presentation
'ppt' => 'far fa-file-powerpoint',
'odp' => 'far fa-file-powerpoint',
// archive
'zip' => 'fas fa-file-archive',
'rar' => 'fas fa-file-archive',
//Text
'odt' => 'far fa-file-alt',
'txt' => 'far fa-file-alt',
'rtf' => 'far fa-file-alt',
'xml' => 'fas fa-code',
// Misc
'pdf' => 'far fa-file-pdf',
'lic' => 'far fa-save',
@@ -1543,11 +1582,6 @@ class Helper
// return to previous page
if ($redirect_option === 'back') {
if ($backUrl === route('home')) {
return redirect()->to($backUrl)
->with('warning', trans('general.page_error'));
}
return redirect()->to($backUrl);
}

View File

@@ -16,6 +16,7 @@ class IconHelper
case 'clone':
return 'far fa-clone';
case 'delete':
case 'upload deleted':
return 'fas fa-trash';
case 'create':
return 'fa-solid fa-plus';
@@ -43,6 +44,8 @@ class IconHelper
return 'fa-regular fa-envelope';
case 'phone':
return 'fa-solid fa-phone';
case 'mobile':
return 'fas fa-mobile-screen-button';
case 'long-arrow-right':
return 'fas fa-long-arrow-alt-right';
case 'download':

View File

@@ -29,7 +29,7 @@ class StorageHelper
public static function getMediaType($file_with_path) {
// The file exists and is allowed to be displayed inline
// Get the file extension and determine the media type
if (Storage::exists($file_with_path)) {
$fileinfo = pathinfo($file_with_path);
$extension = strtolower($fileinfo['extension']);
@@ -51,6 +51,15 @@ class StorageHelper
case 'webm':
case 'mov':
return 'video';
case 'doc':
case 'docx':
return 'document';
case 'txt':
return 'text';
case 'xls':
case 'xlsx':
case 'ods':
return 'spreadsheet';
default:
return $extension; // Default for unknown types
}

View File

@@ -90,7 +90,12 @@ class AccessoriesController extends Controller
$accessory = $request->handleImages($accessory);
}
if($request->get('redirect_option') === 'back'){
session()->put(['redirect_option' => 'index']);
} else {
session()->put(['redirect_option' => $request->get('redirect_option')]);
}
// Was the accessory created?
if ($accessory->save()) {
// Redirect to the new accessory page

View File

@@ -1,132 +0,0 @@
<?php
namespace App\Http\Controllers\Accessories;
use App\Helpers\StorageHelper;
use App\Http\Controllers\Controller;
use App\Http\Requests\UploadFileRequest;
use App\Models\Actionlog;
use App\Models\Accessory;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Log;
use \Illuminate\Contracts\View\View;
use \Illuminate\Http\RedirectResponse;
use Illuminate\Support\Facades\Response;
use Symfony\Component\HttpFoundation\BinaryFileResponse;
use Symfony\Component\HttpFoundation\StreamedResponse;
class AccessoriesFilesController extends Controller
{
/**
* Validates and stores files associated with a accessory.
*
* @param UploadFileRequest $request
* @param int $accessoryId
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v1.0]
* @todo Switch to using the AssetFileRequest form request validator.
*/
public function store(UploadFileRequest $request, $accessoryId = null) : RedirectResponse
{
if (config('app.lock_passwords')) {
return redirect()->route('accessories.show', ['accessory'=>$accessoryId])->with('error', trans('general.feature_disabled'));
}
$accessory = Accessory::find($accessoryId);
if (isset($accessory->id)) {
$this->authorize('accessories.files', $accessory);
if ($request->hasFile('file')) {
if (! Storage::exists('private_uploads/accessories')) {
Storage::makeDirectory('private_uploads/accessories', 775);
}
foreach ($request->file('file') as $file) {
$file_name = $request->handleFile('private_uploads/accessories/', 'accessory-'.$accessory->id, $file);
//Log the upload to the log
$accessory->logUpload($file_name, e($request->input('notes')));
}
return redirect()->route('accessories.show', $accessory->id)->withFragment('files')->with('success', trans('general.file_upload_success'));
}
return redirect()->route('accessories.show', $accessory->id)->withFragment('files')->with('error', trans('general.no_files_uploaded'));
}
// Prepare the error message
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.does_not_exist'));
}
/**
* Deletes the selected accessory file.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v1.0]
* @param int $accessoryId
* @param int $fileId
*/
public function destroy($accessoryId = null, $fileId = null) : RedirectResponse
{
if ($accessory = Accessory::find($accessoryId)) {
$this->authorize('update', $accessory);
if ($log = Actionlog::find($fileId)) {
if (Storage::exists('private_uploads/accessories/'.$log->filename)) {
try {
Storage::delete('private_uploads/accessories/' . $log->filename);
$log->delete();
return redirect()->back()->withFragment('files')->with('success', trans('admin/hardware/message.deletefile.success'));
} catch (\Exception $e) {
Log::debug($e);
return redirect()->route('accessories.index')->with('error', trans('general.file_does_not_exist'));
}
}
}
return redirect()->route('accessories.show', ['accessory' => $accessory])->withFragment('files')->with('error', trans('general.log_record_not_found'));
}
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.does_not_exist'));
}
/**
* Allows the selected file to be viewed.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v1.4]
* @param int $accessoryId
* @param int $fileId
*/
public function show($accessoryId = null, $fileId = null) : View | RedirectResponse | Response | BinaryFileResponse | StreamedResponse
{
// the accessory is valid
if ($accessory = Accessory::find($accessoryId)) {
$this->authorize('view', $accessory);
$this->authorize('accessories.files', $accessory);
if ($log = Actionlog::whereNotNull('filename')->where('item_id', $accessory->id)->find($fileId)) {
$file = 'private_uploads/accessories/'.$log->filename;
try {
return StorageHelper::showOrDownloadFile($file, $log->filename);
} catch (\Exception $e) {
return redirect()->route('accessories.show', ['accessory' => $accessory])->with('error', trans('general.file_not_found'));
}
}
return redirect()->route('accessories.show', ['accessory' => $accessory])->withFragment('files')->with('error', trans('general.log_record_not_found'));
}
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.does_not_exist'));
}
}

View File

@@ -71,6 +71,7 @@ class AccessoryCheckoutController extends Controller
$this->authorize('checkout', $accessory);
$target = $this->determineCheckoutTarget();
session()->put(['checkout_to_type' => $target]);
$accessory->checkout_qty = $request->input('checkout_qty', 1);

View File

@@ -8,33 +8,23 @@ use App\Events\ItemAccepted;
use App\Events\ItemDeclined;
use App\Http\Controllers\Controller;
use App\Mail\CheckoutAcceptanceResponseMail;
use App\Models\Actionlog;
use App\Models\Asset;
use App\Models\CheckoutAcceptance;
use App\Models\Company;
use App\Models\Contracts\Acceptable;
use App\Models\Setting;
use App\Models\User;
use App\Models\AssetModel;
use App\Models\Accessory;
use App\Models\License;
use App\Models\Component;
use App\Models\Consumable;
use App\Notifications\AcceptanceAssetAcceptedNotification;
use App\Notifications\AcceptanceAssetAcceptedToUserNotification;
use App\Notifications\AcceptanceAssetDeclinedNotification;
use Exception;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
use App\Http\Controllers\SettingsController;
use Barryvdh\DomPDF\Facade\Pdf;
use Carbon\Carbon;
use \Illuminate\Contracts\View\View;
use \Illuminate\Http\RedirectResponse;
use Illuminate\Support\Facades\Log;
use App\Helpers\Helper;
class AcceptanceController extends Controller
{
@@ -85,6 +75,10 @@ class AcceptanceController extends Controller
public function store(Request $request, $id) : RedirectResponse
{
$acceptance = CheckoutAcceptance::find($id);
$assigned_user = User::find($acceptance->assigned_to_id);
$settings = Setting::getSettings();
$sig_filename='';
if (is_null($acceptance)) {
return redirect()->route('account.accept')->with('error', trans('admin/hardware/message.does_not_exist'));
@@ -107,22 +101,12 @@ class AcceptanceController extends Controller
}
/**
* Get the signature and save it
* Check for the signature directory
*/
if (! Storage::exists('private_uploads/signatures')) {
Storage::makeDirectory('private_uploads/signatures', 775);
}
$item = $acceptance->checkoutable_type::find($acceptance->checkoutable_id);
$display_model = '';
$pdf_view_route = '';
$pdf_filename = 'accepted-eula-'.date('Y-m-d-h-i-s').'.pdf';
$sig_filename='';
if ($request->input('asset_acceptance') == 'accepted') {
/**
* Check for the eula-pdfs directory
*/
@@ -130,12 +114,12 @@ class AcceptanceController extends Controller
Storage::makeDirectory('private_uploads/eula-pdfs', 775);
}
if (Setting::getSettings()->require_accept_signature == '1') {
$item = $acceptance->checkoutable_type::find($acceptance->checkoutable_id);
// Check if the signature directory exists, if not create it
if (!Storage::exists('private_uploads/signatures')) {
Storage::makeDirectory('private_uploads/signatures', 775);
}
// If signatures are required, make sure we have one
if (Setting::getSettings()->require_accept_signature == '1') {
// The item was accepted, check for a signature
if ($request->filled('signature_output')) {
@@ -153,93 +137,48 @@ class AcceptanceController extends Controller
}
$assigned_user = User::find($acceptance->assigned_to_id);
// this is horrible
switch($acceptance->checkoutable_type){
case 'App\Models\Asset':
$pdf_view_route ='account.accept.accept-asset-eula';
$asset_model = AssetModel::find($item->model_id);
if (!$asset_model) {
return redirect()->back()->with('error', trans('admin/models/message.does_not_exist'));
}
$display_model = $asset_model->name;
break;
case 'App\Models\Accessory':
$pdf_view_route ='account.accept.accept-accessory-eula';
$accessory = Accessory::find($item->id);
$display_model = $accessory->name;
break;
case 'App\Models\LicenseSeat':
$pdf_view_route ='account.accept.accept-license-eula';
$license = License::find($item->license_id);
$display_model = $license->name;
break;
case 'App\Models\Component':
$pdf_view_route ='account.accept.accept-component-eula';
$component = Component::find($item->id);
$display_model = $component->name;
break;
case 'App\Models\Consumable':
$pdf_view_route ='account.accept.accept-consumable-eula';
$consumable = Consumable::find($item->id);
$display_model = $consumable->name;
break;
}
// if ($acceptance->checkoutable_type == 'App\Models\Asset') {
// $pdf_view_route ='account.accept.accept-asset-eula';
// $asset_model = AssetModel::find($item->model_id);
// $display_model = $asset_model->name;
// $assigned_to = User::find($item->assigned_to)->present()->fullName;
//
// } elseif ($acceptance->checkoutable_type== 'App\Models\Accessory') {
// $pdf_view_route ='account.accept.accept-accessory-eula';
// $accessory = Accessory::find($item->id);
// $display_model = $accessory->name;
// $assigned_to = User::find($item->assignedTo);
//
// }
/**
* Gather the data for the PDF. We fire this whether there is a signature required or not,
* since we want the moment-in-time proof of what the EULA was when they accepted it.
*/
$branding_settings = SettingsController::getPDFBranding();
$path_logo = "";
// Check for the PDF logo path and use that, otherwise use the regular logo path
if (!is_null($branding_settings->acceptance_pdf_logo)) {
$path_logo = public_path() . '/uploads/' . $branding_settings->acceptance_pdf_logo;
} elseif (!is_null($branding_settings->logo)) {
$path_logo = public_path() . '/uploads/' . $branding_settings->logo;
// Convert PDF logo to base64 for TCPDF
// This is needed for TCPDF to properly embed the image if it's a png and the cache isn't writable
$encoded_logo = null;
if ($settings->acceptance_pdf_logo) {
$encoded_logo = base64_encode(file_get_contents(public_path() . '/uploads/' . $settings->acceptance_pdf_logo));
}
// Get the data array ready for the notifications and PDF generation
$data = [
'item_tag' => $item->asset_tag,
'item_model' => $display_model,
'item_name' => $item->name, // this handles licenses seats, which don't have a 'name' field
'item_model' => $item->model?->name,
'item_serial' => $item->serial,
'item_status' => $item->assetstatus?->name,
'eula' => $item->getEula(),
'note' => $request->input('note'),
'check_out_date' => Carbon::parse($acceptance->created_at)->format('Y-m-d'),
'accepted_date' => Carbon::parse($acceptance->accepted_at)->format('Y-m-d'),
'assigned_to' => $assigned_user->present()->fullName,
'company_name' => $branding_settings->site_name,
'signature' => ($sig_filename) ? storage_path() . '/private_uploads/signatures/' . $sig_filename : null,
'logo' => $path_logo,
'date_settings' => $branding_settings->date_display_format,
'check_out_date' => Helper::getFormattedDateObject($acceptance->created_at, 'datetime', false),
'accepted_date' => Helper::getFormattedDateObject(now()->format('Y-m-d H:i:s'), 'datetime', false),
'declined_date' => Helper::getFormattedDateObject(now()->format('Y-m-d H:i:s'), 'datetime', false),
'assigned_to' => $assigned_user->display_name,
'email' => $assigned_user->email,
'employee_num' => $assigned_user->employee_num,
'site_name' => $settings->site_name,
'company_name' => $item->company?->name?? $settings->site_name,
'signature' => (($sig_filename && array_key_exists('1', $encoded_image))) ? $encoded_image[1] : null,
'logo' => ($encoded_logo) ?? null,
'date_settings' => $settings->date_display_format,
'admin' => auth()->user()->present()?->fullName,
'qty' => $acceptance->qty ?? 1,
];
if ($pdf_view_route!='') {
Log::debug($pdf_filename.' is the filename, and the route was specified.');
$pdf = Pdf::loadView($pdf_view_route, $data);
Storage::put('private_uploads/eula-pdfs/' .$pdf_filename, $pdf->output());
}
if ($request->input('asset_acceptance') == 'accepted') {
$pdf_filename = 'accepted-'.$acceptance->checkoutable_id.'-'.$acceptance->display_checkoutable_type.'-eula-'.date('Y-m-d-h-i-s').'.pdf';
// Generate the PDF content
$pdf_content = $acceptance->generateAcceptancePdf($data, $acceptance);
Storage::put('private_uploads/eula-pdfs/' .$pdf_filename, $pdf_content);
// Log the acceptance
$acceptance->accept($sig_filename, $item->getEula(), $pdf_filename, $request->input('note'));
// Send the PDF to the signing user
@@ -247,15 +186,14 @@ class AcceptanceController extends Controller
// Add the attachment for the signing user into the $data array
$data['file'] = $pdf_filename;
try {
$assigned_user->notify(new AcceptanceAssetAcceptedToUserNotification($data));
$assigned_user->notify((new AcceptanceAssetAcceptedToUserNotification($data))->locale($assigned_user->locale));
} catch (\Exception $e) {
Log::warning($e);
}
}
try {
$acceptance->notify(new AcceptanceAssetAcceptedNotification($data));
$acceptance->notify((new AcceptanceAssetAcceptedNotification($data))->locale(Setting::getSettings()->locale));
} catch (\Exception $e) {
Log::warning($e);
}
@@ -263,112 +201,43 @@ class AcceptanceController extends Controller
$return_msg = trans('admin/users/message.accepted');
// Item was declined
} else {
/**
* Check for the eula-pdfs directory
*/
if (! Storage::exists('private_uploads/eula-pdfs')) {
Storage::makeDirectory('private_uploads/eula-pdfs', 775);
}
if (Setting::getSettings()->require_accept_signature == '1') {
// Check if the signature directory exists, if not create it
if (!Storage::exists('private_uploads/signatures')) {
Storage::makeDirectory('private_uploads/signatures', 775);
}
// The item was accepted, check for a signature
if ($request->filled('signature_output')) {
$sig_filename = 'siglog-' . Str::uuid() . '-' . date('Y-m-d-his') . '.png';
$data_uri = $request->input('signature_output');
$encoded_image = explode(',', $data_uri);
$decoded_image = base64_decode($encoded_image[1]);
Storage::put('private_uploads/signatures/' . $sig_filename, (string)$decoded_image);
// No image data is present, kick them back.
// This mostly only applies to users on super-duper crapola browsers *cough* IE *cough*
} else {
return redirect()->back()->with('error', trans('general.shitty_browser'));
}
}
// Format the data to send the declined notification
$branding_settings = SettingsController::getPDFBranding();
// This is the most horriblest
switch($acceptance->checkoutable_type){
case 'App\Models\Asset':
$asset_model = AssetModel::find($item->model_id);
$display_model = $asset_model->name;
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
break;
case 'App\Models\Accessory':
$accessory = Accessory::find($item->id);
$display_model = $accessory->name;
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
break;
case 'App\Models\LicenseSeat':
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
break;
case 'App\Models\Component':
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
break;
case 'App\Models\Consumable':
$consumable = Consumable::find($item->id);
$display_model = $consumable->name;
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
break;
}
$data = [
'item_tag' => $item->asset_tag,
'item_model' => $display_model,
'item_serial' => $item->serial,
'item_status' => $item->assetstatus?->name,
'note' => $request->input('note'),
'declined_date' => Carbon::parse($acceptance->declined_at)->format('Y-m-d'),
'signature' => ($sig_filename) ? storage_path() . '/private_uploads/signatures/' . $sig_filename : null,
'assigned_to' => $assigned_to,
'company_name' => $branding_settings->site_name,
'date_settings' => $branding_settings->date_display_format,
];
if ($pdf_view_route!='') {
Log::debug($pdf_filename.' is the filename, and the route was specified.');
$pdf = Pdf::loadView($pdf_view_route, $data);
Storage::put('private_uploads/eula-pdfs/' .$pdf_filename, $pdf->output());
}
for ($i = 0; $i < ($acceptance->qty ?? 1); $i++) {
$acceptance->decline($sig_filename, $request->input('note'));
}
$acceptance->notify(new AcceptanceAssetDeclinedNotification($data));
Log::debug('New event acceptance.');
event(new CheckoutDeclined($acceptance));
$return_msg = trans('admin/users/message.declined');
}
// Send an email notification if one is requested
if ($acceptance->alert_on_response_id) {
try {
$recipient = User::find($acceptance->alert_on_response_id);
if ($recipient) {
Log::debug('Attempting to send email acceptance.');
Mail::to($recipient)->send(new CheckoutAcceptanceResponseMail(
$acceptance,
$recipient,
$request->input('asset_acceptance') === 'accepted',
));
Log::debug('Send email notification sucess on checkout acceptance response.');
}
} catch (Exception $e) {
Log::error($e->getMessage());
Log::warning($e);
}
}
return redirect()->to('account/accept')->with('success', $return_msg);
}
}

View File

@@ -3,11 +3,13 @@
namespace App\Http\Controllers;
use App\Helpers\Helper;
use App\Models\Actionlog;
use Illuminate\Http\RedirectResponse;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Storage;
use \Illuminate\Http\Response;
use Symfony\Component\HttpFoundation\BinaryFileResponse;
use \Illuminate\Http\Response;
class ActionlogController extends Controller
{
public function displaySig($filename) : RedirectResponse | Response | bool
@@ -39,17 +41,29 @@ class ActionlogController extends Controller
public function getStoredEula($filename) : Response | BinaryFileResponse | RedirectResponse
{
$this->authorize('view', \App\Models\Asset::class);
if ($actionlog = Actionlog::where('filename', $filename)->with('user')->with('target')->firstOrFail()) {
$this->authorize('view', $actionlog->target);
$this->authorize('view', $actionlog->user);
if (config('filesystems.default') == 's3_private') {
return redirect()->away(Storage::disk('s3_private')->temporaryUrl('private_uploads/eula-pdfs/'.$filename, now()->addMinutes(5)));
return redirect()->away(Storage::disk('s3_private')->temporaryUrl('private_uploads/eula-pdfs/' . $filename, now()->addMinutes(5)));
}
if (Storage::exists('private_uploads/eula-pdfs/'.$filename)) {
return response()->download(config('app.private_uploads').'/eula-pdfs/'.$filename);
if (Storage::exists('private_uploads/eula-pdfs/' . $filename)) {
if (request()->input('inline') == 'true') {
return response()->file(config('app.private_uploads') . '/eula-pdfs/' . $filename);
}
return response()->download(config('app.private_uploads') . '/eula-pdfs/' . $filename);
}
return redirect()->back()->with('error', trans('general.file_does_not_exist'));
}
return redirect()->back()->with('error', trans('general.record_not_found'));
}
}

View File

@@ -11,12 +11,9 @@ use App\Http\Requests\StoreAccessoryRequest;
use App\Http\Transformers\AccessoriesTransformer;
use App\Http\Transformers\SelectlistTransformer;
use App\Models\Accessory;
use App\Models\Company;
use App\Models\User;
use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Auth;
use Carbon\Carbon;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use App\Http\Requests\ImageUploadRequest;
use App\Models\AccessoryCheckout;
@@ -26,11 +23,25 @@ class AccessoriesController extends Controller
use CheckInOutRequest;
/**
* Display a listing of the resource.
* List accessories
*
* @group Accessories
* @queryParam search string A search term to filter results by. Example: keyboard
* @queryParam filter[<fieldname>] string A field to filter by. Example
* @queryParam company_id int Filter by company ID. Example: 1
* @queryParam category_id int Filter by category ID. Example: 1
* @queryParam manufacturer_id int Filter by manufacturer ID. Example: 1
* @queryParam supplier_id int Filter by supplier ID. Example: 1
* @queryParam location_id int Filter by location ID. Example: 1
* @queryParam notes string Filter by notes. Example: For office use only
* @queryParam offset int The number of items to skip before starting to collect the result set. Example: 0
* @queryParam limit int The number of items to return. Example: 50
* @queryParam sort string The field to sort by. Example: created_at
* @queryParam order string The order to sort by. Example: desc
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @return \Illuminate\Http\Response
*@since [v4.0]
* @author [A. Gianotto] [<snipe@snipe.net>]
*/
public function index(Request $request)
{
@@ -54,6 +65,15 @@ class AccessoriesController extends Controller
'notes',
'checkouts_count',
'qty',
// These are *relationships* so we wouldn't normally include them in this array,
// since they would normally create a `column not found` error,
// BUT we account for them in the ordering switch down at the end of this method
// DO NOT ADD ANYTHING TO THIS LIST WITHOUT CHECKING THE ORDERING SWITCH BELOW!
'company',
'location',
'category',
'supplier',
'manufacturer',
];
@@ -61,10 +81,23 @@ class AccessoriesController extends Controller
->with('category', 'company', 'manufacturer', 'checkouts', 'location', 'supplier', 'adminuser')
->withCount('checkouts as checkouts_count');
if ($request->filled('search')) {
$accessories = $accessories->TextSearch($request->input('search'));
$filter = [];
if ($request->filled('filter')) {
$filter = json_decode($request->input('filter'), true);
$filter = array_filter($filter, function ($key) use ($allowed_columns) {
return in_array($key, $allowed_columns);
}, ARRAY_FILTER_USE_KEY);
}
if ((! is_null($filter)) && (count($filter)) > 0) {
$accessories->ByFilter($filter);
} elseif ($request->filled('search')) {
$accessories->TextSearch($request->input('search'));
}
if ($request->filled('company_id')) {
$accessories->where('accessories.company_id', '=', $request->input('company_id'));
}
@@ -129,9 +162,13 @@ class AccessoriesController extends Controller
/**
* Store a newly created resource in storage.
* Create Accessory
*
* @param \App\Http\Requests\ImageUploadRequest $request
* @group Accessories
* @bodyParam name string required The name of the accessory. Example: Apple Bluetooth Keyboard
* @bodyParam qty int required The number of accessories to create. Example: 10
* @bodyParam category_id int required The ID of the category to assign this accessory to. Example: 1
* @bodyParam image file No-example
* @return \Illuminate\Http\JsonResponse
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
@@ -151,8 +188,9 @@ class AccessoriesController extends Controller
}
/**
* Display the specified resource.
* Show Accessory
*
* @group Accessories
* @param int $id
* @return array
* @author [A. Gianotto] [<snipe@snipe.net>]
@@ -167,26 +205,11 @@ class AccessoriesController extends Controller
}
/**
* Display the specified resource.
*
* @param int $id
* @return array
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
*/
public function accessory_detail($id)
{
$this->authorize('view', Accessory::class);
$accessory = Accessory::findOrFail($id);
return (new AccessoriesTransformer)->transformAccessory($accessory);
}
/**
* Get the list of checkouts for a specific accessory
* Show Accessory Checkouts
*
* @group Accessories
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param int $id
@@ -216,8 +239,9 @@ class AccessoriesController extends Controller
/**
* Update the specified resource in storage.
* Update accessory.
*
* @group Accessories
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param \App\Http\Requests\ImageUploadRequest $request
@@ -239,8 +263,9 @@ class AccessoriesController extends Controller
}
/**
* Remove the specified resource from storage.
* Delete Accessory
*
* @group Accessories
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param int $id
@@ -263,11 +288,12 @@ class AccessoriesController extends Controller
/**
* Save the Accessory checkout information.
* Checkout Accessory
*
* If Slack is enabled and/or asset acceptance is enabled, it will also
* trigger a Slack message and send an email.
*
* @group Accessories
* @param int $accessoryId
* @return \Illuminate\Http\JsonResponse
* @author [A. Gianotto] [<snipe@snipe.net>]
@@ -288,32 +314,43 @@ class AccessoriesController extends Controller
'note' => $request->input('note'),
]);
$accessory_checkout->created_by = auth()->id();
$accessory_checkout->save();
$payload = [
'accessory_id' => $accessory->id,
'assigned_to' => $target->id,
'assigned_type' => $target::class,
'note' => $request->input('note'),
'created_by' => auth()->id(),
'pivot' => $accessory_checkout->id,
];
}
// Set this value to be able to pass the qty through to the event
event(new CheckoutableCheckedOut($accessory, $target, auth()->user(), $request->input('note')));
return response()->json(Helper::formatStandardApiResponse('success', null, trans('admin/accessories/message.checkout.success')));
return response()->json(Helper::formatStandardApiResponse('success', $payload, trans('admin/accessories/message.checkout.success')));
}
/**
* Check in the item so that it can be checked out again to someone else
* Checkin Accessory
*
* @uses Accessory::checkin_email() to determine if an email can and should be sent
* @author [A. Gianotto] [<snipe@snipe.net>]
* @group Accessories
* @param Request $request
* @param int $accessoryUserId
* @param string $backto
* @return \Illuminate\Http\RedirectResponse
* @return JsonResponse
* @uses Accessory::checkin_email() to determine if an email can and should be sent
* @author [A. Gianotto] [<snipe@snipe.net>]
* @internal param int $accessoryId
*/
public function checkin(Request $request, $accessoryUserId = null)
{
if (is_null($accessory_checkout = AccessoryCheckout::find($accessoryUserId))) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/accessories/message.does_not_exist')));
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/accessories/message.does_not_exist', ['id' => $accessoryUserId])));
}
$accessory = Accessory::find($accessory_checkout->accessory_id);
@@ -327,7 +364,14 @@ class AccessoriesController extends Controller
$user = User::find($accessory_checkout->assigned_to);
}
return response()->json(Helper::formatStandardApiResponse('success', null, trans('admin/accessories/message.checkin.success')));
$payload = [
'accessory_id' => $accessory->id,
'note' => $request->input('note'),
'created_by' => auth()->id(),
'pivot' => $accessory_checkout->id,
];
return response()->json(Helper::formatStandardApiResponse('success', $payload, trans('admin/accessories/message.checkin.success')));
}
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/accessories/message.checkin.error')));
@@ -336,8 +380,10 @@ class AccessoriesController extends Controller
/**
* Gets a paginated collection for the select2 menus
* Selectlist
*
* @group Accessories
* @queryParam search string A search term to filter results by name. No-example
* @see \App\Http\Transformers\SelectlistTransformer
*
*/

View File

@@ -25,8 +25,9 @@ use Illuminate\Http\JsonResponse;
class AssetModelsController extends Controller
{
/**
* Display a listing of the resource.
* List Models
*
* @group Models
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
*/
@@ -46,10 +47,20 @@ class AssetModelsController extends Controller
'manufacturer',
'requestable',
'assets_count',
'assets_assigned_count',
'assets_archived_count',
'remaining',
'category',
'fieldset',
'deleted_at',
'updated_at',
'require_serial',
// These are *relationships* so we wouldn't normally include them in this array,
// since they would normally create a `column not found` error,
// BUT we account for them in the ordering switch down at the end of this method
// DO NOT ADD ANYTHING TO THIS LIST WITHOUT CHECKING THE ORDERING SWITCH BELOW!
'manufacturer',
'category',
];
$assetmodels = AssetModel::select([
@@ -69,9 +80,31 @@ class AssetModelsController extends Controller
'models.fieldset_id',
'models.deleted_at',
'models.updated_at',
'models.require_serial'
])
->with('category', 'depreciation', 'manufacturer', 'fieldset.fields.defaultValues', 'adminuser')
->withCount('assets as assets_count');
->withCount('assets as assets_count')
->withCount('availableAssets as remaining')
->withCount('assignedAssets as assets_assigned_count')
->withCount('archivedAssets as assets_archived_count');
$filter = [];
if ($request->filled('filter')) {
$filter = json_decode($request->input('filter'), true);
$filter = array_filter($filter, function ($key) use ($allowed_columns) {
return in_array($key, $allowed_columns);
}, ARRAY_FILTER_USE_KEY);
}
if ((! is_null($filter)) && (count($filter)) > 0) {
$assetmodels->ByFilter($filter);
} elseif ($request->filled('search')) {
$assetmodels->TextSearch($request->input('search'));
}
if ($request->input('status')=='deleted') {
$assetmodels->onlyTrashed();
@@ -140,8 +173,9 @@ class AssetModelsController extends Controller
/**
* Store a newly created resource in storage.
* Create Model
*
* @group Models
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param \App\Http\Requests\StoreAssetModelRequest $request
@@ -162,11 +196,12 @@ class AssetModelsController extends Controller
}
/**
* Display the specified resource.
* Show Model
*
* @group Models
* @urlParam id int required The ID of the model.
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param int $id
*/
public function show($id) : array
{
@@ -177,11 +212,13 @@ class AssetModelsController extends Controller
}
/**
* Display the specified resource's assets
* List Assets in Model
*
* @group Models
* @urlParam id int required The ID of the model.
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param int $id
*
*/
public function assets($id) : array
{
@@ -193,12 +230,12 @@ class AssetModelsController extends Controller
/**
* Update the specified resource in storage.
* Update Model
*
* @group Models
* @urlParam id int required The ID of the model.
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param \App\Http\Requests\ImageUploadRequest $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(StoreAssetModelRequest $request, $id) : JsonResponse
@@ -229,11 +266,12 @@ class AssetModelsController extends Controller
}
/**
* Remove the specified resource from storage.
* Delete Model
*
* @group Models
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param int $id
* @urlParam id int required The ID of the model.
*/
public function destroy($id) : JsonResponse
{
@@ -259,8 +297,9 @@ class AssetModelsController extends Controller
}
/**
* Gets a paginated collection for the select2 menus
* Selectlist of Models
*
* @group Models
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0.16]
* @see \App\Http\Transformers\SelectlistTransformer

View File

@@ -6,6 +6,7 @@ use App\Events\CheckoutableCheckedIn;
use App\Http\Requests\StoreAssetRequest;
use App\Http\Requests\UpdateAssetRequest;
use App\Http\Traits\MigratesLegacyAssetLocations;
use App\Http\Transformers\ComponentsTransformer;
use App\Models\AccessoryCheckout;
use App\Models\CheckoutAcceptance;
use App\Models\LicenseSeat;
@@ -49,10 +50,32 @@ class AssetsController extends Controller
use MigratesLegacyAssetLocations;
/**
* Returns JSON listing of all assets
* List Assets
*
* @group Assets
* @queryParam action string The action to filter by: audits, checkins. No-example
* @queryParam upcoming_status string The status to filter by: `due`, `overdue`, `due-or-overdue`. No-example
* @queryParam status string The asset status to filter by: `RTD`, `Deployed`, `Pending`, `Undeployable`, `Archived`, `Requestable`. No-example
* @queryParam status_id int The asset status ID to filter by. No-example
* @queryParam asset_tag string The asset tag to filter by. No-example
* @queryParam serial string The serial number to filter by. No-example
* @queryParam requestable boolean Filter by requestable assets. No-example
* @queryParam model_id int The model ID or IDs to filter by. No-example
* @queryParam category_id int The category ID to filter by. No-example
* @queryParam location_id int The location ID to filter by. No-example
* @queryParam rtd_location_id int The RTD location ID to filter by. No-example
* @queryParam supplier_id int The supplier ID to filter by. No-example
* @queryParam asset_eol_date date The asset end-of-life date to filter by. No-example
* @queryParam assigned_to int The user ID or department ID the asset is assigned to. No-example
* @queryParam assigned_type string The type of assignment, either 'user' or 'asset' or 'location'. Example: user
* @queryParam company_id int The company ID to filter by. No-example
* @queryParam manufacturer_id int The manufacturer ID to filter by. No-example
* @queryParam depreciation_id int The depreciation ID to filter by. No-example
* @queryParam byod boolean Filter by BYOD assets. Example: true
* @queryParam order_number string The order number to filter by. Example: No-example
* @queryParam search string A text string to search for. Example: No-example
* @queryParam filter string A JSON object of key/value pairs to filter by. No-example
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $assetId
* @since [v4.0]
*/
public function index(Request $request, $action = null, $upcoming_status = null) : JsonResponse | array
@@ -115,17 +138,39 @@ class AssetsController extends Controller
'asset_eol_date',
'requestable',
'jobtitle',
// These are *relationships* so we wouldn't normally include them in this array,
// since they would normally create a `column not found` error,
// BUT we account for them in the ordering switch down at the end of this method
// DO NOT ADD ANYTHING TO THIS LIST WITHOUT CHECKING THE ORDERING SWITCH BELOW!
'company',
'model',
'location',
'rtd_location',
'category',
'status_label',
'manufacturer',
'supplier',
'jobtitle',
'assigned_to',
'created_by',
];
$all_custom_fields = CustomField::all(); //used as a 'cache' of custom fields throughout this page load
foreach ($all_custom_fields as $field) {
$allowed_columns[] = $field->db_column_name();
}
$filter = [];
if ($request->filled('filter')) {
$filter = json_decode($request->input('filter'), true);
}
$all_custom_fields = CustomField::all(); //used as a 'cache' of custom fields throughout this page load
foreach ($all_custom_fields as $field) {
$allowed_columns[] = $field->db_column_name();
$filter = array_filter($filter, function ($key) use ($allowed_columns) {
return in_array($key, $allowed_columns);
}, ARRAY_FILTER_USE_KEY);
}
$assets = Asset::select('assets.*')
@@ -141,6 +186,7 @@ class AssetsController extends Controller
'model.category',
'model.manufacturer',
'model.fieldset',
'model.depreciation',
'supplier'
); // it might be tempting to add 'assetlog' here, but don't. It blows up update-heavy users.
@@ -451,9 +497,10 @@ class AssetsController extends Controller
/**
* Returns JSON with information about an asset (by tag) for detail view.
* Lookup by Tag
*
* @param string $tag
* @group Assets
* @urlParam $tag string required The asset tag. Example: 1
* @since [v4.2.1]
* @author [A. Gianotto] [<snipe@snipe.net>]
*/
@@ -486,10 +533,11 @@ class AssetsController extends Controller
}
/**
* Returns JSON with information about an asset (by serial) for detail view.
* Lookup by Serial
*
* @group Assets
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param string $serial
* @urlParam $serial string
* @since [v4.2.1]
* @return \Illuminate\Http\JsonResponse
*/
@@ -529,10 +577,11 @@ class AssetsController extends Controller
}
/**
* Returns JSON with information about an asset for detail view.
* Show Asset
*
* @group Assets
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $assetId
* @queryParam $assetId int required The asset ID. Example: 1
* @since [v4.0]
* @return \Illuminate\Http\JsonResponse
*/
@@ -549,6 +598,13 @@ class AssetsController extends Controller
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/hardware/message.does_not_exist')), 200);
}
/**
* Licenses Assigned to Asset
*
* @group Assets
* @queryParam $assetId int required The asset ID. Example: 1
* @return \Illuminate\Http\JsonResponse
*/
public function licenses(Request $request, $id): array
{
$this->authorize('view', Asset::class);
@@ -561,8 +617,12 @@ class AssetsController extends Controller
/**
* Gets a paginated collection for the select2 menus
* Selectlist
*
* @group Assets
* @queryParam $search string String to search on. No-example
* @queryParam $companyId int Company ID to filter by. No-example
* @queryParam $assetStatusType string The asset status type to filter by: `RTD`. No-example
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0.16]
* @see \App\Http\Transformers\SelectlistTransformer
@@ -604,7 +664,7 @@ class AssetsController extends Controller
$asset->use_text = $asset->present()->fullName;
if (($asset->checkedOutToUser()) && ($asset->assigned)) {
$asset->use_text .= ' → ' . $asset->assigned->getFullNameAttribute();
$asset->use_text .= ' → ' . $asset->assigned->display_name;
}
@@ -620,8 +680,9 @@ class AssetsController extends Controller
/**
* Accepts a POST request to create a new asset
* Create Asset
*
* @group Assets
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param \App\Http\Requests\ImageUploadRequest $request
* @since [v4.0]
@@ -715,8 +776,15 @@ class AssetsController extends Controller
/**
* Accepts a POST request to update an asset
* Update Asset
*
* @group Assets
* @queryParam model_id int The model ID to associate the asset with. Example: 1
* @queryParam company_id int The company ID to associate the asset with. Example: 1
* @queryParam rtd_location_id int The RTD location ID to associate the asset with. Example: 1
* @queryParam last_audit_date date The last audit date for the asset. Example: 2023-12-31
* @queryParam image file The image file to upload for the asset. Example: (binary)
* @param \App\Http\Requests\UpdateAssetRequest $request
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
*/
@@ -807,8 +875,10 @@ class AssetsController extends Controller
/**
* Delete a given asset (mark as deleted).
* Delete Asset
*
* @group Assets
* @param int $id
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $assetId
* @since [v4.0]
@@ -842,8 +912,9 @@ class AssetsController extends Controller
/**
* Restore a soft-deleted asset.
* Restore Asset
*
* @group Assets
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $assetId
* @since [v5.1.18]
@@ -870,8 +941,9 @@ class AssetsController extends Controller
}
/**
* Checkout an asset by its tag.
* Checkout by Asset Tag
*
* @group Assets
* @author [N. Butler]
* @param string $tag
* @since [v6.0.5]
@@ -885,8 +957,9 @@ class AssetsController extends Controller
}
/**
* Checkout an asset
* Checkout Asset
*
* @group Assets
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $assetId
* @since [v4.0]
@@ -960,8 +1033,9 @@ class AssetsController extends Controller
/**
* Checkin an asset
* Checkin Asset
*
* @group Assets
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $assetId
* @since [v4.0]
@@ -1045,8 +1119,9 @@ class AssetsController extends Controller
}
/**
* Checkin an asset by asset tag
* Checkin by Asset Tag
*
* @group Assets
* @author [A. Janes] [<ajanes@adagiohealth.org>]
* @since [v6.0]
*/
@@ -1069,8 +1144,9 @@ class AssetsController extends Controller
/**
* Mark an asset as audited
* Audit Asset
*
* @group Assets
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $id
* @since [v4.0]
@@ -1194,8 +1270,9 @@ class AssetsController extends Controller
/**
* Returns JSON listing of all requestable assets
* Show Requestable Assets
*
* @group Assets
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
*/
@@ -1282,13 +1359,33 @@ class AssetsController extends Controller
}
/**
* List Assets Assigned to Asset
*
* @group Assets
*/
public function assignedAssets(Request $request, Asset $asset) : JsonResponse | array
{
$this->authorize('view', Asset::class);
$this->authorize('view', $asset);
return [];
// to do
$query = Asset::where([
'assigned_to' => $asset->id,
'assigned_type' => Asset::class,
]);
$total = $query->count();
$assets = $query->applyOffsetAndLimit($total)->get();
return (new AssetsTransformer)->transformAssets($assets, $total);
}
/**
* List Accessories Assigned to Asset
*
* @group Assets
*/
public function assignedAccessories(Request $request, Asset $asset) : JsonResponse | array
{
$this->authorize('view', Asset::class);
@@ -1306,12 +1403,29 @@ class AssetsController extends Controller
return (new AssetsTransformer)->transformCheckedoutAccessories($accessory_checkouts, $total);
}
/**
* List Components Assigned to Asset
*
* @group Assets
*/
public function assignedComponents(Request $request, Asset $asset): JsonResponse|array
{
$this->authorize('view', Asset::class);
$this->authorize('view', $asset);
$asset->loadCount('components');
$total = $asset->components_count;
$components = $asset->load(['components' => fn($query) => $query->applyOffsetAndLimit($total)])->components;
return (new ComponentsTransformer)->transformComponents($components, $total);
}
/**
* Generate asset labels by tag
* Generate Label by Asset Tag
*
* @group Assets
* @author [Nebelkreis] [https://github.com/NebelKreis]
*
* @param Request $request Contains asset_tags array of asset tags to generate labels for
* @return JsonResponse Returns base64 encoded PDF on success, error message on failure
*/

View File

@@ -15,8 +15,9 @@ use Illuminate\Support\Facades\Storage;
class CategoriesController extends Controller
{
/**
* Display a listing of the resource.
* List Categories
*
* @group Categories
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @return \Illuminate\Http\Response
@@ -38,6 +39,8 @@ class CategoriesController extends Controller
'consumables_count',
'components_count',
'licenses_count',
'created_at',
'updated_at',
'image',
'notes',
];
@@ -59,6 +62,23 @@ class CategoriesController extends Controller
->withCount('accessories as accessories_count', 'consumables as consumables_count', 'components as components_count', 'licenses as licenses_count', 'models as models_count');
$filter = [];
if ($request->filled('filter')) {
$filter = json_decode($request->input('filter'), true);
$filter = array_filter($filter, function ($key) use ($allowed_columns) {
return in_array($key, $allowed_columns);
}, ARRAY_FILTER_USE_KEY);
}
if ((! is_null($filter)) && (count($filter)) > 0) {
$categories->ByFilter($filter);
} elseif ($request->filled('search')) {
$categories->TextSearch($request->input('search'));
}
/*
* This checks to see if we should override the Admin Setting to show archived assets in list.
* We don't currently use it within the Snipe-IT GUI, but will be useful for API integrations where they
@@ -72,10 +92,6 @@ class CategoriesController extends Controller
$categories = $categories->withCount('showableAssets as assets_count');
}
if ($request->filled('search')) {
$categories = $categories->TextSearch($request->input('search'));
}
if ($request->filled('name')) {
$categories->where('name', '=', $request->input('name'));
}
@@ -133,8 +149,9 @@ class CategoriesController extends Controller
/**
* Store a newly created resource in storage.
* Create Category
*
* @group Categories
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param \App\Http\Requests\ImageUploadRequest $request
@@ -156,8 +173,9 @@ class CategoriesController extends Controller
}
/**
* Display the specified resource.
* Show Category
*
* @group Categories
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param int $id
@@ -172,8 +190,9 @@ class CategoriesController extends Controller
/**
* Update the specified resource in storage.
* Update Category
*
* @group Categories
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param \App\Http\Requests\ImageUploadRequest $request
@@ -202,8 +221,9 @@ class CategoriesController extends Controller
}
/**
* Remove the specified resource from storage.
* Delete Category
*
* @group Categories
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param int $id
@@ -226,8 +246,9 @@ class CategoriesController extends Controller
/**
* Gets a paginated collection for the select2 menus
* Selectlist
*
* @group Categories
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0.16]
* @see \App\Http\Transformers\SelectlistTransformer

View File

@@ -14,6 +14,11 @@ use Exception;
class CheckoutRequest extends Controller
{
/**
* Store Asset Request
*
* @group Account
*/
public function store(Asset $asset): JsonResponse
{
try {
@@ -29,6 +34,11 @@ class CheckoutRequest extends Controller
}
}
/**
* Cancel Asset Request
*
* @group Account
*/
public function destroy(Asset $asset): JsonResponse
{
try {

View File

@@ -15,8 +15,9 @@ use Illuminate\Http\JsonResponse;
class CompaniesController extends Controller
{
/**
* Display a listing of the resource.
* List Companies
*
* @group Companies
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
*/
@@ -90,11 +91,12 @@ class CompaniesController extends Controller
/**
* Store a newly created resource in storage.
* Create Company
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @group Companies
* @param \App\Http\Requests\ImageUploadRequest $request
*@since [v4.0]
* @author [A. Gianotto] [<snipe@snipe.net>]
*/
public function store(ImageUploadRequest $request) : JsonResponse
{
@@ -112,11 +114,12 @@ class CompaniesController extends Controller
}
/**
* Display the specified resource.
* Show Company
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @group Companies
* @param int $id
* @since [v4.0]
* @author [A. Gianotto] [<snipe@snipe.net>]
*/
public function show($id) : array
{
@@ -129,12 +132,13 @@ class CompaniesController extends Controller
/**
* Update the specified resource in storage.
* Update Company
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @group Companies
* @param \App\Http\Requests\ImageUploadRequest $request
* @param int $id
*@author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
*/
public function update(ImageUploadRequest $request, $id) : JsonResponse
{
@@ -154,11 +158,12 @@ class CompaniesController extends Controller
}
/**
* Remove the specified resource from storage.
* Delete Company
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @group Companies
* @param int $id
* @since [v4.0]
* @author [A. Gianotto] [<snipe@snipe.net>]
*/
public function destroy($id) : JsonResponse
{
@@ -177,8 +182,9 @@ class CompaniesController extends Controller
}
/**
* Gets a paginated collection for the select2 menus
* Selectlist
*
* @group Companies
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0.16]
* @see \App\Http\Transformers\SelectlistTransformer

View File

@@ -20,8 +20,9 @@ use Carbon\Carbon;
class ComponentsController extends Controller
{
/**
* Display a listing of the resource.
* List Categories
*
* @group Components
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
*
@@ -45,16 +46,40 @@ class ComponentsController extends Controller
'qty',
'image',
'notes',
// These are *relationships* so we wouldn't normally include them in this array,
// since they would normally create a `column not found` error,
// BUT we account for them in the ordering switch down at the end of this method
// DO NOT ADD ANYTHING TO THIS LIST WITHOUT CHECKING THE ORDERING SWITCH BELOW!
'company',
'location',
'category',
'manufacturer',
'supplier',
];
$components = Component::select('components.*')
->with('company', 'location', 'category', 'assets', 'supplier', 'adminuser', 'manufacturer', 'uncontrainedAssets')
->withSum('uncontrainedAssets', 'components_assets.assigned_qty');
if ($request->filled('search')) {
$components = $components->TextSearch($request->input('search'));
$filter = [];
if ($request->filled('filter')) {
$filter = json_decode($request->input('filter'), true);
$filter = array_filter($filter, function ($key) use ($allowed_columns) {
return in_array($key, $allowed_columns);
}, ARRAY_FILTER_USE_KEY);
}
if ((! is_null($filter)) && (count($filter)) > 0) {
$components->ByFilter($filter);
} elseif ($request->filled('search')) {
$components->TextSearch($request->input('search'));
}
if ($request->filled('name')) {
$components->where('name', '=', $request->input('name'));
}
@@ -127,8 +152,9 @@ class ComponentsController extends Controller
/**
* Store a newly created resource in storage.
* Create Component
*
* @group Components
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param \App\Http\Requests\ImageUploadRequest $request
@@ -148,8 +174,9 @@ class ComponentsController extends Controller
}
/**
* Display the specified resource.
* Show Component
*
* @group Components
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $id
*/
@@ -164,8 +191,9 @@ class ComponentsController extends Controller
}
/**
* Update the specified resource in storage.
* Update Component
*
* @group Components
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param \App\Http\Requests\ImageUploadRequest $request
@@ -187,8 +215,9 @@ class ComponentsController extends Controller
}
/**
* Remove the specified resource from storage.
* Delete Component
*
* @group Components
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param int $id
@@ -209,8 +238,9 @@ class ComponentsController extends Controller
}
/**
* Display all assets attached to a component
* Component Assets
*
* @group Components
* @author [A. Bergamasco] [@vjandrea]
* @since [v4.0]
* @param Request $request
@@ -250,10 +280,10 @@ class ComponentsController extends Controller
/**
* Validate and checkout the component.
* Checkout Component
*
* @group Components
* @author [A. Gianotto] [<snipe@snipe.net>]
* t
* @since [v5.1.8]
* @param Request $request
* @param int $componentId
@@ -305,8 +335,9 @@ class ComponentsController extends Controller
}
/**
* Validate and store checkin data.
* Checkin Component
*
* @group Components
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v5.1.8]
* @param Request $request

View File

@@ -19,8 +19,21 @@ use Illuminate\Http\JsonResponse;
class ConsumablesController extends Controller
{
/**
* Display a listing of the resource.
* List Consumables
*
* @group Consumables
* @queryParam filter string A JSON encoded array of key/value pairs to filter results by. Example: {"company":"1","location":"2"}
* @queryParam search string A search term to filter results by.
* @queryParam name string Filter by exact name.
* @queryParam company_id integer Filter by exact company ID.
* @queryParam category_id integer Filter by exact category ID.
* @queryParam model_number string Filter by exact model number.
* @queryParam manufacturer_id integer Filter by exact manufacturer ID.
* @queryParam supplier_id integer Filter by exact supplier ID.
* @queryParam location_id integer Filter by exact location ID.
* @queryParam notes string Filter by exact notes.
* @queryParam sort string The column to sort results by. Must be one of the following: id, name, order_number, min_amt, purchase_date, purchase_cost, company, category, model_number, item_no, manufacturer, location, qty, image, company, location, category, supplier, manufacturer. Default is created_at.
* @queryParam order string The order to sort results by. Must be one of the following: asc, desc. Default is desc.
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
*/
@@ -31,10 +44,53 @@ class ConsumablesController extends Controller
$consumables = Consumable::with('company', 'location', 'category', 'supplier', 'manufacturer')
->withCount('users as consumables_users_count');
if ($request->filled('search')) {
$consumables = $consumables->TextSearch(e($request->input('search')));
// This array is what determines which fields should be allowed to be sorted on ON the table itself.
// These must match a column on the consumables table directly.
$allowed_columns = [
'id',
'name',
'order_number',
'min_amt',
'purchase_date',
'purchase_cost',
'company',
'category',
'model_number',
'item_no',
'manufacturer',
'location',
'qty',
'image',
// These are *relationships* so we wouldn't normally include them in this array,
// since they would normally create a `column not found` error,
// BUT we account for them in the ordering switch down at the end of this method
// DO NOT ADD ANYTHING TO THIS LIST WITHOUT CHECKING THE ORDERING SWITCH BELOW!
'company',
'location',
'category',
'supplier',
'manufacturer',
];
$filter = [];
if ($request->filled('filter')) {
$filter = json_decode($request->input('filter'), true);
$filter = array_filter($filter, function ($key) use ($allowed_columns) {
return in_array($key, $allowed_columns);
}, ARRAY_FILTER_USE_KEY);
}
if ((! is_null($filter)) && (count($filter)) > 0) {
$consumables->ByFilter($filter);
} elseif ($request->filled('search')) {
$consumables->TextSearch($request->input('search'));
}
if ($request->filled('name')) {
$consumables->where('name', '=', $request->input('name'));
}
@@ -96,25 +152,6 @@ class ConsumablesController extends Controller
$consumables = $consumables->OrderByCreatedBy($order);
break;
default:
// This array is what determines which fields should be allowed to be sorted on ON the table itself.
// These must match a column on the consumables table directly.
$allowed_columns = [
'id',
'name',
'order_number',
'min_amt',
'purchase_date',
'purchase_cost',
'company',
'category',
'model_number',
'item_no',
'manufacturer',
'location',
'qty',
'image'
];
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'created_at';
$consumables = $consumables->orderBy($sort, $order);
break;
@@ -129,6 +166,7 @@ class ConsumablesController extends Controller
/**
* Store a newly created resource in storage.
*
* @group Consumables
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param \App\Http\Requests\ImageUploadRequest $request
@@ -148,8 +186,9 @@ class ConsumablesController extends Controller
}
/**
* Display the specified resource.
* Show Consumable
*
* @group Consumables
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $id
*/
@@ -162,8 +201,9 @@ class ConsumablesController extends Controller
}
/**
* Update the specified resource in storage.
* Update Consumable
*
* @group Consumables
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param \App\Http\Requests\ImageUploadRequest $request
@@ -184,8 +224,9 @@ class ConsumablesController extends Controller
}
/**
* Remove the specified resource from storage.
* Delete Consumable
*
* @group Consumables
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param int $id
@@ -201,8 +242,9 @@ class ConsumablesController extends Controller
}
/**
* Returns a JSON response containing details on the users associated with this consumable.
* User Assignments
*
* @group Consumables
* @author [A. Gianotto] [<snipe@snipe.net>]
* @see \App\Http\Controllers\Consumables\ConsumablesController::getView() method that returns the form.
* @since [v1.0]
@@ -228,11 +270,16 @@ class ConsumablesController extends Controller
foreach ($consumable->consumableAssignments as $consumable_assignment) {
$rows[] = [
'avatar' => ($consumable_assignment->user) ? e($consumable_assignment->user->present()->gravatar) : '',
'name' => ($consumable_assignment->user) ? $consumable_assignment->user->present()->nameUrl() : 'Deleted User',
'user' => ($consumable_assignment->user) ? [
'id' => (int) $consumable_assignment->user->id,
'name'=> e($consumable_assignment->user->display_name),
] : null,
'created_at' => Helper::getFormattedDateObject($consumable_assignment->created_at, 'datetime'),
'note' => ($consumable_assignment->note) ? e($consumable_assignment->note) : null,
'admin' => ($consumable_assignment->adminuser) ? $consumable_assignment->adminuser->present()->nameUrl() : null, // legacy, so we don't change the shape of the response
'created_by' => ($consumable_assignment->adminuser) ? $consumable_assignment->adminuser->present()->nameUrl() : null,
'created_by' => ($consumable_assignment->adminuser) ? [
'id' => (int) $consumable_assignment->adminuser->id,
'name'=> e($consumable_assignment->adminuser->display_name),
] : null,
];
}
@@ -243,8 +290,9 @@ class ConsumablesController extends Controller
}
/**
* Checkout a consumable
* Checkout Consumable
*
* @group Consumables
* @author [A. Gutierrez] [<andres@baller.tv>]
* @param int $id
* @since [v4.9.5]
@@ -305,8 +353,9 @@ class ConsumablesController extends Controller
}
/**
* Gets a paginated collection for the select2 menus
* Selectlist
*
* @group Consumables
* @see \App\Http\Transformers\SelectlistTransformer
*/
public function selectlist(Request $request) : array

View File

@@ -14,8 +14,9 @@ use Illuminate\Http\JsonResponse;
class CustomFieldsController extends Controller
{
/**
* Reorder the custom fields within a fieldset
* List Custom Fields
*
* @group Custom Fields
* @author [Brady Wetherington] [<uberbrady@gmail.com>]
* @param int $id
* @since [v3.0]
@@ -30,7 +31,9 @@ class CustomFieldsController extends Controller
}
/**
* Shows the given field
* Show Field
*
* @group Custom Fields
* @author [V. Cordes] [<volker@fdatek.de>]
* @param int $id
* @since [v4.1.10]
@@ -46,8 +49,9 @@ class CustomFieldsController extends Controller
}
/**
* Update the specified field
* Update Field
*
* @group Custom Fields
* @author [V. Cordes] [<volker@fdatek.de>]
* @since [v4.1.10]
* @param \Illuminate\Http\Request $request
@@ -80,8 +84,9 @@ class CustomFieldsController extends Controller
}
/**
* Store a newly created field.
* Create Field
*
* @group Custom Fields
* @author [V. Cordes] [<volker@fdatek.de>]
* @since [v4.1.10]
* @param \Illuminate\Http\Request $request
@@ -112,6 +117,12 @@ class CustomFieldsController extends Controller
return response()->json(Helper::formatStandardApiResponse('error', null, $field->getErrors()));
}
/**
* Reorder Fields
*
* @group Custom Fields
* @param \Illuminate\Http\Request $request
*/
public function postReorder(Request $request, $id)
{
$fieldset = CustomFieldset::find($id);
@@ -134,6 +145,12 @@ class CustomFieldsController extends Controller
return $fieldset->fields()->sync($fields);
}
/**
* Add Field to Fieldset
*
* @group Custom Fields
* @param \Illuminate\Http\Request $request
*/
public function associate(Request $request, $field_id) : JsonResponse
{
$this->authorize('update', CustomFieldset::class);
@@ -153,6 +170,12 @@ class CustomFieldsController extends Controller
return response()->json(Helper::formatStandardApiResponse('success', $fieldset, trans('admin/custom_fields/message.fieldset.update.success')));
}
/**
* Remove Field from Fieldset
*
* @group Custom Fields
* @param \Illuminate\Http\Request $request
*/
public function disassociate(Request $request, $field_id) : JsonResponse
{
$this->authorize('update', CustomFieldset::class);
@@ -172,8 +195,9 @@ class CustomFieldsController extends Controller
}
/**
* Delete a custom field.
* Delete Field
*
* @group Custom Fields
* @author [Brady Wetherington] [<uberbrady@gmail.com>]
* @since [v1.8]
*/

View File

@@ -24,7 +24,10 @@ use Illuminate\Http\JsonResponse;
class CustomFieldsetsController extends Controller
{
/**
* Shows the given fieldset and its fields
* List Fieldsets
*
* @group Custom Fields
* @subgroup Custom Fieldsets
* @author [A. Gianotto] [<snipe@snipe.net>]
* @author [Josh Gibson]
* @param int $id
@@ -39,10 +42,13 @@ class CustomFieldsetsController extends Controller
}
/**
* Shows the given fieldset and its fields
* @author [A. Gianotto] [<snipe@snipe.net>]
* @author [Josh Gibson]
* Show Fieldset and Fields
*
* @group Custom Fields
* @subgroup Custom Fieldsets
* @param int $id
* @author [Josh Gibson]
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v1.8]
*/
public function show($id) : JsonResponse | array
@@ -56,12 +62,14 @@ class CustomFieldsetsController extends Controller
}
/**
* Update the specified resource in storage.
* Update Fieldset
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @group Custom Fields
* @subgroup Custom Fieldsets
* @param \Illuminate\Http\Request $request
* @param int $id
*@author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
*/
public function update(Request $request, $id) : JsonResponse
{
@@ -77,11 +85,13 @@ class CustomFieldsetsController extends Controller
}
/**
* Store a newly created resource in storage.
* Create Fieldset
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @group Custom Fields
* @subgroup Custom Fieldsets
* @param \Illuminate\Http\Request $request
*@since [v4.0]
* @author [A. Gianotto] [<snipe@snipe.net>]
*/
public function store(Request $request) : JsonResponse
{
@@ -109,8 +119,10 @@ class CustomFieldsetsController extends Controller
}
/**
* Delete a custom fieldset.
* Delete Fieldset
*
* @group Custom Fields
* @subgroup Custom Fieldsets
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
*/
@@ -134,12 +146,14 @@ class CustomFieldsetsController extends Controller
}
/**
* Return JSON containing a list of fields belonging to a fieldset.
* Show Fields in Fieldset
*
* @author [V. Cordes] [<volker@fdatek.de>]
* @since [v4.1.10]
* @group Custom Fields
* @subgroup Custom Fieldsets
* @param $fieldsetId
* @return string JSON
* @author [V. Cordes] [<volker@fdatek.de>]
* @since [v4.1.10]
*/
public function fields($id) : array
{
@@ -151,9 +165,10 @@ class CustomFieldsetsController extends Controller
}
/**
* Return JSON containing a list of fields belonging to a fieldset with the
* default values for a given model
* Fields in Fieldset with Default Values for Model
*
* @group Custom Fields
* @subgroup Custom Fieldsets
* @param $modelId
* @param $fieldsetId
* @return string JSON

View File

@@ -15,8 +15,18 @@ use Illuminate\Http\JsonResponse;
class DepartmentsController extends Controller
{
/**
* Display a listing of the resource.
* List Departments
*
* @group Departments
* @queryParam search string Search term to filter results. Example: IT
* @queryParam name string Filter by exact department name. Example: IT
* @queryParam company_id integer Filter by exact company ID. Example: 1
* @queryParam manager_id integer Filter by exact manager (user) ID. Example:
* @queryParam location_id integer Filter by exact location ID. Example: 1
* @queryParam sort string Column to sort results by. Allowed values: id, name, image, users_count, notes, created_at, updated_at, location, manager, company. Default: created_at. Example: name
* @queryParam order string Order of sorted results. Allowed values: asc, desc. Default: desc. Example: asc
* @queryParam offset integer Offset/starting position of the results. Default: 0. Example: 0
* @queryParam limit integer Limit the number of results returned. Default: 25. Maximum: 100. Example: 50
* @author [Godfrey Martinez] [<snipe@snipe.net>]
* @since [v4.0]
*/
@@ -88,8 +98,9 @@ class DepartmentsController extends Controller
}
/**
* Store a newly created resource in storage.
* Create Department
*
* @group Departments
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param \App\Http\Requests\ImageUploadRequest $request
@@ -112,8 +123,9 @@ class DepartmentsController extends Controller
}
/**
* Display the specified resource.
* Show Department
*
* @group Departments
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param int $id
@@ -126,8 +138,9 @@ class DepartmentsController extends Controller
}
/**
* Update the specified resource in storage.
* Update Department
*
* @group Departments
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v5.0]
* @param \App\Http\Requests\ImageUploadRequest $request
@@ -149,8 +162,9 @@ class DepartmentsController extends Controller
/**
* Validates and deletes selected department.
* Delete Department
*
* @group Departments
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $locationId
* @since [v4.0]
@@ -171,8 +185,9 @@ class DepartmentsController extends Controller
}
/**
* Gets a paginated collection for the select2 menus
* Selectlist
*
* @group Departments
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0.16]
* @see \App\Http\Transformers\SelectlistTransformer

View File

@@ -12,8 +12,9 @@ use Illuminate\Http\JsonResponse;
class DepreciationsController extends Controller
{
/**
* Display a listing of the resource.
* List Depreciations
*
* @group Depreciations
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
*/
@@ -65,8 +66,9 @@ class DepreciationsController extends Controller
}
/**
* Store a newly created resource in storage.
* Create Depreciation
*
* @group Depreciations
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param \Illuminate\Http\Request $request
@@ -85,8 +87,9 @@ class DepreciationsController extends Controller
}
/**
* Display the specified resource.
* Show Depreciation
*
* @group Depreciations
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param int $id
@@ -100,8 +103,9 @@ class DepreciationsController extends Controller
}
/**
* Update the specified resource in storage.
* Update Depreciation
*
* @group Depreciations
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param \Illuminate\Http\Request $request
@@ -121,8 +125,9 @@ class DepreciationsController extends Controller
}
/**
* Remove the specified resource from storage.
* Delete Depreciation
*
* @group Depreciations
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param int $id

View File

@@ -15,6 +15,7 @@ class GroupsController extends Controller
/**
* Display a listing of the resource.
*
* @group User Groups
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
*/
@@ -65,8 +66,9 @@ class GroupsController extends Controller
}
/**
* Store a newly created resource in storage.
* Create Group
*
* @group User Groups
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param \Illuminate\Http\Request $request
@@ -92,8 +94,9 @@ class GroupsController extends Controller
}
/**
* Display the specified resource.
* Show Group
*
* @group User Groups
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param int $id
@@ -106,8 +109,9 @@ class GroupsController extends Controller
}
/**
* Update the specified resource in storage.
* Update Group
*
* @group User Groups
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param \Illuminate\Http\Request $request
@@ -132,6 +136,7 @@ class GroupsController extends Controller
/**
* Remove the specified resource from storage.
*
* @group User Groups
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param int $id

View File

@@ -24,8 +24,9 @@ use Illuminate\Http\JsonResponse;
class ImportController extends Controller
{
/**
* Display a listing of the resource.
* List Import Files
*
* @group Imports
*/
public function index() : JsonResponse | array
{
@@ -35,8 +36,9 @@ class ImportController extends Controller
}
/**
* Process and store a CSV upload file.
* Save Import File
*
* @group Imports
* @param \Illuminate\Http\Request $request
*/
public function store() : JsonResponse
@@ -69,7 +71,7 @@ class ImportController extends Controller
if (function_exists('iconv')) {
$file_contents = $file->getContent(); //TODO - this *does* load the whole file in RAM, but we need that to be able to 'iconv' it?
$encoding = $detector->getEncoding($file_contents);
\Log::warning("Discovered encoding: $encoding in uploaded CSV");
\Log::debug("Discovered encoding: $encoding in uploaded CSV");
$reader = null;
if (strcasecmp($encoding, 'UTF-8') != 0) {
$transliterated = false;
@@ -103,7 +105,7 @@ class ImportController extends Controller
$reader = Reader::createFromFileObject($file->openFile('r')); //file pointer leak?
try {
$import->header_row = $reader->fetchOne(0);
$import->header_row = $reader->nth(0);
} catch (JsonEncodingException $e) {
return response()->json(
Helper::formatStandardApiResponse(
@@ -136,7 +138,7 @@ class ImportController extends Controller
try {
// Grab the first row to display via ajax as the user picks fields
$import->first_row = $reader->fetchOne(1);
$import->first_row = $reader->nth(1);
} catch (JsonEncodingException $e) {
return response()->json(
Helper::formatStandardApiResponse(
@@ -184,8 +186,9 @@ class ImportController extends Controller
}
/**
* Processes the specified Import.
* Process Import
*
* @group Imports
* @param int $import_id
*/
public function process(ItemImportRequest $request, $import_id) : JsonResponse
@@ -195,7 +198,7 @@ class ImportController extends Controller
// Run a backup immediately before processing
if ($request->get('run-backup')) {
Log::debug('Backup manually requested via importer');
Artisan::call('snipeit:backup', ['--filename' => 'pre-import-backup-'.date('Y-m-d-H:i:s')]);
Artisan::call('snipeit:backup', ['--filename' => 'pre-import-backup-'.date('Y-m-d-H-i-s')]);
} else {
Log::debug('NO BACKUP requested via importer');
}
@@ -255,8 +258,9 @@ class ImportController extends Controller
}
/**
* Remove the specified resource from storage.
* Delete Import File
*
* @group Imports
* @param int $import_id
*/
public function destroy($import_id) : JsonResponse

View File

@@ -13,8 +13,9 @@ use Illuminate\Http\JsonResponse;
class LabelsController extends Controller
{
/**
* Returns JSON listing of all labels.
* List Labels
*
* @group Labels
* @author Grant Le Roux <grant.leroux+snipe-it@gmail.com>
*/
public function index(Request $request) : JsonResponse | array
@@ -45,8 +46,9 @@ class LabelsController extends Controller
}
/**
* Returns JSON with information about a label for detail view.
* Show Label
*
* @group Labels
* @author Grant Le Roux <grant.leroux+snipe-it@gmail.com>
* @param string $labelName
*/

View File

@@ -15,8 +15,10 @@ use Illuminate\Http\Request;
class LicenseSeatsController extends Controller
{
/**
* Display a listing of the resource.
* List License Seats
*
* @group Licenses
* @subgroup License Seats
* @param \Illuminate\Http\Request $request
* @param int $licenseId
*/
@@ -68,8 +70,10 @@ class LicenseSeatsController extends Controller
}
/**
* Display the specified resource.
* Show License Seat
*
* @group Licenses
* @subgroup License Seats
* @param int $licenseId
* @param int $seatId
*/
@@ -91,8 +95,10 @@ class LicenseSeatsController extends Controller
}
/**
* Update the specified resource in storage.
* Update License Seat
*
* @group Licenses
* @subgroup License Seats
* @param \Illuminate\Http\Request $request
* @param int $licenseId
* @param int $seatId
@@ -128,7 +134,9 @@ class LicenseSeatsController extends Controller
// nothing to update
return response()->json(Helper::formatStandardApiResponse('success', $licenseSeat, trans('admin/licenses/message.update.success')));
}
if( $touched && $licenseSeat->unreassignable_seat) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/licenses/message.checkout.unavailable')));
}
// the logging functions expect only one "target". if both asset and user are present in the request,
// we simply let assets take precedence over users...
if ($licenseSeat->isDirty('assigned_to')) {
@@ -145,7 +153,11 @@ class LicenseSeatsController extends Controller
if ($licenseSeat->save()) {
if ($is_checkin) {
$licenseSeat->logCheckin($target, $request->input('notes'));
if(!$licenseSeat->license->reassignable){
$licenseSeat->unreassignable_seat = true;
$licenseSeat->save();
}
$licenseSeat->logCheckin($target, $licenseSeat->notes);
return response()->json(Helper::formatStandardApiResponse('success', $licenseSeat, trans('admin/licenses/message.update.success')));
}

View File

@@ -7,6 +7,7 @@ use App\Http\Controllers\Controller;
use App\Http\Transformers\LicensesTransformer;
use App\Http\Transformers\SelectlistTransformer;
use App\Models\License;
use App\Models\Setting;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\JsonResponse;
@@ -14,8 +15,17 @@ use Illuminate\Http\JsonResponse;
class LicensesController extends Controller
{
/**
* Display a listing of the resource.
* List Licenses
*
* @group Licenses
* @queryParam status string Filter by license status. Options: active, inactive, expiring Example: ?status=active
* @queryParam company_id integer Filter by exact company ID. Example: 1
* @queryParam name string Filter by exact license name. Example: Microsoft 365
* @queryParam product_key string Filter by exact product key. Example: W269N
* @queryParam order_number string Filter by exact order number. Example: 12345
* @queryParam purchase_order string Filter by exact purchase order. Example: PO12345
* @queryParam license_name string Filter by exact licensee name. Example: John Doe
* @queryParam license_email string Filter by exact licensee email. Example: john.d
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
*
@@ -25,6 +35,15 @@ class LicensesController extends Controller
$this->authorize('view', License::class);
$licenses = License::with('company', 'manufacturer', 'supplier','category', 'adminuser')->withCount('freeSeats as free_seats_count');
$settings = Setting::getSettings();
if ($request->input('status')=='inactive') {
$licenses->ExpiredLicenses();
} elseif ($request->input('status')=='expiring') {
$licenses->ExpiringLicenses($settings->alert_interval);
} else {
$licenses->ActiveLicenses();
}
if ($request->filled('company_id')) {
$licenses->where('licenses.company_id', '=', $request->input('company_id'));
@@ -94,6 +113,8 @@ class LicensesController extends Controller
$licenses->onlyTrashed();
}
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $licenses->count()) ? $licenses->count() : app('api_offset_value');
$limit = app('api_limit_value');
@@ -154,8 +175,9 @@ class LicensesController extends Controller
}
/**
* Store a newly created resource in storage.
* Create License
*
* @group Licenses
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param \Illuminate\Http\Request $request
@@ -174,8 +196,9 @@ class LicensesController extends Controller
}
/**
* Display the specified resource.
* Show License
*
* @group Licenses
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $id
*/
@@ -189,8 +212,9 @@ class LicensesController extends Controller
}
/**
* Update the specified resource in storage.
* Update License
*
* @group Licenses
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param \Illuminate\Http\Request $request
@@ -212,8 +236,9 @@ class LicensesController extends Controller
}
/**
* Remove the specified resource from storage.
* Delete License
*
* @group Licenses
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param int $id
@@ -241,8 +266,9 @@ class LicensesController extends Controller
}
/**
* Gets a paginated collection for the select2 menus
* Selectlist
*
* @group Licenses
* @see \App\Http\Transformers\SelectlistTransformer
*/
public function selectlist(Request $request) : array

View File

@@ -23,11 +23,26 @@ use Illuminate\Support\Collection;
class LocationsController extends Controller
{
/**
* Display a listing of the resource.
* List Locations
*
* @group Locations
* @queryParam search string Search term to filter results. Example: Headquarters
* @queryParam name string Filter by exact location name. Example: Headquarters
* @queryParam address string Filter by exact address. Example: 123 Main St
* @queryParam address2 string Filter by exact address2. Example: Suite 100
* @queryParam city string Filter by exact city. Example: Springfield
* @queryParam zip string Filter by exact zip code. Example: 12345
* @queryParam country string Filter by exact country. Example: USA
* @queryParam manager_id integer Filter by exact manager (user) ID. Example: 1
* @queryParam company_id integer Filter by exact company ID. Example: 1
* @queryParam parent_id integer Filter by exact parent location ID. Example: 1
* @queryParam status string Filter by location status. Allowed values: active, deleted. Example: active
* @queryParam sort string Column to sort results by. Allowed values: accessorries_count, address, address2, assets_count, assigned_assets_count, rtd_assets_count, accessories_count, assigned_accessories_count, components_count, consumables_count, users_count, children_count, city, country, created_at, currency, id, image, ldap_ou, company_id, manager_id, name, rtd_assets_count, state, updated_at, zip. Default: created_at. Example: name
* @queryParam order string Order of sorted results. Allowed values: asc, desc. Default: desc. Example: asc
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @return \Illuminate\Http\Response
* @since [v4.0]
* @author [A. Gianotto] [<snipe@snipe.net>]
*/
public function index(Request $request) : JsonResponse | array
{
@@ -37,10 +52,14 @@ class LocationsController extends Controller
'address',
'address2',
'assets_count',
'assets_count',
'assigned_assets_count',
'rtd_assets_count',
'accessories_count',
'assigned_accessories_count',
'assigned_assets_count',
'assigned_assets_count',
'components_count',
'consumables_count',
'users_count',
'children_count',
'city',
'country',
'created_at',
@@ -54,7 +73,6 @@ class LocationsController extends Controller
'rtd_assets_count',
'state',
'updated_at',
'users_count',
'zip',
'notes',
];
@@ -79,8 +97,9 @@ class LocationsController extends Controller
'locations.currency',
'locations.company_id',
'locations.notes',
'locations.created_by',
'locations.deleted_at',
])
->withCount('assignedAssets as assigned_assets_count')
->withCount('assignedAssets as assigned_assets_count')
->withCount('assets as assets_count')
->withCount('assignedAccessories as assigned_accessories_count')
@@ -88,6 +107,8 @@ class LocationsController extends Controller
->withCount('rtd_assets as rtd_assets_count')
->withCount('children as children_count')
->withCount('users as users_count')
->withCount('consumables as consumables_count')
->withCount('components as components_count')
->with('adminuser');
// Only scope locations if the setting is enabled
@@ -131,6 +152,14 @@ class LocationsController extends Controller
$locations->where('locations.company_id', '=', $request->input('company_id'));
}
if ($request->filled('parent_id')) {
$locations->where('locations.parent_id', '=', $request->input('parent_id'));
}
if ($request->input('status') == 'deleted') {
$locations->onlyTrashed();
}
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $locations->count()) ? $locations->count() : app('api_offset_value');
$limit = app('api_limit_value');
@@ -138,8 +167,6 @@ class LocationsController extends Controller
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'created_at';
switch ($request->input('sort')) {
case 'parent':
$locations->OrderParent($order);
@@ -164,8 +191,9 @@ class LocationsController extends Controller
/**
* Store a newly created resource in storage.
* Create Location
*
* @group Locations
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param \App\Http\Requests\ImageUploadRequest $request
@@ -194,8 +222,9 @@ class LocationsController extends Controller
}
/**
* Display the specified resource.
* Show Location
*
* @group Locations
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param int $id
@@ -224,8 +253,13 @@ class LocationsController extends Controller
])
->withCount('assignedAssets as assigned_assets_count')
->withCount('assets as assets_count')
->withCount('assignedAccessories as assigned_accessories_count')
->withCount('accessories as accessories_count')
->withCount('rtd_assets as rtd_assets_count')
->withCount('children as children_count')
->withCount('users as users_count')
->withCount('consumables as consumables_count')
->withCount('components as components_count')
->findOrFail($id);
return (new LocationsTransformer)->transformLocation($location);
@@ -233,8 +267,9 @@ class LocationsController extends Controller
/**
* Update the specified resource in storage.
* Update Location
*
* @group Locations
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param \App\Http\Requests\ImageUploadRequest $request
@@ -276,7 +311,13 @@ class LocationsController extends Controller
return response()->json(Helper::formatStandardApiResponse('error', null, $location->getErrors()));
}
/**
* Show Assets with Default Location
*
* @group Locations
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $id
*/
public function assets(Request $request, Location $location) : JsonResponse | array
{
$this->authorize('view', Asset::class);
@@ -286,6 +327,13 @@ class LocationsController extends Controller
return (new AssetsTransformer)->transformAssets($assets, $assets->count(), $request);
}
/**
* Show Assets Assigned to Location
*
* @group Locations
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $id
*/
public function assignedAssets(Request $request, Location $location) : JsonResponse | array
{
$this->authorize('view', Asset::class);
@@ -295,6 +343,13 @@ class LocationsController extends Controller
return (new AssetsTransformer)->transformAssets($assets, $assets->count(), $request);
}
/**
* Show Accessories Assigned to Location
*
* @group Locations
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $id
*/
public function assignedAccessories(Request $request, Location $location) : JsonResponse | array
{
$this->authorize('view', Accessory::class);
@@ -310,8 +365,9 @@ class LocationsController extends Controller
}
/**
* Remove the specified resource from storage.
* Delete Location
*
* @group Locations
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param int $id
@@ -320,11 +376,15 @@ class LocationsController extends Controller
{
$this->authorize('delete', Location::class);
$location = Location::withCount('assignedAssets as assigned_assets_count')
->withCount('assignedAssets as assigned_assets_count')
->withCount('assets as assets_count')
->withCount('assignedAccessories as assigned_accessories_count')
->withCount('accessories as accessories_count')
->withCount('rtd_assets as rtd_assets_count')
->withCount('children as children_count')
->withCount('users as users_count')
->withCount('accessories as accessories_count')
->withCount('consumables as consumables_count')
->withCount('components as components_count')
->findOrFail($id);
if (! $location->isDeletable()) {
@@ -361,6 +421,7 @@ class LocationsController extends Controller
* Recursion still sucks, but I guess he doesn't have to get in the
* sea... this time.
*
* @group Locations
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0.16]
* @see \App\Http\Transformers\SelectlistTransformer

View File

@@ -4,11 +4,11 @@ namespace App\Http\Controllers\Api;
use App\Helpers\Helper;
use App\Http\Controllers\Controller;
use App\Http\Transformers\AssetMaintenancesTransformer;
use App\Http\Requests\ImageUploadRequest;
use App\Http\Transformers\MaintenancesTransformer;
use App\Models\Asset;
use App\Models\AssetMaintenance;
use App\Models\Maintenance;
use App\Models\Company;
use Illuminate\Support\Facades\Auth;
use Illuminate\Http\Request;
use Illuminate\Http\JsonResponse;
@@ -18,13 +18,24 @@ use Illuminate\Http\JsonResponse;
*
* @version v2.0
*/
class AssetMaintenancesController extends Controller
class MaintenancesController extends Controller
{
/**
* Generates the JSON response for asset maintenances listing view.
* List Maintenances
*
* @see AssetMaintenancesController::getIndex() method that generates view
* @group Maintenances
* @queryParam search string Search term to filter results. Example: repair
* @queryParam asset_id integer Filter by exact asset ID. Example: 1
* @queryParam supplier_id integer Filter by exact supplier ID. Example: 1
* @queryParam created_by integer Filter by exact user ID who created the maintenance. Example
* @queryParam url string Filter by exact URL. Example: http://example.com
* @queryParam asset_maintenance_type string Filter by exact maintenance type. Example: repair
* @queryParam sort string Column to sort results by. Allowed values: id, name, asset_maintenance_time, asset_maintenance_type, cost, start_date, completion_date, notes, asset_tag, asset_name, serial, created_by, supplier, location, is_warranty, status_label. Default: created_at. Example: name
* @queryParam order string Order of sorted results. Allowed values: asc, desc. Default: desc. Example: asc
* @queryParam offset integer Offset/starting position of the results. Default: 0. Example: 0
* @queryParam limit integer Limit the number of results returned. Default: 25. Maximum: 100. Example: 50
* @see MaintenancesController::getIndex() method that generates view
* @author Vincent Sposato <vincent.sposato@gmail.com>
* @version v1.0
* @since [v1.8]
@@ -33,7 +44,7 @@ class AssetMaintenancesController extends Controller
{
$this->authorize('view', Asset::class);
$maintenances = AssetMaintenance::select('asset_maintenances.*')
$maintenances = Maintenance::select('maintenances.*')
->with('asset', 'asset.model', 'asset.location', 'asset.defaultLoc', 'supplier', 'asset.company', 'asset.assetstatus', 'adminuser');
if ($request->filled('search')) {
@@ -45,11 +56,15 @@ class AssetMaintenancesController extends Controller
}
if ($request->filled('supplier_id')) {
$maintenances->where('asset_maintenances.supplier_id', '=', $request->input('supplier_id'));
$maintenances->where('maintenances.supplier_id', '=', $request->input('supplier_id'));
}
if ($request->filled('created_by')) {
$maintenances->where('asset_maintenances.created_by', '=', $request->input('created_by'));
$maintenances->where('maintenances.created_by', '=', $request->input('created_by'));
}
if ($request->filled('url')) {
$maintenances->where('maintenances.url', '=', $request->input('url'));
}
if ($request->filled('asset_maintenance_type')) {
@@ -63,7 +78,7 @@ class AssetMaintenancesController extends Controller
$allowed_columns = [
'id',
'title',
'name',
'asset_maintenance_time',
'asset_maintenance_type',
'cost',
@@ -112,31 +127,33 @@ class AssetMaintenancesController extends Controller
$total = $maintenances->count();
$maintenances = $maintenances->skip($offset)->take($limit)->get();
return (new AssetMaintenancesTransformer())->transformAssetMaintenances($maintenances, $total);
return (new MaintenancesTransformer())->transformMaintenances($maintenances, $total);
}
/**
* Validates and stores the new asset maintenance
* Create Maintenance
*
* @see AssetMaintenancesController::getCreate() method for the form
* @group Maintenances
* @see MaintenancesController::getCreate() method for the form
* @author Vincent Sposato <vincent.sposato@gmail.com>
* @version v1.0
* @since [v1.8]
*/
public function store(Request $request) : JsonResponse | array
public function store(ImageUploadRequest $request) : JsonResponse | array
{
$this->authorize('update', Asset::class);
// create a new model instance
$maintenance = new AssetMaintenance();
$maintenance = new Maintenance();
$maintenance->fill($request->all());
$maintenance->created_by = auth()->id();
$maintenance = $request->handleImages($maintenance);
// Was the asset maintenance created?
if ($maintenance->save()) {
return response()->json(Helper::formatStandardApiResponse('success', $maintenance, trans('admin/asset_maintenances/message.create.success')));
return response()->json(Helper::formatStandardApiResponse('success', $maintenance, trans('admin/maintenances/message.create.success')));
}
@@ -145,8 +162,9 @@ class AssetMaintenancesController extends Controller
}
/**
* Validates and stores an update to an asset maintenance
* Update Maintenance
*
* @group Maintenances
* @author A. Gianotto <snipe@snipe.net>
* @param int $id
* @param int $request
@@ -157,11 +175,11 @@ class AssetMaintenancesController extends Controller
{
$this->authorize('update', Asset::class);
if ($maintenance = AssetMaintenance::with('asset')->find($id)) {
if ($maintenance = Maintenance::with('asset')->find($id)) {
// Can this user manage this asset?
if (! Company::isCurrentUserHasAccess($maintenance->asset)) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('general.action_permission_denied', ['item_type' => trans('admin/asset_maintenances/general.maintenance'), 'id' => $id, 'action' => trans('general.edit')])));
return response()->json(Helper::formatStandardApiResponse('error', null, trans('general.action_permission_denied', ['item_type' => trans('admin/maintenances/general.maintenance'), 'id' => $id, 'action' => trans('general.edit')])));
}
// The asset this miantenance is attached to is not valid or has been deleted
@@ -172,55 +190,57 @@ class AssetMaintenancesController extends Controller
$maintenance->fill($request->all());
if ($maintenance->save()) {
return response()->json(Helper::formatStandardApiResponse('success', $maintenance, trans('admin/asset_maintenances/message.edit.success')));
return response()->json(Helper::formatStandardApiResponse('success', $maintenance, trans('admin/maintenances/message.edit.success')));
}
return response()->json(Helper::formatStandardApiResponse('error', null, $maintenance->getErrors()));
}
return response()->json(Helper::formatStandardApiResponse('error', null, trans('general.item_not_found', ['item_type' => trans('admin/asset_maintenances/general.maintenance'), 'id' => $id])));
return response()->json(Helper::formatStandardApiResponse('error', null, trans('general.item_not_found', ['item_type' => trans('admin/maintenances/general.maintenance'), 'id' => $id])));
}
/**
* Delete an asset maintenance
* Delete Maintenance
*
* @group Maintenances
* @author A. Gianotto <snipe@snipe.net>
* @param int $assetMaintenanceId
* @param int $maintenanceId
* @version v1.0
* @since [v4.0]
*/
public function destroy($assetMaintenanceId) : JsonResponse | array
public function destroy($maintenanceId) : JsonResponse | array
{
$this->authorize('update', Asset::class);
// Check if the asset maintenance exists
$assetMaintenance = AssetMaintenance::findOrFail($assetMaintenanceId);
$maintenance = Maintenance::findOrFail($maintenanceId);
$assetMaintenance->delete();
$maintenance->delete();
return response()->json(Helper::formatStandardApiResponse('success', $assetMaintenance, trans('admin/asset_maintenances/message.delete.success')));
return response()->json(Helper::formatStandardApiResponse('success', $maintenance, trans('admin/maintenances/message.delete.success')));
}
/**
* View an asset maintenance
* View Maintenance
*
* @group Maintenances
* @author A. Gianotto <snipe@snipe.net>
* @param int $assetMaintenanceId
* @param int $maintenanceId
* @version v1.0
* @since [v4.0]
*/
public function show($assetMaintenanceId) : JsonResponse | array
public function show($maintenanceId) : JsonResponse | array
{
$this->authorize('view', Asset::class);
$assetMaintenance = AssetMaintenance::findOrFail($assetMaintenanceId);
if (! Company::isCurrentUserHasAccess($assetMaintenance->asset)) {
$maintenance = Maintenance::findOrFail($maintenanceId);
if (! Company::isCurrentUserHasAccess($maintenance->asset)) {
return response()->json(Helper::formatStandardApiResponse('error', null, 'You cannot view a maintenance for that asset'));
}
return (new AssetMaintenancesTransformer())->transformAssetMaintenance($assetMaintenance);
return (new MaintenancesTransformer())->transformMaintenance($maintenance);
}
}

View File

@@ -16,8 +16,20 @@ use Illuminate\Http\JsonResponse;
class ManufacturersController extends Controller
{
/**
* Display a listing of the resource.
* List Manufacturers
*
* @group Manufacturers
* @queryParam search string Search term to filter results. Example: Dell
* @queryParam name string Filter by exact manufacturer name. Example: Dell
* @queryParam url string Filter by exact URL. Example: http://example.com
* @queryParam support_url string Filter by exact support URL. Example: http://support.example.com
* @queryParam warranty_lookup_url string Filter by exact warranty lookup URL. Example: http://warranty.example.com
* @queryParam support_phone string Filter by exact support phone number. Example: 1-800-555-5555
* @queryParam support_email string Filter by exact support email address. Example: support@example.org
* @queryParam sort string Column to sort results by. Allowed values: id, name, url, support_url, support_email, warranty_lookup_url, support_phone, created_at, updated_at, assets_count, consumables_count, components_count, licenses_count. Default: created_at. Example: name
* @queryParam order string Order of sorted results. Allowed values: asc, desc. Default: desc. Example: asc
* @queryParam offset integer Offset/starting position of the results. Default: 0. Example: 0
* @queryParam limit integer Limit the number of results returned. Default: 25. Maximum: 100. Example: 50
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @return \Illuminate\Http\Response
@@ -120,8 +132,9 @@ class ManufacturersController extends Controller
}
/**
* Store a newly created resource in storage.
* Create Maintenance
*
* @group Manufacturers
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param \App\Http\Requests\ImageUploadRequest $request
@@ -141,8 +154,9 @@ class ManufacturersController extends Controller
}
/**
* Display the specified resource.
* Show Manufacturer
*
* @group Manufacturers
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param int $id
@@ -156,8 +170,9 @@ class ManufacturersController extends Controller
}
/**
* Update the specified resource in storage.
* Update Manufacturer
*
* @group Manufacturers
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param \App\Http\Requests\ImageUploadRequest $request
@@ -178,8 +193,9 @@ class ManufacturersController extends Controller
}
/**
* Remove the specified resource from storage.
* Delete Manufacturer
*
* @group Manufacturers
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param int $id
@@ -200,8 +216,9 @@ class ManufacturersController extends Controller
}
/**
* Restore a given Manufacturer (mark as un-deleted)
* Restore Deleted Manufacturer
*
* @group Manufacturers
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v6.3.4]
* @param int $id
@@ -237,8 +254,9 @@ class ManufacturersController extends Controller
}
/**
* Gets a paginated collection for the select2 menus
* Selectlist
*
* @group Manufacturers
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0.16]
* @see \App\Http\Transformers\SelectlistTransformer

View File

@@ -0,0 +1,99 @@
<?php
namespace App\Http\Controllers\Api;
use App\Helpers\Helper;
use App\Http\Controllers\Controller;
use App\Models\Actionlog;
use App\Models\Asset;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Log;
/**
* This class controls all API actions related to notes for
* the Snipe-IT Asset Management application.
*/
class NotesController extends Controller
{
/**
* List Notes
*
* Checks authorization to view assets, attempts to find the asset by ID,
* and fetches related action log entries of type 'note added', including
* user information for each note. Returns a JSON response with the notes or errors.
*
* @group Notes
* @subgroup Assets
* @param \Illuminate\Http\Request $request The incoming HTTP request.
* @param Asset $asset The ID of the asset whose notes to retrieve.
* @return \Illuminate\Http\JsonResponse
*/
public function index(Asset $asset): JsonResponse
{
$this->authorize('view', $asset);
// Get the manual notes for the asset
$notes = ActionLog::with('user:id,username')
->where('item_type', Asset::class)
->where('item_id', $asset->id)
->where('action_type', 'note added')
->orderBy('created_at', 'desc')
->get(['id', 'created_at', 'note', 'created_by', 'item_id', 'item_type', 'action_type', 'target_id', 'target_type']);
$notesArray = $notes->map(function ($note) {
return [
'id' => $note->id,
'created_at' => $note->created_at,
'note' => $note->note,
'created_by' => $note->created_by,
'username' => $note->user?->username, // adding the username
'item_id' => $note->item_id,
'item_type' => $note->item_type,
'action_type' => $note->action_type,
];
});
// Return a success response
return response()->json(Helper::formatStandardApiResponse('success', ['notes' => $notesArray, 'asset_id' => $asset->id]));
}
/**
* Store Note
*
* Checks authorization for updating assets, validates the presence of the 'note',
* attempts to find the asset by ID, and creates a new ActionLog entry if successful.
* Returns JSON responses indicating success or failure with appropriate HTTP status codes.
*
* @group Notes
* @subgroup Assets
* @param \Illuminate\Http\Request $request The incoming HTTP request containing the 'note'.
* @param Asset $asset The ID of the asset to attach the note to.
* @return \Illuminate\Http\JsonResponse
*/
public function store(Request $request, Asset $asset): JsonResponse
{
$this->authorize('update', $asset);
if ($request->input('note', '') == '') {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('validation.required', ['attribute' => 'note'])), 422);
}
// Create the note
$logaction = new ActionLog();
$logaction->item_type = get_class($asset);
$logaction->created_by = Auth::id();
$logaction->item_id = $asset->id;
$logaction->note = $request->input('note', '');
if ($logaction->logaction('note added')) {
// Return a success response
return response()->json(Helper::formatStandardApiResponse('success', ['note' => $logaction->note, 'item_id' => $asset->id], trans('general.note_added')));
}
// Return an error response if something went wrong
return response()->json(Helper::formatStandardApiResponse('error', null, 'Something went wrong'), 500);
}
}

View File

@@ -16,8 +16,9 @@ use App\Http\Transformers\SelectlistTransformer;
class PredefinedKitsController extends Controller
{
/**
* Display a listing of the resource.
* List Kits
*
* @group Predefined Kits
* @return \Illuminate\Http\Response
*/
public function index(Request $request) : JsonResponse | array
@@ -62,8 +63,9 @@ class PredefinedKitsController extends Controller
}
/**
* Store a newly created resource in storage.
* Create Kit
*
* @group Predefined Kits
* @param \Illuminate\Http\Request $request
*/
public function store(Request $request) : JsonResponse
@@ -80,9 +82,10 @@ class PredefinedKitsController extends Controller
}
/**
* Display the specified resource.
* Show Kit
*
* @param int $id
* @group Predefined Kits
* @urlParam $id int required The ID of the kit. Example: 1
*/
public function show($id) : array
{
@@ -93,10 +96,10 @@ class PredefinedKitsController extends Controller
}
/**
* Update the specified resource in storage.
* Update Kit
*
* @param \Illuminate\Http\Request $request
* @param int $id kit id
* @group Predefined Kits
* @urlParam $id int required The ID of the kit. Example: 1
*/
public function update(Request $request, $id) : JsonResponse
{
@@ -112,9 +115,10 @@ class PredefinedKitsController extends Controller
}
/**
* Remove the specified resource from storage.
* Delete Kit
*
* @param int $id
* @group Predefined Kits
* @urlParam $id int required The ID of the kit. Example: 1
*/
public function destroy($id) : JsonResponse
{
@@ -133,8 +137,9 @@ class PredefinedKitsController extends Controller
}
/**
* Gets a paginated collection for the select2 menus
* Selectlist
*
* @group Predefined Kits
* @see \App\Http\Transformers\SelectlistTransformer
*/
public function selectlist(Request $request) : array
@@ -154,9 +159,10 @@ class PredefinedKitsController extends Controller
}
/**
* Display the specified resource.
* List Licenses in Kit
*
* @param int $id
* @group Predefined Kits
* @urlParam $kit_id int required The ID of the kit. Example: 1
* @return \Illuminate\Http\Response
*/
public function indexLicenses($kit_id) : array
@@ -169,9 +175,12 @@ class PredefinedKitsController extends Controller
}
/**
* Store the specified resource.
* Add License to Kit
*
* @param int $id
* @group Predefined Kits
* @urlParam $kit_id int required The ID of the kit. Example: 1
* @bodyParam license int required The ID of the license. Example: 1
* @bodyParam quantity int The quantity of the license. Example: 1
* @return \Illuminate\Http\Response
*/
public function storeLicense(Request $request, $kit_id) : JsonResponse
@@ -196,10 +205,11 @@ class PredefinedKitsController extends Controller
}
/**
* Update the specified resource in storage.
* Update License in Kit
*
* @param \Illuminate\Http\Request $request
* @param int $kit_id
* @group Predefined Kits
* @urlParam $kit_id int required The ID of the kit. Example: 1
* @urlParam $license_id int required The ID of the license. Example: 1
*/
public function updateLicense(Request $request, $kit_id, $license_id) : JsonResponse
{
@@ -215,9 +225,11 @@ class PredefinedKitsController extends Controller
}
/**
* Remove the specified resource from storage.
* Remove License from Kit
*
* @param int $kit_id
* @group Predefined Kits
* @urlParam $kit_id int required The ID of the kit. Example: 1
* @urlParam $license_id int required The ID of the license. Example: 1
*/
public function detachLicense($kit_id, $license_id) : JsonResponse
{
@@ -230,9 +242,10 @@ class PredefinedKitsController extends Controller
}
/**
* Display the specified resource.
* List Models in Kit
*
* @param int $kit_id
* @group Predefined Kits
* @urlParam $kit_id int required The ID of the kit. Example: 1
*/
public function indexModels($kit_id) : array
{
@@ -244,9 +257,11 @@ class PredefinedKitsController extends Controller
}
/**
* Store the specified resource.
* Add Model to Kit
*
* @param int $id
* @group Predefined Kits
* @urlParam $kit_id int required The ID of the kit. Example: 1
* @bodyParam model int required The ID of the model. Example: 1
*/
public function storeModel(Request $request, $kit_id) : JsonResponse
{
@@ -270,10 +285,11 @@ class PredefinedKitsController extends Controller
}
/**
* Update the specified resource in storage.
* Update Model in Kit
*
* @param \Illuminate\Http\Request $request
* @param int $kit_id
* @group Predefined Kits
* @urlParam $kit_id int required The ID of the kit. Example: 1
* @bodyParam quantity int required The quantity of the model. Example: 1
*/
public function updateModel(Request $request, $kit_id, $model_id) : JsonResponse
{
@@ -289,9 +305,11 @@ class PredefinedKitsController extends Controller
}
/**
* Remove the specified resource from storage.
* Delete Model from Kit
*
* @param int $kit_id
* @group Predefined Kits
* @urlParam $kit_id int required The ID of the kit. Example: 1
* @urlParam $model_id int required The ID of the model. Example: 1
*/
public function detachModel($kit_id, $model_id) : JsonResponse
{
@@ -304,9 +322,10 @@ class PredefinedKitsController extends Controller
}
/**
* Display the specified resource.
* List Consumables in Kit
*
* @param int $kit_id
* @group Predefined Kits
* @urlParam $kit_id int required The ID of the kit. Example: 1
*/
public function indexConsumables($kit_id) : array
{
@@ -318,9 +337,12 @@ class PredefinedKitsController extends Controller
}
/**
* Store the specified resource.
* Add Consumable to Kit
*
* @param int $id
* @group Predefined Kits
* @urlParam $kit_id int required The ID of the kit. Example: 1
* @bodyParam consumable int required The ID of the consumable. Example: 1
* @bodyParam quantity int The quantity of the consumable. Example: 1
*/
public function storeConsumable(Request $request, $kit_id) : JsonResponse
{
@@ -344,10 +366,12 @@ class PredefinedKitsController extends Controller
}
/**
* Update the specified resource in storage.
* Update Consumable in Kit
*
* @param \Illuminate\Http\Request $request
* @param int $kit_id
* @group Predefined Kits
* @urlParam $kit_id int required The ID of the kit. Example: 1
* @urlParam $consumable_id int required The ID of the consumable. Example: 1
* @bodyParam quantity int The quantity of the consumable. Example: 1
*/
public function updateConsumable(Request $request, $kit_id, $consumable_id) : JsonResponse
{
@@ -363,9 +387,11 @@ class PredefinedKitsController extends Controller
}
/**
* Remove the specified resource from storage.
* Remove Consumable from Kit
*
* @param int $kit_id
* @group Predefined Kits
* @urlParam $kit_id int required The ID of the kit. Example: 1
* @urlParam $consumable_id int required The ID of the consumable. Example: 1
*/
public function detachConsumable($kit_id, $consumable_id) : JsonResponse
{
@@ -378,9 +404,10 @@ class PredefinedKitsController extends Controller
}
/**
* Display the specified resource.
* List Accessories in Kit
*
* @param int $kit_id
* @group Predefined Kits
* @urlParam $kit_id int required The ID of the kit. Example: 1
*/
public function indexAccessories($kit_id) : array
{
@@ -392,9 +419,12 @@ class PredefinedKitsController extends Controller
}
/**
* Store the specified resource.
* Add Accessory to Kit
*
* @param int $kit_id
* @group Predefined Kits
* @urlParam $kit_id int required The ID of the kit. Example: 1
* @bodyParam accessory int required The ID of the accessory. Example: 1
* @bodyParam quantity int The quantity of the accessory. Example: 1
*/
public function storeAccessory(Request $request, $kit_id) : JsonResponse
{
@@ -418,10 +448,12 @@ class PredefinedKitsController extends Controller
}
/**
* Update the specified resource in storage.
* Update Accessory in Kit
*
* @param \Illuminate\Http\Request $request
* @param int $kit_id
* @group Predefined Kits
* @urlParam $kit_id int required The ID of the kit. Example: 1
* @urlParam $accessory_id int required The ID of the accessory. Example: 1
* @bodyParam quantity int The quantity of the accessory. Example: 1
*/
public function updateAccessory(Request $request, $kit_id, $accessory_id) : JsonResponse
{
@@ -437,9 +469,11 @@ class PredefinedKitsController extends Controller
}
/**
* Remove the specified resource from storage.
* Remove Accessory from Kit
*
* @param int $kit_id
* @group Predefined Kits
* @urlParam $kit_id int required The ID of the kit. Example: 1
* @urlParam $accessory_id int required The ID of the accessory. Example: 1
*/
public function detachAccessory($kit_id, $accessory_id) : JsonResponse
{

View File

@@ -42,8 +42,9 @@ class ProfileController extends Controller
}
/**
* Display a listing of requested assets.
* Display Requested Assets
*
* @group Account
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.3.0]
*/
@@ -69,7 +70,7 @@ class ProfileController extends Controller
if ($checkoutRequest && $checkoutRequest->itemRequested()) {
$assets = [
'image' => e($checkoutRequest->itemRequested()->present()->getImageUrl()),
'name' => e($checkoutRequest->itemRequested()->present()->name()),
'name' => e($checkoutRequest->itemRequested()->display_name),
'type' => e($checkoutRequest->itemType()),
'qty' => (int) $checkoutRequest->quantity,
'location' => ($checkoutRequest->location()) ? e($checkoutRequest->location()->name) : null,
@@ -93,8 +94,8 @@ class ProfileController extends Controller
/**
* Delete an API token
*
* Create API token
* @group Account
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v6.0.5]
*/
@@ -122,8 +123,9 @@ class ProfileController extends Controller
/**
* Delete an API token
* Delete API token
*
* @group Account
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v6.0.5]
*/
@@ -150,8 +152,9 @@ class ProfileController extends Controller
/**
* Show user's API tokens
* Show API tokens
*
* @group Account
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v6.0.5]
*/
@@ -172,11 +175,12 @@ class ProfileController extends Controller
}
/**
* Display the EULAs accepted by the user.
* Display Accepted EULAs
*
* @group Account
* @param \App\Http\Transformers\ActionlogsTransformer $transformer
* @return \Illuminate\Http\JsonResponse
*@since [v8.1.16]
* @since [v8.1.16]
* @author [Godfrey Martinez] [<gmartinez@grokability.com>]
*/
public function eulas(ProfileTransformer $transformer)

View File

@@ -13,8 +13,23 @@ use Illuminate\Http\JsonResponse;
class ReportsController extends Controller
{
/**
* Returns Activity Report JSON.
* Activity Report
*
* @group Reports
* @queryParam search string Search term to filter results Example: updated
* @queryParam target_type string Filter by target type Example: user
* @queryParam target_id integer Filter by target ID Example: 1
* @queryParam item_type string Filter by item type Example: asset
* @queryParam item_id integer Filter by item ID Example: 1
* @queryParam action_type string Filter by action type Example: create
* @queryParam created_by integer Filter by user ID who created the log Example: 1
* @queryParam action_source string Filter by action source Example: web
* @queryParam remote_ip string Filter by remote IP address Example: No-example
* @queryParam uploads boolean Filter to only show logs with file uploads Example: true
* @queryParam sort string Column to sort by. Allowed values: id, created_at, target_id, created_by, accept_signature, action_type, note, remote_ip, user_agent, target_type, item_type, action_source, action_date. Default is created_at. Example: created_at
* @queryParam order string Order of sorting. Allowed values: asc, desc. Default is desc. Example: desc
* @queryParam offset integer Number of records to skip for pagination. Default is 0. Example: 0
* @queryParam limit integer Maximum number of records to return. Default is 25. Example: 25
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
*/

View File

@@ -3,7 +3,6 @@
namespace App\Http\Controllers\Api;
use App\Helpers\Helper;
use App\Helpers\StorageHelper;
use App\Http\Transformers\DatatablesTransformer;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
@@ -24,6 +23,12 @@ class SettingsController extends Controller
{
/**
* Test LDAP Connection
*
* @group Settings
* @return JsonResponse
*/
public function ldaptest() : JsonResponse
{
$settings = Setting::getSettings();
@@ -51,10 +56,22 @@ class SettingsController extends Controller
})->slice(0, 10)->map(function ($item) use ($settings) {
return (object) [
'username' => $item[$settings['ldap_username_field']][0] ?? null,
'display_name' => $item[$settings['ldap_display_name']][0] ?? null,
'employee_number' => $item[$settings['ldap_emp_num']][0] ?? null,
'lastname' => $item[$settings['ldap_lname_field']][0] ?? null,
'firstname' => $item[$settings['ldap_fname_field']][0] ?? null,
'email' => $item[$settings['ldap_email']][0] ?? null,
'phone' => $item[$settings['ldap_phone_field']][0] ?? null,
'mobile' => $item[$settings['ldap_mobile']][0] ?? null,
'jobtitle' => $item[$settings['ldap_jobtitle']][0] ?? null,
'department' => $item[$settings['ldap_department']][0] ?? null,
'manager' => $item[$settings['ldap_manager']][0] ?? null,
'address' => $item[$settings['ldap_address']][0] ?? null,
'city' => $item[$settings['ldap_city']][0] ?? null,
'state' => $item[$settings['ldap_state']][0] ?? null,
'zip' => $item[$settings['ldap_zip']][0] ?? null,
'country' => $item[$settings['ldap_country']][0] ?? null,
'location' => $item[$settings['ldap_location']][0] ?? null,
];
});
if ($users->count() > 0) {
@@ -78,12 +95,19 @@ class SettingsController extends Controller
}
} catch (\Exception $e) {
Log::debug('Connection failed but we cannot debug it any further on our end.');
return response()->json(['message' => $e->getMessage()], 500);
return response()->json(['message' => $e->getMessage()], 400);
}
}
/**
* Test LDAP Login
*
* @group Settings
* @param Request $request
* @return JsonResponse
*/
public function ldaptestlogin(Request $request) : JsonResponse
{
@@ -140,8 +164,9 @@ class SettingsController extends Controller
}
/**
* Test the email configuration
* Test Email Configuration
*
* @group Settings
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v3.0]
*/
@@ -150,8 +175,11 @@ class SettingsController extends Controller
if (!config('app.lock_passwords')) {
try {
Notification::send(Setting::first(), new MailTest());
Log::debug('Attempting to sending to '.config('mail.reply_to.address'));
return response()->json(['message' => 'Mail sent to '.config('mail.reply_to.address')], 200);
} catch (\Exception $e) {
Log::error('Mail sent error using '.config('mail.reply_to.address') .': '. $e->getMessage());
Log::debug($e);
return response()->json(['message' => $e->getMessage()], 500);
}
}
@@ -161,8 +189,9 @@ class SettingsController extends Controller
/**
* Delete server-cached barcodes
* Delete Barcode Cache
*
* @group Settings
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v5.0.0]
*/
@@ -202,6 +231,7 @@ class SettingsController extends Controller
/**
* Get a list of login attempts
*
* @group Settings
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v5.0.0]
* @param \Illuminate\Http\Request $request
@@ -225,6 +255,7 @@ class SettingsController extends Controller
/**
* Lists backup files
*
* @group Settings
* @author [A. Gianotto]
*/
public function listBackups() : array
@@ -265,9 +296,11 @@ class SettingsController extends Controller
/**
* Downloads a backup file.
*
* We use response()->download() here instead of Storage::download() because Storage::download()
* exhausts memory on larger files.
*
* @group Settings
* @author [A. Gianotto]
*/
public function downloadBackup($file) : JsonResponse | BinaryFileResponse
@@ -287,6 +320,7 @@ class SettingsController extends Controller
/**
* Determines and downloads the latest backup
*
* @group Settings
* @author [A. Gianotto]
* @since [v6.3.1]
*/

View File

@@ -17,7 +17,11 @@ use Illuminate\Http\JsonResponse;
class StatuslabelsController extends Controller
{
/**
* Display a listing of the resource.
* Show Status Labels
*
* @group Status Labels
* @subgroup Assets
* @queryParam search string Search term to filter results. Example: Inventory
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
@@ -85,9 +89,11 @@ class StatuslabelsController extends Controller
/**
* Store a newly created resource in storage.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @group Status Labels
* @subgroup Assets
* @param \Illuminate\Http\Request $request
*@since [v4.0]
* @author [A. Gianotto] [<snipe@snipe.net>]
*/
public function store(Request $request) : JsonResponse
{
@@ -119,11 +125,13 @@ class StatuslabelsController extends Controller
}
/**
* Display the specified resource.
* Show Status Labels
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @group Status Labels
* @subgroup Assets
* @param int $id
*@since [v4.0]
* @author [A. Gianotto] [<snipe@snipe.net>]
*/
public function show($id) : array
{
@@ -135,12 +143,14 @@ class StatuslabelsController extends Controller
/**
* Update the specified resource in storage.
* Update Status Label
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @group Status Labels
* @subgroup Assets
* @param \Illuminate\Http\Request $request
* @param int $id
*@author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
*/
public function update(Request $request, $id) : JsonResponse
{
@@ -172,11 +182,13 @@ class StatuslabelsController extends Controller
}
/**
* Remove the specified resource from storage.
* Delete Status Label
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @group Status Labels
* @subgroup Assets
* @param int $id
*@since [v4.0]
* @author [A. Gianotto] [<snipe@snipe.net>]
*/
public function destroy($id) : JsonResponse
{
@@ -197,8 +209,10 @@ class StatuslabelsController extends Controller
/**
* Show a count of assets by status label for pie chart
* Show Count for Pie Chart
*
* @group Status Labels
* @subgroup Assets
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v3.0]
*/
@@ -229,8 +243,10 @@ class StatuslabelsController extends Controller
}
/**
* Show a count of assets by meta status type for pie chart
* Show Count for Pie Chart by Meta Status
*
* @group Status Labels
* @subgroup Assets
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v6.0.11]
*/
@@ -257,11 +273,13 @@ class StatuslabelsController extends Controller
}
/**
* Display the specified resource.
* Show Assets with Status Label
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @group Status Labels
* @subgroup Assets
* @param int $id
*@since [v4.0]
* @author [A. Gianotto] [<snipe@snipe.net>]
*/
public function assets(Request $request, $id) : array
{
@@ -289,6 +307,8 @@ class StatuslabelsController extends Controller
/**
* Check for Deployable Status
*
* Returns a boolean response based on whether the status label
* is one that is deployable or pending.
*
@@ -296,7 +316,8 @@ class StatuslabelsController extends Controller
* we should provide a dropdown of users for them to check the asset out to,
* and whether we show a warning that the asset will be checked in if it's already
* assigned but the status is changed to one that isn't pending or deployable
*
* @group Status Labels
* @subgroup Assets
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
*/
@@ -311,8 +332,10 @@ class StatuslabelsController extends Controller
}
/**
* Gets a paginated collection for the select2 menus
* Selectlist
*
* @group Status Labels
* @subgroup Assets
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v6.1.1]
* @see \App\Http\Transformers\SelectlistTransformer

View File

@@ -15,11 +15,30 @@ use Illuminate\Http\JsonResponse;
class SuppliersController extends Controller
{
/**
* Display a listing of the resource.
* List Suppliers
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @group Suppliers
* @queryParam search string Search term to filter results. Example: Acme
* @queryParam name string Filter by exact supplier name. Example: Acme Corp
* @queryParam address string Filter by exact address. Example: 123 Main St
* @queryParam address2 string Filter by exact address2. Example: Suite 100
* @queryParam city string Filter by exact city. Example: Springfield
* @queryParam state string Filter by exact state. Example: IL
* @queryParam zip string Filter by exact zip code. Example: 62701
* @queryParam country string Filter by exact country. Example: USA
* @queryParam phone string Filter by exact phone number. Example: 555-1234
* @queryParam fax string Filter by exact fax number. Example: 555-5678
* @queryParam email string Filter by exact email address. Example: info@example.org
* @queryParam url string Filter by exact URL. Example: http://example.com
* @queryParam notes string Filter by exact notes. Example: This is a note.
* @queryParam sort string Column to sort results by. Allowed values: id, name, address, address2, city, state, country, zip, phone, contact, fax, email, image, assets_count, licenses_count, accessories_count, components_count, consumables_count, url, notes. Default: created_at. Example: name
* @queryParam order string Order of sorted results. Allowed values: asc, desc. Default: desc. Example: asc
* @queryParam offset integer Offset/starting position of the results. Default: 0. Example: 0
* @queryParam limit integer Limit the number of results returned. Default: 25. Maximum: 100. Example: 50
* @see SuppliersController::getIndex()
* @return \Illuminate\Http\Response
* @since [v4.0]
* @author [A. Gianotto] [<snipe@snipe.net>]
*/
public function index(Request $request): array
{
@@ -126,8 +145,9 @@ class SuppliersController extends Controller
/**
* Store a newly created resource in storage.
* Create Supplier
*
* @group Suppliers
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param \App\Http\Requests\ImageUploadRequest $request
@@ -147,8 +167,9 @@ class SuppliersController extends Controller
}
/**
* Display the specified resource.
* Show Supplier
*
* @group Suppliers
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param int $id
@@ -163,8 +184,9 @@ class SuppliersController extends Controller
/**
* Update the specified resource in storage.
* Update Supplier
*
* @group Suppliers
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param \App\Http\Requests\ImageUploadRequest $request
@@ -185,8 +207,9 @@ class SuppliersController extends Controller
}
/**
* Remove the specified resource from storage.
* Delete Supplier
*
* @group Suppliers
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param int $id
@@ -194,7 +217,7 @@ class SuppliersController extends Controller
public function destroy($id) : JsonResponse
{
$this->authorize('delete', Supplier::class);
$supplier = Supplier::with('asset_maintenances', 'assets', 'licenses')->withCount('asset_maintenances as asset_maintenances_count', 'assets as assets_count', 'licenses as licenses_count')->findOrFail($id);
$supplier = Supplier::with('maintenances', 'assets', 'licenses')->withCount('maintenances as maintenances_count', 'assets as assets_count', 'licenses as licenses_count')->findOrFail($id);
$this->authorize('delete', $supplier);
@@ -202,8 +225,8 @@ class SuppliersController extends Controller
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/suppliers/message.delete.assoc_assets', ['asset_count' => (int) $supplier->assets_count])));
}
if ($supplier->asset_maintenances_count > 0) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/suppliers/message.delete.assoc_maintenances', ['asset_maintenances_count' => $supplier->asset_maintenances_count])));
if ($supplier->maintenances_count > 0) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/suppliers/message.delete.assoc_maintenances', ['maintenances_count' => $supplier->maintenances_count])));
}
if ($supplier->licenses_count > 0) {
@@ -216,8 +239,9 @@ class SuppliersController extends Controller
}
/**
* Gets a paginated collection for the select2 menus
* Selectlist
*
* @group Suppliers
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0.16]
* @see \App\Http\Transformers\SelectlistTransformer

View File

@@ -7,18 +7,9 @@ use App\Helpers\StorageHelper;
use App\Http\Controllers\Controller;
use App\Http\Requests\UploadFileRequest;
use App\Http\Transformers\UploadedFilesTransformer;
use App\Models\Accessory;
use App\Models\Actionlog;
use App\Models\Asset;
use App\Models\AssetModel;
use App\Models\Component;
use App\Models\Consumable;
use App\Models\License;
use App\Models\Location;
use App\Models\User;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Storage;
use Symfony\Component\HttpFoundation\BinaryFileResponse;
use Symfony\Component\HttpFoundation\StreamedResponse;
@@ -28,48 +19,10 @@ class UploadedFilesController extends Controller
{
static $map_object_type = [
'accessories' => Accessory::class,
'assets' => Asset::class,
'components' => Component::class,
'consumables' => Consumable::class,
'hardware' => Asset::class,
'licenses' => License::class,
'locations' => Location::class,
'models' => AssetModel::class,
'users' => User::class,
];
static $map_storage_path = [
'accessories' => 'private_uploads/accessories/',
'assets' => 'private_uploads/assets/',
'components' => 'private_uploads/components/',
'consumables' => 'private_uploads/consumables/',
'hardware' => 'private_uploads/assets/',
'licenses' => 'private_uploads/licenses/',
'locations' => 'private_uploads/locations/',
'models' => 'private_uploads/assetmodels/',
'users' => 'private_uploads/users/',
];
static $map_file_prefix= [
'accessories' => 'accessory',
'assets' => 'asset',
'components' => 'component',
'consumables' => 'consumable',
'hardware' => 'asset',
'licenses' => 'license',
'locations' => 'location',
'models' => 'model',
'users' => 'user',
];
/**
* List files for an object
* List Files for an Object
*
* @group Files
* @param \App\Http\Requests\UploadFileRequest $request
* @param string $object_type the type of object to upload the file to
* @param int $id the ID of the object to list files for
@@ -80,7 +33,7 @@ class UploadedFilesController extends Controller
{
// Check the permissions to make sure the user can view the object
$object = self::$map_object_type[$object_type]::find($id);
$object = self::$map_object_type[$object_type]::withTrashed()->find($id);
$this->authorize('view', $object);
if (!$object) {
@@ -99,11 +52,7 @@ class UploadedFilesController extends Controller
];
$uploads = Actionlog::select('action_logs.*')
->whereNotNull('filename')
->where('item_type', self::$map_object_type[$object_type])
->where('item_id', $object->id)
->where('action_type', '=', 'uploaded')
$uploads = self::$map_object_type[$object_type]::withTrashed()->find($id)->uploads()
->with('adminuser');
$offset = ($request->input('offset') > $uploads->count()) ? $uploads->count() : abs($request->input('offset'));
@@ -132,8 +81,9 @@ class UploadedFilesController extends Controller
/**
* Accepts a POST to upload a file to the server.
* Upload File to an Object
*
* @group Files
* @param \App\Http\Requests\UploadFileRequest $request
* @param string $object_type the type of object to upload the file to
* @param int $id the ID of the object to store so we can check permisisons
@@ -144,7 +94,7 @@ class UploadedFilesController extends Controller
{
// Check the permissions to make sure the user can view the object
$object = self::$map_object_type[$object_type]::find($id);
$object = self::$map_object_type[$object_type]::withTrashed()->find($id);
$this->authorize('view', $object);
if (!$object) {
@@ -180,8 +130,9 @@ class UploadedFilesController extends Controller
/**
* Check for permissions and display the file.
* Display File
*
* @group Files
* @param \App\Http\Requests\UploadFileRequest $request
* @param string $object_type the type of object to upload the file to
* @param int $id the ID of the object to delete from so we can check permisisons
@@ -192,7 +143,7 @@ class UploadedFilesController extends Controller
public function show($object_type, $id, $file_id) : JsonResponse | StreamedResponse | Storage | StorageHelper | BinaryFileResponse
{
// Check the permissions to make sure the user can view the object
$object = self::$map_object_type[$object_type]::find($id);
$object = self::$map_object_type[$object_type]::withTrashed()->find($id);
$this->authorize('view', $object);
if (!$object) {
@@ -223,8 +174,9 @@ class UploadedFilesController extends Controller
}
/**
* Delete the associated file
* Delete File
*
* @group Files
* @param \App\Http\Requests\UploadFileRequest $request
* @param string $object_type the type of object to upload the file to
* @param int $id the ID of the object to delete from so we can check permisisons
@@ -236,7 +188,7 @@ class UploadedFilesController extends Controller
{
// Check the permissions to make sure the user can view the object
$object = self::$map_object_type[$object_type]::find($id);
$object = self::$map_object_type[$object_type]::withTrashed()->find($id);
$this->authorize('update', self::$map_object_type[$object_type]);
if (!$object) {
@@ -245,8 +197,12 @@ class UploadedFilesController extends Controller
// Check for the file
$log = Actionlog::find($file_id)->where('item_type', self::$map_object_type[$object_type])
->where('item_id', $object->id)->first();
$log = Actionlog::query()
->where('id', $file_id)
->where('action_type', 'uploaded')
->where('item_type', self::$map_object_type[$object_type])
->where('item_id', $object->id)
->first();
if ($log) {
// Check the file actually exists, and delete it
@@ -254,7 +210,7 @@ class UploadedFilesController extends Controller
Storage::delete(self::$map_storage_path[$object_type].'/'.$log->filename);
}
// Delete the record of the file
if ($log->delete()) {
if ($log->logUploadDelete($object, $log->filename)) {
return response()->json(Helper::formatStandardApiResponse('success', null, trans_choice('general.file_upload_status.delete.success', 1)), 200);
}

View File

@@ -20,6 +20,8 @@ use App\Models\Consumable;
use App\Models\License;
use App\Models\User;
use App\Notifications\CurrentInventory;
use App\Notifications\WelcomeNotification;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Auth;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Http\Request;
@@ -33,8 +35,36 @@ use Illuminate\Http\JsonResponse;
class UsersController extends Controller
{
/**
* Display a listing of the resource.
* List Users
*
* @group Users
* @queryParam search string Search term to filter results. Example: John
* @queryParam filter string JSON object of key/value pairs to filter results. Allowed keys: last_name, first_name, display_name, email, jobtitle, username, employee_num, groups, activated, created_at, updated_at, two_factor_enrolled, two_factor_optin, last_login, assets_count, licenses_count, consumables_count, accessories_count, manages_users_count, manages_locations_count, phone, mobile, address, city, state, country, zip, id, ldap_import, remote, vip, start_date, end_date, autoassign_licenses, website, locale, notes. Example: {"last_name":"Doe","first_name":"John"}
* @queryParam activated integer Filter by exact activation status. Allowed values: 0, 1. Example: 1
* @queryParam admins boolean Filter to only admin and superadmin users. Allowed values: true, false. Example: true
* @queryParam superadmins boolean Filter to only superadmin users. Allowed values: true, false. Example: true
* @queryParam company_id integer Filter by exact company ID. Example: 1
* @queryParam phone string Filter by exact phone number. Example: 555-1234
* @queryParam mobile string Filter by exact mobile number. Example: 555-5678
* @queryParam location_id integer Filter by exact location ID. Example: 1
* @queryParam created_by integer Filter by exact user ID who created the user. Example: 1
* @queryParam email string Filter by exact email address. Example: jdoe@example.com
* @queryParam username string Filter by exact username. Example: jdoe
* @queryParam first_name string Filter by exact first name. Example: John
* @queryParam last_name string Filter by exact last name. Example: Doe
* @queryParam display_name string Filter by exact display name. Example: John Doe
* @queryParam employee_num string Filter by exact employee number. Example: 12345
* @queryParam state string Filter by exact state. Example: CA
* @queryParam country string Filter by exact country. Example: USA
* @queryParam website string Filter by exact website URL. Example: https://example.com
* @queryParam zip string Filter by exact ZIP code. Example: 90210
* @queryParam group_id integer Filter by exact group ID. Example: 1
* @queryParam department_id integer Filter by exact department ID. Example: 1
* @queryParam manager_id integer Filter by exact manager (user) ID. Example: 1
* @queryParam ldap_import integer Filter by exact LDAP import status. Allowed values: 0, 1. Example: 1
* @queryParam remote integer Filter by exact remote status. Allowed values: 0, 1. Example: 1
* @queryParam vip integer Filter by exact VIP status. Allowed values: 0, 1. Example: 1
* @queryParam two_factor_enrolled integer Filter by exact two-factor authentication enrollment status. Allowed values: 0, 1. Example: 1
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
*
@@ -63,12 +93,14 @@ class UsersController extends Controller
'users.jobtitle',
'users.last_login',
'users.last_name',
'users.display_name',
'users.locale',
'users.location_id',
'users.manager_id',
'users.notes',
'users.permissions',
'users.phone',
'users.mobile',
'users.state',
'users.two_factor_enrolled',
'users.two_factor_optin',
@@ -99,9 +131,75 @@ class UsersController extends Controller
'managedLocations as manages_locations_count'
]);
$allowed_columns =
[
'last_name',
'first_name',
'display_name',
'email',
'jobtitle',
'username',
'employee_num',
'groups',
'activated',
'created_at',
'updated_at',
'two_factor_enrolled',
'two_factor_optin',
'last_login',
'assets_count',
'licenses_count',
'consumables_count',
'accessories_count',
'manages_users_count',
'manages_locations_count',
'phone',
'mobile',
'address',
'city',
'state',
'country',
'zip',
'id',
'ldap_import',
'two_factor_optin',
'two_factor_enrolled',
'remote',
'vip',
'start_date',
'end_date',
'autoassign_licenses',
'website',
'locale',
'notes',
'employee_num',
if ($request->filled('search') != '') {
$users = $users->TextSearch($request->input('search'));
// These are *relationships* so we wouldn't normally include them in this array,
// since they would normally create a `column not found` error,
// BUT we account for them in the ordering switch down at the end of this method
// DO NOT ADD ANYTHING TO THIS LIST WITHOUT CHECKING THE ORDERING SWITCH BELOW!
'company',
'location',
'department',
'manager',
'created_by',
];
$filter = [];
if ($request->filled('filter')) {
$filter = json_decode($request->input('filter'), true);
$filter = array_filter($filter, function ($key) use ($allowed_columns) {
return in_array($key, $allowed_columns);
}, ARRAY_FILTER_USE_KEY);
}
if ((! is_null($filter)) && (count($filter)) > 0) {
$users->ByFilter($filter);
} elseif ($request->filled('search')) {
$users->TextSearch($request->input('search'));
}
if ($request->filled('activated')) {
@@ -120,6 +218,14 @@ class UsersController extends Controller
$users = $users->where('users.company_id', '=', $request->input('company_id'));
}
if ($request->filled('phone')) {
$users = $users->where('users.phone', '=', $request->input('phone'));
}
if ($request->filled('mobile')) {
$users = $users->where('users.mobile', '=', $request->input('mobile'));
}
if ($request->filled('location_id')) {
$users = $users->where('users.location_id', '=', $request->input('location_id'));
}
@@ -144,6 +250,10 @@ class UsersController extends Controller
$users = $users->where('users.last_name', '=', $request->input('last_name'));
}
if ($request->filled('display_name')) {
$users = $users->where('users.display_name', '=', $request->input('display_name'));
}
if ($request->filled('employee_num')) {
$users = $users->where('users.employee_num', '=', $request->input('employee_num'));
}
@@ -270,47 +380,6 @@ class UsersController extends Controller
$users->orderBy('first_name', $order);
break;
default:
$allowed_columns =
[
'last_name',
'first_name',
'email',
'jobtitle',
'username',
'employee_num',
'groups',
'activated',
'created_at',
'updated_at',
'two_factor_enrolled',
'two_factor_optin',
'last_login',
'assets_count',
'licenses_count',
'consumables_count',
'accessories_count',
'manages_users_count',
'manages_locations_count',
'phone',
'address',
'city',
'state',
'country',
'zip',
'id',
'ldap_import',
'two_factor_optin',
'two_factor_enrolled',
'remote',
'vip',
'start_date',
'end_date',
'autoassign_licenses',
'website',
'locale',
'notes',
];
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'first_name';
$users = $users->orderBy($sort, $order);
break;
@@ -329,8 +398,9 @@ class UsersController extends Controller
}
/**
* Gets a paginated collection for the select2 menus
* Selectlist
*
* @group Users
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0.16]
* @see \App\Http\Transformers\SelectlistTransformer
@@ -344,6 +414,7 @@ class UsersController extends Controller
'users.employee_num',
'users.first_name',
'users.last_name',
'users.display_name',
'users.gravatar',
'users.avatar',
'users.email',
@@ -354,20 +425,17 @@ class UsersController extends Controller
$users = $users->where(function ($query) use ($request) {
$query->SimpleNameSearch($request->get('search'))
->orWhere('username', 'LIKE', '%'.$request->get('search').'%')
->orWhere('display_name', 'LIKE', '%'.$request->get('search').'%')
->orWhere('email', 'LIKE', '%'.$request->get('search').'%')
->orWhere('employee_num', 'LIKE', '%'.$request->get('search').'%');
});
}
$users = $users->orderBy('last_name', 'asc')->orderBy('first_name', 'asc');
$users = $users->orderBy('display_name', 'asc')->orderBy('last_name', 'asc')->orderBy('first_name', 'asc');
$users = $users->paginate(50);
foreach ($users as $user) {
$name_str = '';
if ($user->last_name != '') {
$name_str .= $user->last_name.', ';
}
$name_str .= $user->first_name;
$name_str = $user->display_name;
if ($user->username != '') {
$name_str .= ' ('.$user->username.')';
@@ -387,8 +455,9 @@ class UsersController extends Controller
/**
* Store a newly created resource in storage.
* Create User
*
* @group Users
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param \Illuminate\Http\Request $request
@@ -419,9 +488,20 @@ class UsersController extends Controller
$user->password = $user->noPassword();
}
app('App\Http\Requests\ImageUploadRequest')->handleImages($user, 600, 'image', 'avatars', 'avatar');
app('App\Http\Requests\ImageUploadRequest')->handleImages($user, 600, 'avatar', 'avatars', 'avatar');
if ($user->save()) {
if (($user->activated == '1') && ($user->email != '') && ($request->input('send_welcome') == '1')) {
try {
$user->notify(new WelcomeNotification($user));
} catch (\Exception $e) {
Log::warning('Could not send welcome notification for user: ' . $e->getMessage());
}
}
if ($request->filled('groups')) {
$user->groups()->sync($request->input('groups'));
} else {
@@ -435,8 +515,9 @@ class UsersController extends Controller
}
/**
* Display the specified resource.
* Show User
*
* @group Users
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $id
*/
@@ -455,8 +536,9 @@ class UsersController extends Controller
/**
* Update the specified resource in storage.
* Update User
*
* @group Users
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param \Illuminate\Http\Request $request
@@ -500,6 +582,10 @@ class UsersController extends Controller
$user->username = $request->input('username');
}
if ($request->filled('display_name')) {
$user->display_name = $request->input('display_name');
}
if ($request->filled('email')) {
$user->email = $request->input('email');
}
@@ -529,7 +615,7 @@ class UsersController extends Controller
Asset::where('assigned_type', User::class)
->where('assigned_to', $user->id)->update(['location_id' => $request->input('location_id', null)]);
}
app('App\Http\Requests\ImageUploadRequest')->handleImages($user, 600, 'image', 'avatars', 'avatar');
app('App\Http\Requests\ImageUploadRequest')->handleImages($user, 600, 'avatar', 'avatars', 'avatar');
if ($user->save()) {
// Check if the request has groups passed and has a value, AND that the user us a superuser
@@ -552,8 +638,9 @@ class UsersController extends Controller
}
/**
* Remove the specified resource from storage.
* Delete User
*
* @group Users
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
* @param int $id
@@ -589,8 +676,9 @@ class UsersController extends Controller
}
/**
* Return JSON containing a list of assets assigned to a user.
* List Assets Assigned to User
*
* @group Users
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v3.0]
* @param $userId
@@ -632,8 +720,9 @@ class UsersController extends Controller
}
/**
* Notify a specific user via email with all of their assigned assets.
* Email Asset List to User
*
* @group Users
* @author [Lukas Fehling] [<lukas.fehling@adabay.rocks>]
* @since [v6.0.13]
* @param Request $request
@@ -661,8 +750,9 @@ class UsersController extends Controller
}
/**
* Return JSON containing a list of consumables assigned to a user.
* List Consumables Assigned to User
*
* @group Users
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v3.0]
* @param $userId
@@ -678,8 +768,9 @@ class UsersController extends Controller
}
/**
* Return JSON containing a list of accessories assigned to a user.
* List Accessories Assigned to User
*
* @group Users
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.6.14]
* @param $userId
@@ -696,8 +787,9 @@ class UsersController extends Controller
}
/**
* Return JSON containing a list of licenses assigned to a user.
* List Licenses Assigned to User
*
* @group Users
* @author [N. Mathar] [<snipe@snipe.net>]
* @since [v5.0]
* @param $userId
@@ -717,8 +809,9 @@ class UsersController extends Controller
}
/**
* Reset the user's two-factor status
* Reset Two-factor
*
* @group Users
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v3.0]
* @param $userId
@@ -756,8 +849,9 @@ class UsersController extends Controller
}
/**
* Get info on the current user.
* Get Current User Info
*
* @group Users
* @author [Juan Font] [<juanfontalonso@gmail.com>]
* @since [v4.4.2]
* @param \Illuminate\Http\Request $request
@@ -768,8 +862,11 @@ class UsersController extends Controller
}
/**
* Display the EULAs accepted by the user.
* User EULAs
*
* Gets the lst of accepted EULAs for a user,
*
* @group Users
* @param \App\Models\User $user
* @param \App\Http\Transformers\ActionlogsTransformer $transformer
* @return \Illuminate\Http\JsonResponse
@@ -787,8 +884,9 @@ class UsersController extends Controller
}
/**
* Restore a soft-deleted user.
* Restore User
*
* @group Users
* @author [E. Taylor] [<dev@evantaylor.name>]
* @param int $userId
* @since [v6.0.0]
@@ -822,4 +920,38 @@ class UsersController extends Controller
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/users/message.user_not_found')), 200);
}
/**
* LDAP Sync Users
*
* @group Users
* @author A. Gianotto <snipe@snipe.net>
* @since 8.2.2
*
* @return \Illuminate\Http\JsonResponse
*/
public function syncLdapUsers(Request $request)
{
$this->authorize('update', User::class);
// Call Artisan LDAP import command.
Artisan::call('snipeit:ldap-sync', ['--location_id' => $request->input('location_id'), '--json_summary' => true]);
// Collect and parse JSON summary.
$ldap_results_json = Artisan::output();
$ldap_results = json_decode($ldap_results_json, true);
if (!$ldap_results) {
return response()->json(Helper::formatStandardApiResponse('error', null,trans('general.no_results')), 200);
}
// Direct user to appropriate status page.
if ($ldap_results['error']) {
return response()->json(Helper::formatStandardApiResponse('error', null, $ldap_results['error_message']), 200);
}
return response()->json(Helper::formatStandardApiResponse('success', null, $ldap_results['summary']), 200);
}
}

View File

@@ -82,6 +82,7 @@ class AssetModelsController extends Controller
$model->notes = $request->input('notes');
$model->created_by = auth()->id();
$model->requestable = $request->has('requestable');
$model->require_serial = $request->input('require_serial', 0);
if ($request->input('fieldset_id') != '') {
$model->fieldset_id = $request->input('fieldset_id');
@@ -155,7 +156,7 @@ class AssetModelsController extends Controller
$model->category_id = $request->input('category_id');
$model->notes = $request->input('notes');
$model->requestable = $request->input('requestable', '0');
$model->require_serial = $request->input('require_serial', 0);
$model->fieldset_id = $request->input('fieldset_id');
if ($model->save()) {

View File

@@ -1,115 +0,0 @@
<?php
namespace App\Http\Controllers;
use App\Helpers\StorageHelper;
use App\Http\Requests\UploadFileRequest;
use App\Models\Actionlog;
use App\Models\AssetModel;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Response;
use Illuminate\Support\Facades\Storage;
use \Symfony\Component\HttpFoundation\StreamedResponse;
use Symfony\Component\HttpFoundation\BinaryFileResponse;
class AssetModelsFilesController extends Controller
{
/**
* Upload a file to the server.
*
* @param UploadFileRequest $request
* @param int $modelId
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*@since [v1.0]
* @author [A. Gianotto] [<snipe@snipe.net>]
*/
public function store(UploadFileRequest $request, $modelId = null) : RedirectResponse
{
if (! $model = AssetModel::find($modelId)) {
return redirect()->route('models.index')->with('error', trans('admin/hardware/message.does_not_exist'));
}
$this->authorize('update', $model);
if ($request->hasFile('file')) {
if (! Storage::exists('private_uploads/assetmodels')) {
Storage::makeDirectory('private_uploads/assetmodels', 775);
}
foreach ($request->file('file') as $file) {
$file_name = $request->handleFile('private_uploads/assetmodels/','model-'.$model->id,$file);
$model->logUpload($file_name, $request->get('notes'));
}
return redirect()->back()->withFragment('files')->with('success', trans('general.file_upload_success'));
}
return redirect()->back()->withFragment('files')->with('error', trans('admin/hardware/message.upload.nofiles'));
}
/**
* Check for permissions and display the file.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $modelId
* @param int $fileId
* @since [v1.0]
*/
public function show(AssetModel $model, $fileId = null) : StreamedResponse | Response | RedirectResponse | BinaryFileResponse
{
$this->authorize('view', $model);
if (! $log = Actionlog::find($fileId)) {
return response('No matching record for that model/file', 500)
->header('Content-Type', 'text/plain');
}
$file = 'private_uploads/assetmodels/'.$log->filename;
if (! Storage::exists($file)) {
return response('File '.$file.' not found on server', 404)
->header('Content-Type', 'text/plain');
}
if (request('inline') == 'true') {
$headers = [
'Content-Disposition' => 'inline',
];
return Storage::download($file, $log->filename, $headers);
}
return StorageHelper::downloader($file);
}
/**
* Delete the associated file
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $modelId
* @param int $fileId
* @since [v1.0]
*/
public function destroy(AssetModel $model, $fileId = null) : RedirectResponse
{
$rel_path = 'private_uploads/assetmodels';
$this->authorize('update', $model);
$log = Actionlog::find($fileId);
if ($log) {
if (Storage::exists($rel_path.'/'.$log->filename)) {
Storage::delete($rel_path.'/'.$log->filename);
}
$log->delete();
return redirect()->back()->withFragment('files')->with('success', trans('admin/hardware/message.deletefile.success'));
}
return redirect()->back()->withFragment('files')->with('success', trans('admin/hardware/message.deletefile.success'));
}
}

View File

@@ -65,6 +65,8 @@ class AssetCheckoutController extends Controller
*/
public function store(AssetCheckoutRequest $request, $assetId) : RedirectResponse
{
try {
// Check if the asset exists
if (! $asset = Asset::find($assetId)) {
@@ -81,6 +83,7 @@ class AssetCheckoutController extends Controller
$admin = auth()->user();
$target = $this->determineCheckoutTarget();
session()->put(['checkout_to_type' => $target]);
$asset = $this->updateAssetLocation($asset, $target);

View File

@@ -1,108 +0,0 @@
<?php
namespace App\Http\Controllers\Assets;
use App\Helpers\StorageHelper;
use App\Http\Controllers\Controller;
use App\Http\Requests\UploadFileRequest;
use App\Models\Actionlog;
use App\Models\Asset;
use \Illuminate\Http\Response;
use Illuminate\Support\Facades\Storage;
use \Illuminate\Contracts\View\View;
use \Illuminate\Http\RedirectResponse;
use Symfony\Component\HttpFoundation\StreamedResponse;
use Symfony\Component\HttpFoundation\BinaryFileResponse;
class AssetFilesController extends Controller
{
/**
* Upload a file to the server.
*
* @param UploadFileRequest $request
* @param int $assetId
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*@since [v1.0]
* @author [A. Gianotto] [<snipe@snipe.net>]
*/
public function store(UploadFileRequest $request, Asset $asset) : RedirectResponse
{
$this->authorize('update', $asset);
if ($request->hasFile('file')) {
if (! Storage::exists('private_uploads/assets')) {
Storage::makeDirectory('private_uploads/assets', 775);
}
foreach ($request->file('file') as $file) {
$file_name = $request->handleFile('private_uploads/assets/','hardware-'.$asset->id, $file);
$asset->logUpload($file_name, $request->get('notes'));
}
return redirect()->back()->withFragment('files')->with('success', trans('admin/hardware/message.upload.success'));
}
return redirect()->back()->with('error', trans('admin/hardware/message.upload.nofiles'));
}
/**
* Check for permissions and display the file.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $assetId
* @param int $fileId
* @since [v1.0]
*/
public function show(Asset $asset, $fileId = null) : View | RedirectResponse | Response | StreamedResponse | BinaryFileResponse
{
$this->authorize('view', $asset);
if ($log = Actionlog::whereNotNull('filename')->where('item_id', $asset->id)->find($fileId)) {
$file = 'private_uploads/assets/'.$log->filename;
if ($log->action_type == 'audit') {
$file = 'private_uploads/audits/'.$log->filename;
}
try {
return StorageHelper::showOrDownloadFile($file, $log->filename);
} catch (\Exception $e) {
return redirect()->route('hardware.show', $asset)->with('error', trans('general.file_not_found'));
}
}
return redirect()->route('hardware.show', $asset)->with('error', trans('general.log_record_not_found'));
}
/**
* Delete the associated file
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $assetId
* @param int $fileId
* @since [v1.0]
*/
public function destroy(Asset $asset, $fileId = null) : RedirectResponse
{
$this->authorize('update', $asset);
$rel_path = 'private_uploads/assets';
if ($log = Actionlog::find($fileId)) {
if (Storage::exists($rel_path.'/'.$log->filename)) {
Storage::delete($rel_path.'/'.$log->filename);
}
$log->delete();
return redirect()->back()->withFragment('files')->with('success', trans('admin/hardware/message.deletefile.success'));
}
return redirect()->route('hardware.show', $asset)->with('error', trans('general.log_record_not_found'));
}
}

View File

@@ -110,17 +110,35 @@ class AssetsController extends Controller
// This is only necessary on create, not update, since bulk editing is handled
// differently
$asset_tags = $request->input('asset_tags');
$model = AssetModel::find($request->input('model_id'));
$serial_errors = [];
$serials = $request->input('serials');
$settings = Setting::getSettings();
//Validate required serial based on model setting
for ($a = 1, $aMax = count($asset_tags); $a <= $aMax; $a++) {
if ($model && $model->require_serial === 1 && empty($serials[$a])) {
$serial_errors["serials.$a"] = trans('admin/hardware/form.serial_required', ['number' => $a]);
}
}
if (!empty($serial_errors)) {
return redirect()->back()
->withInput()
->withErrors($serial_errors);
}
$asset = null;
$companyId = Company::getIdForCurrentUser($request->input('company_id'));
$successes = [];
$failures = [];
$serials = $request->input('serials');
$asset = null;
for ($a = 1; $a <= count($asset_tags); $a++) {
for ($a = 1, $aMax = count($asset_tags); $a <= $aMax; $a++) {
$asset = new Asset();
$asset->model()->associate(AssetModel::find($request->input('model_id')));
$asset->model()->associate($model);
$asset->name = $request->input('name');
// Check for a corresponding serial
@@ -132,7 +150,7 @@ class AssetsController extends Controller
$asset->asset_tag = $asset_tags[$a];
}
$asset->company_id = Company::getIdForCurrentUser($request->input('company_id'));
$asset->company_id = $companyId;
$asset->model_id = $request->input('model_id');
$asset->order_number = $request->input('order_number');
$asset->notes = $request->input('notes');
@@ -172,7 +190,6 @@ class AssetsController extends Controller
// Update custom fields in the database.
// Validation for these fields is handled through the AssetRequest form request
$model = AssetModel::find($request->get('model_id'));
if (($model) && ($model->fieldset)) {
foreach ($model->fieldset->fields as $field) {
@@ -234,9 +251,13 @@ class AssetsController extends Controller
$failures[] = join(",", $asset->getErrors()->all());
}
}
if($request->get('redirect_option') === 'back'){
session()->put(['redirect_option' => 'index']);
} else {
session()->put(['redirect_option' => $request->get('redirect_option')]);
}
session()->put(['redirect_option' => $request->get('redirect_option'),
'checkout_to_type' => $request->get('checkout_to_type'),
session()->put(['checkout_to_type' => $request->get('checkout_to_type'),
'other_redirect' => 'model' ]);
@@ -342,7 +363,7 @@ class AssetsController extends Controller
$asset->purchase_cost = $request->input('purchase_cost', null);
$asset->purchase_date = $request->input('purchase_date', null);
$asset->next_audit_date = $request->input('next_audit_date', null);
if ($request->filled('purchase_date') && !$request->filled('asset_eol_date') && ($asset->model->eol > 0)) {
if ($request->filled('purchase_date') && !$request->filled('asset_eol_date') && ($asset->model?->eol > 0)) {
$asset->purchase_date = $request->input('purchase_date', null);
$asset->asset_eol_date = Carbon::parse($request->input('purchase_date'))->addMonths($asset->model->eol)->format('Y-m-d');
$asset->eol_explicit = false;
@@ -358,7 +379,7 @@ class AssetsController extends Controller
} else {
$asset->eol_explicit = true;
}
} elseif (!$request->filled('asset_eol_date') && (($asset->model->eol) == 0)) {
} elseif (!$request->filled('asset_eol_date') && (($asset->model?->eol) == 0)) {
$asset->asset_eol_date = null;
$asset->eol_explicit = false;
}
@@ -377,6 +398,7 @@ class AssetsController extends Controller
$asset->assigned_to = null;
$asset->assigned_type = null;
$asset->accepted = null;
$asset->last_checkin = now();
event(new CheckoutableCheckedIn($asset, $target, auth()->user(), 'Checkin on asset update with '.$status->getStatuslabelType().' status', date('Y-m-d H:i:s'), $originalValues));
}
@@ -420,6 +442,9 @@ class AssetsController extends Controller
$model = AssetModel::find($request->get('model_id'));
if (($model) && ($model->fieldset)) {
foreach ($model->fieldset->fields as $field) {
if ($field->element == 'checkbox' && !$request->has($field->db_column)) {
$asset->{$field->db_column} = null;
}
if ($request->has($field->db_column)) {
if ($field->field_encrypted == '1') {
if (Gate::allows('assets.view.encrypted_custom_fields')) {
@@ -446,6 +471,13 @@ class AssetsController extends Controller
]);
//Validate required serial based on model setting
if ($model && $model->require_serial === 1 && empty($serial[1])) {
return redirect()->to(Helper::getRedirectOption($request, $asset->id, 'Assets'))
->with('warning', trans('admin/hardware/form.serial_required_post_model_update', [
'asset_model' => $model->name
]));
}
if ($asset->save()) {
return Helper::getRedirectOption($request, $asset->id, 'Assets')
->with('success', trans('admin/hardware/message.update.success'));
@@ -790,7 +822,7 @@ class AssetsController extends Controller
'item_id' => $asset->id,
'item_type' => Asset::class,
'created_by' => auth()->id(),
'note' => 'Checkout imported by '.auth()->user()->present()->fullName().' from history importer',
'note' => 'Checkout imported by '.auth()->user()->display_name.' from history importer',
'target_id' => $item[$asset_tag][$batch_counter]['user_id'],
'target_type' => User::class,
'created_at' => $item[$asset_tag][$batch_counter]['checkout_date'],
@@ -818,7 +850,7 @@ class AssetsController extends Controller
'item_id' => $item[$asset_tag][$batch_counter]['asset_id'],
'item_type' => Asset::class,
'created_by' => auth()->id(),
'note' => 'Checkin imported by '.auth()->user()->present()->fullName().' from history importer',
'note' => 'Checkin imported by '.auth()->user()->display_name.' from history importer',
'target_id' => null,
'created_at' => $checkin_date,
'action_type' => 'checkin',

Some files were not shown because too many files have changed in this diff Show More