@corva/ui 0.31.1 → 0.31.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/toConsumableArray";import"../../constants/completion.js";import"../../constants/alerts.js";import"lodash";import"@babel/runtime/helpers/slicedToArray";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/notifications.js";import"../../constants/feed.js";import o from"@babel/runtime/regenerator";import t from"@babel/runtime/helpers/asyncToGenerator";import"../../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../../utils/index.js";import{jsxs as n,jsx as r}from"react/jsx-runtime";import"@material-ui/core";import"react";import"querystring";import"uuid/v1";import{getCurrentUser as p}from"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import"classnames";import"../../components/Modal/index.js";import"../../components/IconMenu/index.js";import"../../components/StyledMenuItem/index.js";import s from"../../components/LoadingIndicator/LoadingIndicator.js";import"../../components/DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../components/DevCenter/DevCenterAppContainer/components/DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import"../../components/Tooltip/MuiTooltipDcWrapper.js";import"../../components/Avatar/index.js";import"../../components/Annotations/AnnotationsContext.js";import"../../components/DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import{Route as i,IndexRedirect as m,Router as c,browserHistory as a}from"react-router";import"../../components/DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"../../components/ConfirmationDialog.js";import"../../components/Annotations/components/AnnotationsList/index.js";import"../../components/Annotations/components/LastAnnotation/index.js";import"../../components/PadModeSelect/PadModeSelect.js";import"../../components/DevCenter/AppHeader/AppHeader.js";import"../../components/DevCenter/AppSideBar/AppSideBar.js";import"../../components/DevCenter/AppContext.js";import"../../components/DevCenter/AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"../../components/DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../../components/EmptyView/EmptyAppView/EmptyAppView.js";import"../../components/ErrorBoundary/ErrorBoundary.js";import"../../components/Typography.js";import"../../components/ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../components/DevCenter/DevCenterAppContainer/components/DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"../../components/SlateFormattedText/RenderElements.js";import"../../components/SlateFormattedText/SlateFormattedText.js";import"../../components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../components/DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../../components/DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../../components/DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../components/EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../../components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js";import"../../components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../components/DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../../components/DevCenter/NavigationBar/NavigationBar.js";import"../../components/DevCenter/SideBar/SideBar.js";import"../../components/DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../components/TruncatedText/index.js";import"../../components/AssetEditor/SingleAssetEditor.js";import"../../components/AssetEditor/AssetEditorAutocomplete.js";import"../../components/AssetEditor/index.js";import"../../components/AppVersionsSelect/AppVersionsSelect.js";import"../../components/CollapsableSidebar.js";import"../../components/DateTimePicker/index.js";import"../../components/DatePicker/index.js";import"../../components/ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../components/ColorPicker/ColorPicker.js";import"../../components/ParameterCharts/AddEditTrack.js";import"../../components/ParameterCharts/ParameterCharts.js";import"../../components/ChartActionsList/ChartActionsList.js";import"../../components/SettingEditors/ColorEditor/index.js";import"../../components/SettingEditors/DropdownEditor/index.js";import"../../components/SettingEditors/RadioEditor/index.js";import"../../components/SwitchControl/index.js";import"../../components/RangeSlider/RangeSlider.js";import"../../components/Login/components/Login.js";import"../../components/Login/components/PasswordField.js";import"../../components/Login/components/Chip.js";import"../../components/Login/components/StepFooter.js";import"../../components/Login/components/StepContent.js";import"../../components/Login/components/StepHeader.js";import"../../components/Login/components/Step.js";import"../../components/Login/components/OrDivider.js";import"../../components/Login/components/HiddenEmailField.js";import"../../components/Login/components/EmailField.js";import"../../components/Breadcrumbs/index.js";import"../../components/VirtualizedTable/index.js";import"../../components/EmptyView/EmptyView.js";import"../../components/Button/index.js";import"../../components/MenuItem/index.js";import"../../components/ContextMenuItem/index.js";import"../../components/FolderMenuItem/index.js";import"../../components/EditableItem/EditableItem/index.js";import"../../components/EditableItem/EditableItemWithBadge/index.js";import"../../components/Checkbox/index.js";import"../../components/FolderMenuItemWithLinks/index.js";import"../../components/IconButton/index.js";import"../../components/TextField/index.js";import"../../components/Chip/index.js";import"../../components/Counter/index.js";import"../../components/AnchorsList/AnchorsList.js";import"../../components/Select/index.js";import"../../components/Tabs/Tabs.js";import"../../components/Tabs/Tab.js";import"../../components/Drillstring/BHASchematic.js";import"../../components/Drillstring/BHAComponentIcon.js";import"../../components/Drillstring/BHATable/index.js";import"../../components/Drillstring/BHAComponentDetail/index.js";import"../../components/Casing/CasingComponentIcon.js";import"../../components/Casing/CasingTable/index.js";import"../../components/WellSummary/WellSummaryItemLabel.js";import"../../components/WellSummary/WellSummaryItemTitle.js";import"../../components/WellSummary/WellSummaryItemValue.js";import"../../components/WellSummary/ActivitySummaryChart.js";import"../../components/WellSummary/FracWirelineTimeChart.js";import"../../components/BICOffsetPickerDialog/index.js";import"../../components/OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../components/Notifications/Notifications.js";import"../../components/TextLink/index.js";import"../../components/Template/TemplatePopover/index.js";import"../../components/PinnableFilters/PinnableFilters.js";import"../../components/HeaderLayout/HeaderLayout.js";import"../../components/PadOffsetsPicker/PadOffsetsPicker.js";import"../../components/PadOffsetsPicker/OffsetAssetChip.js";import"../../components/PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../components/PadOffsetsPicker/StagesSelector.js";import"../../components/Table/TableToolbar/TableToolbar.js";import"../../components/PriceInput/PriceInput.js";import"../../components/LabelsCounter/LabelsCounter.js";import"../../components/Stepper/Step.js";import"../../components/Stepper/StepsWrapper.js";import"../../components/Stepper/Stepper.js";import"../../components/Comment/CommentIcon/index.js";import"../../components/FilesLoader/FilesLoader.js";import"../../components/SearchInput/index.js";import"../../components/FeedItem/FeedItem.js";import"../../components/KeyboardDateTimePicker.js";import"../../components/PostInput/PostInput.js";import"../../components/FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../components/AddComment/Popover.js";import"../../components/AddComment/Popup.js";import{useAuth as l}from"../context/auth.js";import j from"../screens/LoginScreen/LoginScreen.js";import d from"../screens/OAuthCallbackScreen/index.js";import u from"../components/App/App.js";function C(e,o){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);o&&(n=n.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),t.push.apply(t,n)}return t}var A,D=(A=t(o.mark((function e(t,n,r){var s;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,p();case 2:if(s=e.sent,!t.location.pathname.startsWith("/login")){e.next=8;break}return s&&n("/"),r(),e.abrupt("return");case 8:s||n("/login"),r();case 10:case"end":return e.stop()}}),e)}))),function(e,o,t){return A.apply(this,arguments)}),v=function(o){return function(t){var n=t.route,p=t.location,i=t.router;return l().loading?r(s,{fullscreen:!0}):r(o,function(o){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){e(o,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(e){Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(n,e))}))}return o}({location:p,router:i},n.componentProps||{}))}};export default function(e){return function(o){var t=n(i,{path:"/",component:u,onEnter:D,children:[r(m,{to:"app"}),r(i,{path:"app",component:v(e),componentProps:o}),r(i,{path:"login",component:j}),r(i,{path:"login/oauth-callback",component:d})]});return r(c,{history:a,routes:t})}}
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/toConsumableArray";import"../../constants/completion.js";import"../../constants/alerts.js";import"lodash";import"@babel/runtime/helpers/slicedToArray";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/notifications.js";import"../../constants/feed.js";import o from"@babel/runtime/regenerator";import t from"@babel/runtime/helpers/asyncToGenerator";import"../../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../../utils/index.js";import{jsxs as n,jsx as r}from"react/jsx-runtime";import"@material-ui/core";import"react";import"querystring";import"uuid/v1";import{getCurrentUser as p}from"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import"classnames";import"../../components/Modal/index.js";import"../../components/IconMenu/index.js";import"../../components/StyledMenuItem/index.js";import s from"../../components/LoadingIndicator/LoadingIndicator.js";import"../../components/DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../components/DevCenter/DevCenterAppContainer/components/DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import"../../components/Tooltip/MuiTooltipDcWrapper.js";import"../../components/Avatar/index.js";import"../../components/Annotations/AnnotationsContext.js";import"../../components/DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import{Route as i,IndexRedirect as m,Router as c,browserHistory as a}from"react-router";import"../../components/DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"../../components/ConfirmationDialog.js";import"../../components/Annotations/components/AnnotationsList/index.js";import"../../components/Annotations/components/LastAnnotation/index.js";import"../../components/PadModeSelect/PadModeSelect.js";import"../../components/DevCenter/AppHeader/AppHeader.js";import"../../components/DevCenter/AppSideBar/AppSideBar.js";import"../../components/DevCenter/AppContext.js";import"../../components/DevCenter/AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"../../components/DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../../components/EmptyView/EmptyAppView/EmptyAppView.js";import"../../components/ErrorBoundary/ErrorBoundary.js";import"../../components/Typography.js";import"../../components/ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../components/DevCenter/DevCenterAppContainer/components/DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"../../components/SlateFormattedText/RenderElements.js";import"../../components/SlateFormattedText/SlateFormattedText.js";import"../../components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../components/DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../../components/DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../../components/DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../components/EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../../components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js";import"../../components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../components/DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../../components/DevCenter/NavigationBar/NavigationBar.js";import"../../components/DevCenter/SideBar/SideBar.js";import"../../components/DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../components/TruncatedText/index.js";import"../../components/AssetEditor/SingleAssetEditor.js";import"../../components/AssetEditor/AssetEditorAutocomplete.js";import"../../components/AssetEditor/index.js";import"../../components/AppVersionsSelect/AppVersionsSelect.js";import"../../components/CollapsableSidebar.js";import"../../components/DateTimePicker/index.js";import"../../components/DatePicker/index.js";import"../../components/ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../components/ColorPicker/ColorPicker.js";import"../../components/ParameterCharts/AddEditTrack.js";import"../../components/ParameterCharts/ParameterCharts.js";import"../../components/ChartActionsList/ChartActionsList.js";import"../../components/SettingEditors/ColorEditor/index.js";import"../../components/SettingEditors/DropdownEditor/index.js";import"../../components/SettingEditors/RadioEditor/index.js";import"../../components/SwitchControl/index.js";import"../../components/RangeSlider/RangeSlider.js";import"../../components/Login/components/Login.js";import"../../components/Login/components/PasswordField.js";import"../../components/Login/components/Chip.js";import"../../components/Login/components/StepFooter.js";import"../../components/Login/components/StepContent.js";import"../../components/Login/components/StepHeader.js";import"../../components/Login/components/Step.js";import"../../components/Login/components/OrDivider.js";import"../../components/Login/components/HiddenEmailField.js";import"../../components/Login/components/EmailField.js";import"../../components/Breadcrumbs/index.js";import"../../components/VirtualizedTable/index.js";import"../../components/EmptyView/EmptyView.js";import"../../components/Button/index.js";import"../../components/MenuItem/index.js";import"../../components/ContextMenuItem/index.js";import"../../components/FolderMenuItem/index.js";import"../../components/EditableItem/EditableItem/index.js";import"../../components/EditableItem/EditableItemWithBadge/index.js";import"../../components/Checkbox/index.js";import"../../components/FolderMenuItemWithLinks/index.js";import"../../components/IconButton/index.js";import"../../components/TextField/index.js";import"../../components/Chip/index.js";import"../../components/Counter/index.js";import"../../components/AnchorsList/AnchorsList.js";import"../../components/Select/index.js";import"../../components/Tabs/Tabs.js";import"../../components/Tabs/Tab.js";import"../../components/Drillstring/BHASchematic.js";import"../../components/Drillstring/BHAComponentIcon.js";import"../../components/Drillstring/BHATable/index.js";import"../../components/Drillstring/BHAComponentDetail/index.js";import"../../components/Casing/CasingComponentIcon.js";import"../../components/Casing/CasingTable/index.js";import"../../components/WellSummary/WellSummaryItemLabel.js";import"../../components/WellSummary/WellSummaryItemTitle.js";import"../../components/WellSummary/WellSummaryItemValue.js";import"../../components/WellSummary/ActivitySummaryChart.js";import"../../components/WellSummary/FracWirelineTimeChart.js";import"../../components/BICOffsetPickerDialog/index.js";import"../../components/OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../components/Notifications/Notifications.js";import"../../components/TextLink/index.js";import"../../components/Template/TemplatePopover/index.js";import"../../components/PinnableFilters/PinnableFilters.js";import"../../components/HeaderLayout/HeaderLayout.js";import"../../components/PadOffsetsPicker/PadOffsetsPicker.js";import"../../components/PadOffsetsPicker/OffsetAssetChip.js";import"../../components/PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../components/PadOffsetsPicker/StagesSelector.js";import"../../components/Table/TableToolbar/TableToolbar.js";import"../../components/PriceInput/PriceInput.js";import"../../components/LabelsCounter/LabelsCounter.js";import"../../components/Stepper/Step.js";import"../../components/Stepper/StepsWrapper.js";import"../../components/Stepper/Stepper.js";import"../../components/Comment/CommentIcon/index.js";import"../../components/FilesLoader/FilesLoader.js";import"../../components/SearchInput/index.js";import"../../components/FeedItem/FeedItem.js";import"../../components/KeyboardDateTimePicker.js";import"../../components/PostInput/PostInput.js";import"../../components/FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../components/AddComment/Popover.js";import"../../components/AddComment/Popup.js";import{useAuth as l}from"../context/auth.js";import j from"../screens/LoginScreen/LoginScreen.js";import d from"../screens/OAuthCallbackScreen/index.js";import u from"../components/App/App.js";function C(e,o){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);o&&(n=n.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),t.push.apply(t,n)}return t}var A,v=(A=t(o.mark((function e(t,n,r){var s;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=null,e.prev=1,e.next=4,p();case 4:s=e.sent,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),console.error(e.t0);case 10:if(!t.location.pathname.startsWith("/login")){e.next=15;break}return s&&n("/"),r(),e.abrupt("return");case 15:s||n("/login"),r();case 17:case"end":return e.stop()}}),e,null,[[1,7]])}))),function(e,o,t){return A.apply(this,arguments)}),D=function(o){return function(t){var n=t.route,p=t.location,i=t.router;return l().loading?r(s,{fullscreen:!0}):r(o,function(o){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){e(o,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(e){Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(n,e))}))}return o}({location:p,router:i},n.componentProps||{}))}};export default function(e){return function(o){var t=n(i,{path:"/",component:u,onEnter:v,children:[r(m,{to:"app"}),r(i,{path:"app",component:D(e),componentProps:o}),r(i,{path:"login",component:j}),r(i,{path:"login/oauth-callback",component:d})]});return r(c,{history:a,routes:t})}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"@babel/runtime/regenerator";import n from"@babel/runtime/helpers/asyncToGenerator";import{jsx as
|
|
1
|
+
import o from"@babel/runtime/regenerator";import n from"@babel/runtime/helpers/asyncToGenerator";import{jsx as e}from"react/jsx-runtime";import{useEffect as t}from"react";import{getCurrentUser as r}from"../../../clients/jsonApi/index.js";import i from"../../../components/Login/components/Login.js";import"../../../components/Login/components/PasswordField.js";import"../../../components/Login/components/Chip.js";import"../../../components/Login/components/StepFooter.js";import"../../../components/Login/components/StepContent.js";import"../../../components/Login/components/StepHeader.js";import"../../../components/Login/components/Step.js";import"../../../components/Login/components/OrDivider.js";import"../../../components/Login/components/HiddenEmailField.js";import"../../../components/Login/components/EmailField.js";import p from"./components/Auth.js";import s from"./components/IconLogo.js";import m from"./LoginScreen.css.js";function c(c){var a=c.router,l=c.location;return t((function(){function e(){return(e=n(o.mark((function n(){var e;return o.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return e=null,o.prev=1,o.next=4,r();case 4:e=o.sent,o.next=10;break;case 7:o.prev=7,o.t0=o.catch(1),console.error(o.t0);case 10:e&&a.replace("/");case 11:case"end":return o.stop()}}),n,null,[[1,7]])})))).apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[]),e("div",{className:m.loginScreen,children:e(i,{location:l,logoIcon:e(s,{}),promoLink:"https://youtu.be/-q6LkceqpGs",children:e(p,{router:a})})})}export default c;
|
package/clients/api/apiCore.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import r from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/regenerator";import a from"@babel/runtime/helpers/asyncToGenerator";import{parse as o,stringify as s}from"query-string";import
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import r from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/regenerator";import a from"@babel/runtime/helpers/asyncToGenerator";import{parse as o,stringify as s}from"query-string";import c from"@babel/runtime/helpers/createClass";import{getDCAppKey as i}from"../utils.js";import{DISPLAY_HTTP_MESSAGES as p}from"./httpMessages.js";function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?u(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var h={400:"Request Failed",403:"No Permission",404:"Not Found"},f=["POST","PUT","PATCH","DELETE"],d=function(){function e(t,n){r(this,e),this.status=t.status,this.statusText=t.statusText,this.message=n.message||"No Message"}return c(e,[{key:"isAuthenticationProblem",value:function(){return 401===this.status}},{key:"isTermsProblem",value:function(){return 401===this.status&&"Please accept the latest terms of service"===this.message}}]),e}(),m=o(window.location.search).api_url||process.env.REACT_APP_API_URL||"https://api.qa.corva.ai",y={"Content-Type":"application/json",Accept:"application/json"};function v(e){var t=e.config,r=e.appKey;return l(l({},t),{},{headers:l(l({},t.headers||{}),{},{"X-Corva-App":r})})}function b(e){e.isAuthenticationProblem&&e.isAuthenticationProblem()&&!e.isTermsProblem()&&(console.error("Problem with user"),"/login"!==window.location.pathname&&(window.location.href="/login"))}var g=/^\/v1\/assets.*/;function w(){return(w=a(n.mark((function e(t){var r,a,o,s,c,i=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:{},a=i.length>2&&void 0!==i[2]?i[2]:{},o=a.apiUrl,s=void 0===o?m:o,c=a.appKey,g.test(t)&&(r.cache="reload"),r.credentials="include",e.abrupt("return",fetch("".concat(s).concat(t),v({config:r,appKey:c})));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var P,x,O=(P=function(e){return w.apply(this,arguments)},x=a(n.mark((function e(t,r,a){var o,s,c,i,u,l,m;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(t,r,a);case 2:if(o=e.sent,s=o.status,!o.ok){e.next=6;break}return e.abrupt("return",204===s?null:o);case 6:return e.prev=6,e.next=9,o.json();case 9:c=e.sent,e.next=15;break;case 12:e.prev=12,e.t0=e.catch(6),c={};case 15:throw i=r.method,u=f.includes(i),l=p[c.message]||h[s],u&&l&&console.error("ERROR"),b(m=new d(o,c)),m;case 22:case"end":return e.stop()}}),e,null,[[6,12]])}))),function(e,t,r){return x.apply(this,arguments)});function j(e,t){return k.apply(this,arguments)}function k(){return(k=a(n.mark((function e(t,r){var a,o,s,c=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=c.length>2&&void 0!==c[2]?c[2]:{},o=a.apiUrl,e.next=4,O(t,{method:"POST",headers:y,body:JSON.stringify(r)},{apiUrl:o,appKey:i()});case 4:return s=e.sent,e.abrupt("return",s&&s.json());case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function T(e){return A.apply(this,arguments)}function A(){return(A=a(n.mark((function e(t){var r,a,o,c,i,p,u=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=u.length>1&&void 0!==u[1]?u[1]:{},a=u.length>2&&void 0!==u[2]?u[2]:{},o=a.apiUrl,c=a.appKey,i=s(r,{arrayFormat:"bracket"}),e.next=6,O("".concat(t).concat(i?"?":"").concat(i),{method:"GET"},{apiUrl:o,appKey:c});case 6:if(p=e.sent,e.t0=p,!e.t0){e.next=12;break}return e.next=11,p.json();case 11:e.t0=e.sent;case 12:return e.t1=e.t0,e.t2=p&&p.headers,e.abrupt("return",{data:e.t1,headers:e.t2});case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function U(e){return E.apply(this,arguments)}function E(){return(E=a(n.mark((function e(t){var r,a,o,s=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=s.length>1&&void 0!==s[1]?s[1]:{},a=s.length>2&&void 0!==s[2]?s[2]:{},e.next=4,T(t,r,l(l({},a),{},{appKey:a.appKey||i()}));case 4:return o=e.sent,e.abrupt("return",o.data);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function K(e,t){return C.apply(this,arguments)}function C(){return(C=a(n.mark((function e(t,r){var a,o,c,p,u,l=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=l.length>2&&void 0!==l[2]?l[2]:{},o=l.length>3&&void 0!==l[3]?l[3]:{},c=o.apiUrl,p=s(a),e.next=6,O("".concat(t).concat(p?"?":"").concat(p),{method:"PUT",headers:y,body:JSON.stringify(r)},{apiUrl:c,appKey:i()});case 6:return u=e.sent,e.abrupt("return",u&&u.json());case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function S(e,t){return D.apply(this,arguments)}function D(){return(D=a(n.mark((function e(t,r){var a,o,c,p,u,l=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=l.length>2&&void 0!==l[2]?l[2]:{},o=l.length>3&&void 0!==l[3]?l[3]:{},c=o.apiUrl,p=s(a),e.next=6,O("".concat(t).concat(p?"?":"").concat(p),{method:"PATCH",headers:y,body:JSON.stringify(r)},{apiUrl:c,appKey:i()});case 6:return u=e.sent,e.abrupt("return",u&&u.json());case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function N(e){return R.apply(this,arguments)}function R(){return(R=a(n.mark((function e(t){var r,a,o,c,p,u=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=u.length>1&&void 0!==u[1]?u[1]:{},a=u.length>2&&void 0!==u[2]?u[2]:{},o=a.apiUrl,c=s(r),e.next=6,O(c?"".concat(t,"?").concat(c):t,{method:"DELETE",headers:y},{apiUrl:o,appKey:i()});case 6:return p=e.sent,e.abrupt("return",p&&p.json());case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function F(e,t){return _.apply(this,arguments)}function _(){return(_=a(n.mark((function e(r,a){var o,c,p,u,l,h,f,d=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=d.length>2&&void 0!==d[2]?d[2]:{},c=d.length>3&&void 0!==d[3]?d[3]:{},p=s(o),u=c.method,l=void 0===u?"POST":u,h=new FormData,Object.entries(a).forEach((function(e){var r=t(e,2),n=r[0],a=r[1];Array.isArray(a)?a.forEach((function(e){h.append(n,e)})):h.append(n,a)})),e.next=8,O(p?"".concat(r,"?").concat(p):r,{method:l,headers:{Accept:"application/json"},body:h},{appKey:i()});case 8:return f=e.sent,e.abrupt("return",f&&f.json());case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}export{d as APIException,m as baseUrl,N as del,U as get,T as getWithHeaders,b as handleAuthenticationProblem,S as patch,j as post,K as put,F as sendFormData};
|
package/clients/jsonApi/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"@babel/runtime/helpers/defineProperty";import{range as r,flattenDepth as n}from"lodash";import e from"@babel/runtime/regenerator";import a from"@babel/runtime/helpers/asyncToGenerator";import{stringify as c}from"query-string";import{baseUrl as u,get as p,post as s,del as o,put as i,sendFormData as f,patch as l}from"../api/apiCore.js";import{CORVA_API_URLS as h}from"../constants.js";function v(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);r&&(e=e.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),n.push.apply(n,e)}return n}function d(r){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?v(Object(e),!0).forEach((function(n){t(r,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):v(Object(e)).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))}))}return r}function m(){return y.apply(this,arguments)}function y(){return(y=a(e.mark((function t(){var r;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch("".concat(u,"/v1/users/current"),{credentials:"include"});case 3:if(null!=(r=t.sent)&&r.ok){t.next=6;break}return t.abrupt("return",null);case 6:return t.next=8,r.json();case 8:return t.abrupt("return",t.sent);case 11:return t.prev=11,t.t0=t.catch(0),console.error(t.t0),t.abrupt("return",null);case 15:case"end":return t.stop()}}),t,null,[[0,11]])})))).apply(this,arguments)}function w(t){return _.apply(this,arguments)}function _(){return(_=a(e.mark((function t(r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v2/wells",r));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function b(t){return g.apply(this,arguments)}function g(){return(g=a(e.mark((function t(r){var n,a=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",p("/v2/wells/".concat(r),n));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function k(t){return x.apply(this,arguments)}function x(){return(x=a(e.mark((function t(r){var n,a=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",p("/v2/rigs/".concat(r),n));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function O(){return j.apply(this,arguments)}function j(){return(j=a(e.mark((function t(){var r,n=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.length>0&&void 0!==n[0]?n[0]:{},t.abrupt("return",p("/v2/rigs",r));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function P(){return $.apply(this,arguments)}function $(){return($=a(e.mark((function t(){var r,n=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.length>0&&void 0!==n[0]?n[0]:{},t.abrupt("return",p("/v2/programs",r));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function A(t){return D.apply(this,arguments)}function D(){return(D=a(e.mark((function t(r){var n,a=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",p("/v2/assets/".concat(r),n));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function I(){return T.apply(this,arguments)}function T(){return(T=a(e.mark((function t(){var r,n=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.length>0&&void 0!==n[0]?n[0]:{},t.abrupt("return",p("/v2/assets",r));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function U(){return q.apply(this,arguments)}function q(){return(q=a(e.mark((function t(){var r,n=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.length>0&&void 0!==n[0]?n[0]:{},t.abrupt("return",s("/v2/assets/resolve",r));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function N(){return S.apply(this,arguments)}function S(){return(S=a(e.mark((function t(){var r,n=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.length>0&&void 0!==n[0]?n[0]:{},t.abrupt("return",p("/v2/pads",r));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function C(){return E.apply(this,arguments)}function E(){return(E=a(e.mark((function t(){var r,n=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.length>0&&void 0!==n[0]?n[0]:{},t.abrupt("return",p("/v2/frac_fleets",r));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function J(t){return K.apply(this,arguments)}function K(){return(K=a(e.mark((function t(r){var n,a=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",p("/v2/drillout_units/".concat(r),n));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function F(){return G.apply(this,arguments)}function G(){return(G=a(e.mark((function t(){var r,n=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.length>0&&void 0!==n[0]?n[0]:{},t.abrupt("return",p("/v2/drillout_units",r));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function M(t,r,n){return R.apply(this,arguments)}function R(){return(R=a(e.mark((function t(r,n,a){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o("/v1/data/".concat(r,"/").concat(n),a));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function z(t,r,n){return B.apply(this,arguments)}function B(){return(B=a(e.mark((function t(r,n,a){var c,u=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=u.length>3&&void 0!==u[3]?u[3]:{},t.abrupt("return",p("/v1/data/".concat(r,"/").concat(n),d(d({},c),{},{asset_id:a}),{appKey:c.appKey}));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function H(t,r){return L.apply(this,arguments)}function L(){return(L=a(e.mark((function t(r,n){var a,c=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=c.length>2&&void 0!==c[2]?c[2]:{},t.abrupt("return",p("/api/v1/data/".concat(r,"/").concat(n,"/"),a,{apiUrl:h.DATA_API}));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Q(t,r){return V.apply(this,arguments)}function V(){return(V=a(e.mark((function t(r,n){var a,c=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=c.length>2&&void 0!==c[2]?c[2]:{},t.abrupt("return",p("/api/v1/data/".concat(r,"/").concat(n,"/aggregate/"),a,{apiUrl:h.DATA_API}));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function W(t,r,n,e){return X.apply(this,arguments)}function X(){return(X=a(e.mark((function t(r,n,a,c){var u,p=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u=p.length>4&&void 0!==p[4]?p[4]:{},t.abrupt("return",i("/v1/data/".concat(r,"/").concat(n,"/").concat(a),c,u));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Y(t,r,n,e,a){return Z.apply(this,arguments)}function Z(){return(Z=a(e.mark((function t(r,n,a,c,u){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i("/api/v1/data/".concat(r,"/").concat(n,"/").concat(a),c,u,{apiUrl:h.DATA_API}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function tt(t,r,n){return rt.apply(this,arguments)}function rt(){return(rt=a(e.mark((function t(r,n,a){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v1/data/".concat(r,"/").concat(n),a));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function nt(t,r,n){return et.apply(this,arguments)}function et(){return(et=a(e.mark((function t(r,n,a){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/api/v1/data/".concat(r,"/").concat(n),a,{apiUrl:h.DATA_API}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function at(t){return ct.apply(this,arguments)}function ct(){return(ct=a(e.mark((function t(r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v1/competitor_analysis",r));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ut(){return pt.apply(this,arguments)}function pt(){return(pt=a(e.mark((function t(){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v1/companies"));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function st(t){return ot.apply(this,arguments)}function ot(){return(ot=a(e.mark((function t(r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v2/picklists/".concat(r)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function it(){return ft.apply(this,arguments)}function ft(){return(ft=a(e.mark((function t(){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v2/favorites"));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function lt(t){return ht.apply(this,arguments)}function ht(){return(ht=a(e.mark((function t(r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v1/companies/".concat(r,"/settings/company_goals")));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var vt,dt,mt,yt,wt=(vt=a(e.mark((function t(r){var n,a,c,u;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n={asset_id:+r},a={_id:"$file",name:{$first:"$file"},timestamp:{$first:"$timestamp"}},c={timestamp:-1},u={aggregate:JSON.stringify([{$match:n},{$group:a},{$sort:c}])},t.prev=4,t.next=7,z("corva","formation-evaluation.metadata",r,u);case 7:return t.abrupt("return",t.sent);case 10:return t.prev=10,t.t0=t.catch(4),console.error(t.t0),t.abrupt("return",[]);case 14:case"end":return t.stop()}}),t,null,[[4,10]])}))),function(t){return vt.apply(this,arguments)}),_t=(dt=a(e.mark((function t(r,n){var a;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a="{asset_id#eq#".concat(r,"}AND{file#eq#'").concat(n,"'}"),t.prev=1,t.next=4,z("corva","formation-evaluation.metadata",r,{query:a});case 4:return t.abrupt("return",t.sent);case 7:return t.prev=7,t.t0=t.catch(1),console.error(t.t0),t.abrupt("return",[]);case 11:case"end":return t.stop()}}),t,null,[[1,7]])}))),function(t,r){return dt.apply(this,arguments)}),bt=(mt=a(e.mark((function t(r,n,a){var c,u,p,s,o,i;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c={asset_id:+r,"metadata.file":n},u=1e4*a,p={"data.md":1},s={data:"$data"},o={aggregate:JSON.stringify([{$match:c},{$sort:p},{$skip:u},{$limit:1e4},{$project:s}])},t.prev=6,t.next=9,z("corva","formation-evaluation.data",r,o);case 9:return i=t.sent,t.abrupt("return",i);case 13:return t.prev=13,t.t0=t.catch(6),console.error(t.t0),t.abrupt("return",[]);case 17:case"end":return t.stop()}}),t,null,[[6,13]])}))),function(t,r,n){return mt.apply(this,arguments)}),gt=(yt=a(e.mark((function t(a){var c,u,p,s,o;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=a.assetId,u=a.fileName,p=a.recordsCount,s=Math.ceil(p/1e4),o=r(s).map((function(t){return bt(c,u,t)})),t.abrupt("return",Promise.all(o).then((function(t){return n(t)})));case 4:case"end":return t.stop()}}),t)}))),function(t){return yt.apply(this,arguments)}),kt=function(t){var r=t.assetId,n=t.segment,e=void 0===n?"drilling":n;return p("/v1/app_streams?asset_id=".concat(r,"&segment=").concat(e))};function xt(t){switch(t){case"program":return P;case"rig":return O;case"well":return w;case"frac_fleet":return C;case"drillout_unit":return F;case"pad":return N;default:return I}}function Ot(t){switch(t){case"rig":return k;case"well":return b;default:return A}}var jt=function(t,r){return p("/v2/apps/".concat(t,"/app_media"),r)},Pt=function(t,r){return o("/v2/apps/".concat(t,"/app_media/").concat(r),null)},$t=function(t,r){var n=r.file,e=r.mediaType;return f("/v2/apps/".concat(t,"/app_media"),{"app_media[media_type]":e,"app_media[file]":n})},At=function(t,r,n){return l("/v2/apps/".concat(t,"/app_media/").concat(r),{app_media:n})},Dt=function(t,r){return p("/v2/apps/".concat(t,"/app_help_contents"),r)},It=function(t,r){return o("/v2/apps/".concat(t,"/app_help_contents/").concat(r),null)},Tt=function(t,r){var n=r.title,e=r.description,a=r.url;return f("/v2/apps/".concat(t,"/app_help_contents"),{"app_help_content[title]":n,"app_help_content[description]":e,"app_help_content[url]":a})},Ut=function(t,r,n){var e=n.title,a=n.description,c=n.url,u=n.position;return l("/v2/apps/".concat(t,"/app_help_contents/").concat(r),{app_help_content:{title:e,description:a,url:c,position:u}})};function qt(t){return Nt.apply(this,arguments)}function Nt(){return(Nt=a(e.mark((function t(r){var n,a=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",s("/v2/dashboard_app_annotations",d({app_annotation:r},n)));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function St(t,r){return Ct.apply(this,arguments)}function Ct(){return(Ct=a(e.mark((function t(r,n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",l("/v2/dashboard_app_annotations/".concat(r),{app_annotation:n}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Et(t){return Jt.apply(this,arguments)}function Jt(){return(Jt=a(e.mark((function t(r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o("/v2/dashboard_app_annotations/".concat(r)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Kt(t,r){return Ft.apply(this,arguments)}function Ft(){return(Ft=a(e.mark((function t(r,n){var a,c=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=c.length>2&&void 0!==c[2]?c[2]:{},t.abrupt("return",p("/v2/dashboard_app_annotations",d({app_id:r,asset_id:n},a)));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Gt(t,r,n){return Mt.apply(this,arguments)}function Mt(){return(Mt=a(e.mark((function t(r,n,a){var c;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c={dashboard_id:r},n&&(c.asset_id=n),a&&(c.parent_asset_id=a),t.abrupt("return",p("/v2/dashboard_app_annotations/last_annotations",c));case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Rt(t){return zt.apply(this,arguments)}function zt(){return(zt=a(e.mark((function t(r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",l("/v2/dashboard_app_annotations/".concat(r,"/close")));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Bt(t,r){return Ht.apply(this,arguments)}function Ht(){return(Ht=a(e.mark((function t(r,n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v2/dashboard_app_annotations/".concat(r,"/comments/"),n));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Lt(t){return Qt.apply(this,arguments)}function Qt(){return(Qt=a(e.mark((function t(r){var n,a=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",p("/v2/dashboard_app_annotations/".concat(r,"/comments/"),n));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Vt(t){return"".concat(u,"/v1/file/download?file_name=").concat(t)}function Wt(t,r,n){return Xt.apply(this,arguments)}function Xt(){return(Xt=a(e.mark((function t(r,n,a){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",l("/v1/activities/".concat(r,"/comments/").concat(n),a));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Yt(t,r){return Zt.apply(this,arguments)}function Zt(){return(Zt=a(e.mark((function t(r,n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v1/activities/".concat(r,"/comments"),n));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function tr(t,r){return rr.apply(this,arguments)}function rr(){return(rr=a(e.mark((function t(r,n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o("/v1/activities/".concat(r,"/comments/").concat(n)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function nr(t){return er.apply(this,arguments)}function er(){return(er=a(e.mark((function t(r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v1/activities/".concat(r,"/likes/toggle")));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ar(t,r){return cr.apply(this,arguments)}function cr(){return(cr=a(e.mark((function t(r,n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",l("/v1/activities/".concat(r),n));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ur(t){return pr.apply(this,arguments)}function pr(){return(pr=a(e.mark((function t(r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o("/v1/activities/".concat(r)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function sr(t,r,n){return or.apply(this,arguments)}function or(){return(or=a(e.mark((function t(r,n,a){var c;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c={type:r},n&&(c.search=n),a&&(c.company_id=a),t.abrupt("return",p("/v1/users/autocomplete",c));case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ir(t,r){return fr.apply(this,arguments)}function fr(){return(fr=a(e.mark((function t(r,n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v1/file/sign?file_name=".concat(encodeURIComponent(r),"&contentType=").concat(n)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var lr=function(t,r){return p("/v2/apps/".concat(t,"/packages"),r)};function hr(t){return vr.apply(this,arguments)}function vr(){return(vr=a(e.mark((function t(r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v1/sessions/schemas",{email:r,with_provider:!0}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function dr(t){return mr.apply(this,arguments)}function mr(){return(mr=a(e.mark((function t(r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v2/frac_fleets/wells",r));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function yr(t,r){return wr.apply(this,arguments)}function wr(){return(wr=a(e.mark((function t(r,n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v2/pads/".concat(r,"/app_wells"),n));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function _r(t){return br.apply(this,arguments)}function br(){return(br=a(e.mark((function t(r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v2/tasks/".concat(r),{}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function gr(){return kr.apply(this,arguments)}function kr(){return(kr=a(e.mark((function t(){var r,n=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.length>0&&void 0!==n[0]?n[0]:{},t.abrupt("return",s("/v2/tasks",r));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var xr=function(t){return p("/v2/apps/".concat(t,"/app_settings_templates"),{})},Or=function(t,r){return p("/v2/apps/".concat(t,"/app_settings_templates/").concat(r),{})},jr=function(t,r,n){var e=n.name,a=n.settings;return l("/v2/apps/".concat(t,"/app_settings_templates/").concat(r),{app_settings_template:{name:e,settings:a}},{})},Pr=function(t,r){var n=r.name,e=r.settings;return s("/v2/apps/".concat(t,"/app_settings_templates"),{app_settings_template:{name:n,settings:e}})},$r=function(t,r){return o("/v2/apps/".concat(t,"/app_settings_templates/").concat(r),{})},Ar=function(t,r,n){var e=c({user_id:n},{arrayFormat:"bracket"});return s("/v2/apps/".concat(t,"/app_settings_templates/").concat(r,"/share?").concat(e),{})},Dr=function(t){var r=t.page,n=t.perPage,e=void 0===n?1e3:n,a=t.sort,c=t.order,u=t.search,s=t.companyId,o=t.ids;return p("/v1/users",{page:r,per_page:e,sort:a,order:c,ids:o,search:""!==u?u:void 0,company_id:null!==s?s:void 0})};function Ir(t,r){return Tr.apply(this,arguments)}function Tr(){return(Tr=a(e.mark((function t(r,n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v1/users/".concat(r,"/settings"),n));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Ur(t,r){return qr.apply(this,arguments)}function qr(){return(qr=a(e.mark((function t(r,n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v1/users/".concat(r,"/settings/").concat(n)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Nr(){return Sr.apply(this,arguments)}function Sr(){return(Sr=a(e.mark((function t(){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v1/logout"));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}export{Rt as closeLastAnnotation,Et as deleteAnnotation,It as deleteAppHelpContent,Pt as deleteAppMedia,$r as deleteAppSettingsTemplate,M as deleteAppStorageRecords,ur as deleteFeedItem,tr as deleteFeedItemComment,gt as getAllLASFileData,Lt as getAnnotationComments,Kt as getAnnotations,Dt as getAppHelpContent,jt as getAppMedia,lr as getAppPackages,Or as getAppSettingsTemplate,xr as getAppSettingsTemplates,z as getAppStorage,A as getAsset,I as getAssets,ut as getCompanies,lt as getCompanyGoals,at as getCompetitorAnalysisData,m as getCurrentUser,Gt as getDashboardLastAnnotations,H as getDataAppStorage,Q as getDataAppStorageAggregate,J as getDrilloutUnit,F as getDrilloutUnits,it as getFavorites,Vt as getFileDownloadLink,dr as getFracFleetWells,C as getFracFleets,bt as getLASFileDataByPage,wt as getLASFileList,_t as getLASMetadata,yr as getPadWells,N as getPads,st as getPicklist,P as getPrograms,U as getResolvedAssets,k as getRig,O as getRigs,ir as getS3SignedUrl,kt as getStreams,_r as getTask,hr as getUserAuthSchemas,sr as getUserAutocomplete,Ur as getUserSetting,Dr as getUsers,b as getWell,w as getWells,Nr as logout,Ot as mapAssetByIdGetRequest,xt as mapAssetGetRequest,St as patchAnnotation,jr as patchAppSettingsTemplate,ar as patchFeedItem,Wt as patchFeedItemComment,qt as postAnnotation,Bt as postAnnotationComment,Pr as postAppSettingsTemplate,tt as postAppStorage,nt as postDataAppStorage,Yt as postFeedItemComment,gr as postTask,W as putAppStorage,Y as putDataAppStorage,Ir as setCurrentUserSettings,Ar as shareAppSettingsTemplate,nr as toggleFeedItemLike,Ut as updateAppHelpContent,At as updateAppMedia,Tt as uploadAppHelpContent,$t as uploadAppMedia};
|
|
1
|
+
import t from"@babel/runtime/helpers/defineProperty";import{range as r,flattenDepth as n}from"lodash";import e from"@babel/runtime/regenerator";import a from"@babel/runtime/helpers/asyncToGenerator";import{stringify as c}from"query-string";import{APIException as u,baseUrl as p,get as s,post as o,del as i,put as f,sendFormData as l,patch as h}from"../api/apiCore.js";import{CORVA_API_URLS as v}from"../constants.js";function d(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);r&&(e=e.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),n.push.apply(n,e)}return n}function m(r){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?d(Object(e),!0).forEach((function(n){t(r,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):d(Object(e)).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))}))}return r}function y(){return w.apply(this,arguments)}function w(){return(w=a(e.mark((function t(){var r,n;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch("".concat(p,"/v1/users/current"),{credentials:"include"});case 2:return r=t.sent,t.next=5,r.json();case 5:if(n=t.sent,null!=r&&r.ok){t.next=8;break}throw new u(r,n);case 8:return t.abrupt("return",n);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function _(t){return b.apply(this,arguments)}function b(){return(b=a(e.mark((function t(r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v2/wells",r));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function g(t){return k.apply(this,arguments)}function k(){return(k=a(e.mark((function t(r){var n,a=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",s("/v2/wells/".concat(r),n));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function x(t){return O.apply(this,arguments)}function O(){return(O=a(e.mark((function t(r){var n,a=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",s("/v2/rigs/".concat(r),n));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function j(){return P.apply(this,arguments)}function P(){return(P=a(e.mark((function t(){var r,n=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.length>0&&void 0!==n[0]?n[0]:{},t.abrupt("return",s("/v2/rigs",r));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function $(){return A.apply(this,arguments)}function A(){return(A=a(e.mark((function t(){var r,n=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.length>0&&void 0!==n[0]?n[0]:{},t.abrupt("return",s("/v2/programs",r));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function D(t){return I.apply(this,arguments)}function I(){return(I=a(e.mark((function t(r){var n,a=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",s("/v2/assets/".concat(r),n));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function T(){return U.apply(this,arguments)}function U(){return(U=a(e.mark((function t(){var r,n=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.length>0&&void 0!==n[0]?n[0]:{},t.abrupt("return",s("/v2/assets",r));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function q(){return N.apply(this,arguments)}function N(){return(N=a(e.mark((function t(){var r,n=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.length>0&&void 0!==n[0]?n[0]:{},t.abrupt("return",o("/v2/assets/resolve",r));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function S(){return C.apply(this,arguments)}function C(){return(C=a(e.mark((function t(){var r,n=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.length>0&&void 0!==n[0]?n[0]:{},t.abrupt("return",s("/v2/pads",r));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function E(){return J.apply(this,arguments)}function J(){return(J=a(e.mark((function t(){var r,n=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.length>0&&void 0!==n[0]?n[0]:{},t.abrupt("return",s("/v2/frac_fleets",r));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function K(t){return F.apply(this,arguments)}function F(){return(F=a(e.mark((function t(r){var n,a=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",s("/v2/drillout_units/".concat(r),n));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function G(){return M.apply(this,arguments)}function M(){return(M=a(e.mark((function t(){var r,n=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.length>0&&void 0!==n[0]?n[0]:{},t.abrupt("return",s("/v2/drillout_units",r));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function R(t,r,n){return z.apply(this,arguments)}function z(){return(z=a(e.mark((function t(r,n,a){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i("/v1/data/".concat(r,"/").concat(n),a));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function B(t,r,n){return H.apply(this,arguments)}function H(){return(H=a(e.mark((function t(r,n,a){var c,u=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=u.length>3&&void 0!==u[3]?u[3]:{},t.abrupt("return",s("/v1/data/".concat(r,"/").concat(n),m(m({},c),{},{asset_id:a}),{appKey:c.appKey}));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function L(t,r){return Q.apply(this,arguments)}function Q(){return(Q=a(e.mark((function t(r,n){var a,c=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=c.length>2&&void 0!==c[2]?c[2]:{},t.abrupt("return",s("/api/v1/data/".concat(r,"/").concat(n,"/"),a,{apiUrl:v.DATA_API}));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function V(t,r){return W.apply(this,arguments)}function W(){return(W=a(e.mark((function t(r,n){var a,c=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=c.length>2&&void 0!==c[2]?c[2]:{},t.abrupt("return",s("/api/v1/data/".concat(r,"/").concat(n,"/aggregate/"),a,{apiUrl:v.DATA_API}));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function X(t,r,n,e){return Y.apply(this,arguments)}function Y(){return(Y=a(e.mark((function t(r,n,a,c){var u,p=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u=p.length>4&&void 0!==p[4]?p[4]:{},t.abrupt("return",f("/v1/data/".concat(r,"/").concat(n,"/").concat(a),c,u));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Z(t,r,n,e,a){return tt.apply(this,arguments)}function tt(){return(tt=a(e.mark((function t(r,n,a,c,u){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",f("/api/v1/data/".concat(r,"/").concat(n,"/").concat(a),c,u,{apiUrl:v.DATA_API}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function rt(t,r,n){return nt.apply(this,arguments)}function nt(){return(nt=a(e.mark((function t(r,n,a){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o("/v1/data/".concat(r,"/").concat(n),a));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function et(t,r,n){return at.apply(this,arguments)}function at(){return(at=a(e.mark((function t(r,n,a){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o("/api/v1/data/".concat(r,"/").concat(n),a,{apiUrl:v.DATA_API}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ct(t){return ut.apply(this,arguments)}function ut(){return(ut=a(e.mark((function t(r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v1/competitor_analysis",r));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function pt(){return st.apply(this,arguments)}function st(){return(st=a(e.mark((function t(){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v1/companies"));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ot(t){return it.apply(this,arguments)}function it(){return(it=a(e.mark((function t(r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v2/picklists/".concat(r)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ft(){return lt.apply(this,arguments)}function lt(){return(lt=a(e.mark((function t(){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v2/favorites"));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ht(t){return vt.apply(this,arguments)}function vt(){return(vt=a(e.mark((function t(r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v1/companies/".concat(r,"/settings/company_goals")));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var dt,mt,yt,wt,_t=(dt=a(e.mark((function t(r){var n,a,c,u;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n={asset_id:+r},a={_id:"$file",name:{$first:"$file"},timestamp:{$first:"$timestamp"}},c={timestamp:-1},u={aggregate:JSON.stringify([{$match:n},{$group:a},{$sort:c}])},t.prev=4,t.next=7,B("corva","formation-evaluation.metadata",r,u);case 7:return t.abrupt("return",t.sent);case 10:return t.prev=10,t.t0=t.catch(4),console.error(t.t0),t.abrupt("return",[]);case 14:case"end":return t.stop()}}),t,null,[[4,10]])}))),function(t){return dt.apply(this,arguments)}),bt=(mt=a(e.mark((function t(r,n){var a;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a="{asset_id#eq#".concat(r,"}AND{file#eq#'").concat(n,"'}"),t.prev=1,t.next=4,B("corva","formation-evaluation.metadata",r,{query:a});case 4:return t.abrupt("return",t.sent);case 7:return t.prev=7,t.t0=t.catch(1),console.error(t.t0),t.abrupt("return",[]);case 11:case"end":return t.stop()}}),t,null,[[1,7]])}))),function(t,r){return mt.apply(this,arguments)}),gt=(yt=a(e.mark((function t(r,n,a){var c,u,p,s,o,i;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c={asset_id:+r,"metadata.file":n},u=1e4*a,p={"data.md":1},s={data:"$data"},o={aggregate:JSON.stringify([{$match:c},{$sort:p},{$skip:u},{$limit:1e4},{$project:s}])},t.prev=6,t.next=9,B("corva","formation-evaluation.data",r,o);case 9:return i=t.sent,t.abrupt("return",i);case 13:return t.prev=13,t.t0=t.catch(6),console.error(t.t0),t.abrupt("return",[]);case 17:case"end":return t.stop()}}),t,null,[[6,13]])}))),function(t,r,n){return yt.apply(this,arguments)}),kt=(wt=a(e.mark((function t(a){var c,u,p,s,o;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=a.assetId,u=a.fileName,p=a.recordsCount,s=Math.ceil(p/1e4),o=r(s).map((function(t){return gt(c,u,t)})),t.abrupt("return",Promise.all(o).then((function(t){return n(t)})));case 4:case"end":return t.stop()}}),t)}))),function(t){return wt.apply(this,arguments)}),xt=function(t){var r=t.assetId,n=t.segment,e=void 0===n?"drilling":n;return s("/v1/app_streams?asset_id=".concat(r,"&segment=").concat(e))};function Ot(t){switch(t){case"program":return $;case"rig":return j;case"well":return _;case"frac_fleet":return E;case"drillout_unit":return G;case"pad":return S;default:return T}}function jt(t){switch(t){case"rig":return x;case"well":return g;default:return D}}var Pt=function(t,r){return s("/v2/apps/".concat(t,"/app_media"),r)},$t=function(t,r){return i("/v2/apps/".concat(t,"/app_media/").concat(r),null)},At=function(t,r){var n=r.file,e=r.mediaType;return l("/v2/apps/".concat(t,"/app_media"),{"app_media[media_type]":e,"app_media[file]":n})},Dt=function(t,r,n){return h("/v2/apps/".concat(t,"/app_media/").concat(r),{app_media:n})},It=function(t,r){return s("/v2/apps/".concat(t,"/app_help_contents"),r)},Tt=function(t,r){return i("/v2/apps/".concat(t,"/app_help_contents/").concat(r),null)},Ut=function(t,r){var n=r.title,e=r.description,a=r.url;return l("/v2/apps/".concat(t,"/app_help_contents"),{"app_help_content[title]":n,"app_help_content[description]":e,"app_help_content[url]":a})},qt=function(t,r,n){var e=n.title,a=n.description,c=n.url,u=n.position;return h("/v2/apps/".concat(t,"/app_help_contents/").concat(r),{app_help_content:{title:e,description:a,url:c,position:u}})};function Nt(t){return St.apply(this,arguments)}function St(){return(St=a(e.mark((function t(r){var n,a=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",o("/v2/dashboard_app_annotations",m({app_annotation:r},n)));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Ct(t,r){return Et.apply(this,arguments)}function Et(){return(Et=a(e.mark((function t(r,n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",h("/v2/dashboard_app_annotations/".concat(r),{app_annotation:n}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Jt(t){return Kt.apply(this,arguments)}function Kt(){return(Kt=a(e.mark((function t(r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i("/v2/dashboard_app_annotations/".concat(r)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Ft(t,r){return Gt.apply(this,arguments)}function Gt(){return(Gt=a(e.mark((function t(r,n){var a,c=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=c.length>2&&void 0!==c[2]?c[2]:{},t.abrupt("return",s("/v2/dashboard_app_annotations",m({app_id:r,asset_id:n},a)));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Mt(t,r,n){return Rt.apply(this,arguments)}function Rt(){return(Rt=a(e.mark((function t(r,n,a){var c;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c={dashboard_id:r},n&&(c.asset_id=n),a&&(c.parent_asset_id=a),t.abrupt("return",s("/v2/dashboard_app_annotations/last_annotations",c));case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function zt(t){return Bt.apply(this,arguments)}function Bt(){return(Bt=a(e.mark((function t(r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",h("/v2/dashboard_app_annotations/".concat(r,"/close")));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Ht(t,r){return Lt.apply(this,arguments)}function Lt(){return(Lt=a(e.mark((function t(r,n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o("/v2/dashboard_app_annotations/".concat(r,"/comments/"),n));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Qt(t){return Vt.apply(this,arguments)}function Vt(){return(Vt=a(e.mark((function t(r){var n,a=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",s("/v2/dashboard_app_annotations/".concat(r,"/comments/"),n));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Wt(t){return"".concat(p,"/v1/file/download?file_name=").concat(t)}function Xt(t,r,n){return Yt.apply(this,arguments)}function Yt(){return(Yt=a(e.mark((function t(r,n,a){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",h("/v1/activities/".concat(r,"/comments/").concat(n),a));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Zt(t,r){return tr.apply(this,arguments)}function tr(){return(tr=a(e.mark((function t(r,n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o("/v1/activities/".concat(r,"/comments"),n));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function rr(t,r){return nr.apply(this,arguments)}function nr(){return(nr=a(e.mark((function t(r,n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i("/v1/activities/".concat(r,"/comments/").concat(n)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function er(t){return ar.apply(this,arguments)}function ar(){return(ar=a(e.mark((function t(r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o("/v1/activities/".concat(r,"/likes/toggle")));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function cr(t,r){return ur.apply(this,arguments)}function ur(){return(ur=a(e.mark((function t(r,n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",h("/v1/activities/".concat(r),n));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function pr(t){return sr.apply(this,arguments)}function sr(){return(sr=a(e.mark((function t(r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i("/v1/activities/".concat(r)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function or(t,r,n){return ir.apply(this,arguments)}function ir(){return(ir=a(e.mark((function t(r,n,a){var c;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c={type:r},n&&(c.search=n),a&&(c.company_id=a),t.abrupt("return",s("/v1/users/autocomplete",c));case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function fr(t,r){return lr.apply(this,arguments)}function lr(){return(lr=a(e.mark((function t(r,n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v1/file/sign?file_name=".concat(encodeURIComponent(r),"&contentType=").concat(n)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var hr=function(t,r){return s("/v2/apps/".concat(t,"/packages"),r)};function vr(t){return dr.apply(this,arguments)}function dr(){return(dr=a(e.mark((function t(r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v1/sessions/schemas",{email:r,with_provider:!0}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function mr(t){return yr.apply(this,arguments)}function yr(){return(yr=a(e.mark((function t(r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v2/frac_fleets/wells",r));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function wr(t,r){return _r.apply(this,arguments)}function _r(){return(_r=a(e.mark((function t(r,n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v2/pads/".concat(r,"/app_wells"),n));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function br(t){return gr.apply(this,arguments)}function gr(){return(gr=a(e.mark((function t(r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v2/tasks/".concat(r),{}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function kr(){return xr.apply(this,arguments)}function xr(){return(xr=a(e.mark((function t(){var r,n=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.length>0&&void 0!==n[0]?n[0]:{},t.abrupt("return",o("/v2/tasks",r));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Or=function(t){return s("/v2/apps/".concat(t,"/app_settings_templates"),{})},jr=function(t,r){return s("/v2/apps/".concat(t,"/app_settings_templates/").concat(r),{})},Pr=function(t,r,n){var e=n.name,a=n.settings;return h("/v2/apps/".concat(t,"/app_settings_templates/").concat(r),{app_settings_template:{name:e,settings:a}},{})},$r=function(t,r){var n=r.name,e=r.settings;return o("/v2/apps/".concat(t,"/app_settings_templates"),{app_settings_template:{name:n,settings:e}})},Ar=function(t,r){return i("/v2/apps/".concat(t,"/app_settings_templates/").concat(r),{})},Dr=function(t,r,n){var e=c({user_id:n},{arrayFormat:"bracket"});return o("/v2/apps/".concat(t,"/app_settings_templates/").concat(r,"/share?").concat(e),{})},Ir=function(t){var r=t.page,n=t.perPage,e=void 0===n?1e3:n,a=t.sort,c=t.order,u=t.search,p=t.companyId,o=t.ids;return s("/v1/users",{page:r,per_page:e,sort:a,order:c,ids:o,search:""!==u?u:void 0,company_id:null!==p?p:void 0})};function Tr(t,r){return Ur.apply(this,arguments)}function Ur(){return(Ur=a(e.mark((function t(r,n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o("/v1/users/".concat(r,"/settings"),n));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function qr(t,r){return Nr.apply(this,arguments)}function Nr(){return(Nr=a(e.mark((function t(r,n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v1/users/".concat(r,"/settings/").concat(n)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Sr(){return Cr.apply(this,arguments)}function Cr(){return(Cr=a(e.mark((function t(){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o("/v1/logout"));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}export{zt as closeLastAnnotation,Jt as deleteAnnotation,Tt as deleteAppHelpContent,$t as deleteAppMedia,Ar as deleteAppSettingsTemplate,R as deleteAppStorageRecords,pr as deleteFeedItem,rr as deleteFeedItemComment,kt as getAllLASFileData,Qt as getAnnotationComments,Ft as getAnnotations,It as getAppHelpContent,Pt as getAppMedia,hr as getAppPackages,jr as getAppSettingsTemplate,Or as getAppSettingsTemplates,B as getAppStorage,D as getAsset,T as getAssets,pt as getCompanies,ht as getCompanyGoals,ct as getCompetitorAnalysisData,y as getCurrentUser,Mt as getDashboardLastAnnotations,L as getDataAppStorage,V as getDataAppStorageAggregate,K as getDrilloutUnit,G as getDrilloutUnits,ft as getFavorites,Wt as getFileDownloadLink,mr as getFracFleetWells,E as getFracFleets,gt as getLASFileDataByPage,_t as getLASFileList,bt as getLASMetadata,wr as getPadWells,S as getPads,ot as getPicklist,$ as getPrograms,q as getResolvedAssets,x as getRig,j as getRigs,fr as getS3SignedUrl,xt as getStreams,br as getTask,vr as getUserAuthSchemas,or as getUserAutocomplete,qr as getUserSetting,Ir as getUsers,g as getWell,_ as getWells,Sr as logout,jt as mapAssetByIdGetRequest,Ot as mapAssetGetRequest,Ct as patchAnnotation,Pr as patchAppSettingsTemplate,cr as patchFeedItem,Xt as patchFeedItemComment,Nt as postAnnotation,Ht as postAnnotationComment,$r as postAppSettingsTemplate,rt as postAppStorage,et as postDataAppStorage,Zt as postFeedItemComment,kr as postTask,X as putAppStorage,Z as putDataAppStorage,Tr as setCurrentUserSettings,Dr as shareAppSettingsTemplate,er as toggleFeedItemLike,qt as updateAppHelpContent,Dt as updateAppMedia,Ut as uploadAppHelpContent,At as uploadAppMedia};
|