@airporting/tech-app 0.0.63 → 0.0.65
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.
- package/dist/mf/5772.js +10 -0
- package/dist/mf/5772.js.LICENSE.txt +9 -0
- package/dist/mf/7906.js +1 -0
- package/dist/mf/9660.js +1 -1
- package/dist/mf/9669.js +1 -1
- package/dist/mf/@mf-types/compiled-types/api/tech/sales/createLeadMutation.d.ts +15 -0
- package/dist/mf/@mf-types/compiled-types/api/tech/scrapersQuery.d.ts +1 -0
- package/dist/mf/@mf-types/compiled-types/apps/sales/NewLeadModal.d.ts +6 -0
- package/dist/mf/@mf-types/compiled-types/apps/scrapers/ScraperCard.d.ts +11 -0
- package/dist/mf/@mf-types/compiled-types/apps/scrapers/ScraperDetailDrawer.d.ts +7 -0
- package/dist/mf/@mf-types/compiled-types/apps/scrapers/types.d.ts +2 -0
- package/dist/mf/@mf-types/compiled-types/apps/scrapers.app.d.ts +1 -0
- package/dist/mf/@mf-types/compiled-types/gen/TechApi/index.d.ts +99 -0
- package/dist/mf/@mf-types/compiled-types/tabs/scrapers.d.ts +2 -0
- package/dist/mf/@mf-types/scrapers.d.ts +2 -0
- package/dist/mf/@mf-types.d.ts +2 -2
- package/dist/mf/@mf-types.zip +0 -0
- package/dist/mf/__federation_expose_dashboard.js +1 -1
- package/dist/mf/__federation_expose_finance_jobs.js +1 -1
- package/dist/mf/__federation_expose_sales.js +1 -1
- package/dist/mf/__federation_expose_scrapers.js +1 -0
- package/dist/mf/__federation_expose_spreadsheet.js +1 -1
- package/dist/mf/index.js +3 -3
- package/dist/mf/mf-manifest.json +69 -3
- package/dist/mf/mf-stats.json +100 -13
- package/dist/mf/tech_app.js +3 -3
- package/package.json +1 -1
package/dist/mf/5772.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/*! For license information please see 5772.js.LICENSE.txt */
|
|
2
|
+
"use strict";(globalThis["chunk_tech_app"]=globalThis["chunk_tech_app"]||[]).push([["5772"],{631:function(__unused_webpack_module,exports){/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react-jsx-runtime.production.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/var REACT_ELEMENT_TYPE=Symbol.for("react.transitional.element"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment");function jsxProd(type,config,maybeKey){var key=null;void 0!==maybeKey&&(key=""+maybeKey);void 0!==config.key&&(key=""+config.key);if("key"in config){maybeKey={};for(var propName in config)"key"!==propName&&(maybeKey[propName]=config[propName])}else maybeKey=config;config=maybeKey.ref;return{$$typeof:REACT_ELEMENT_TYPE,type:type,key:key,ref:void 0!==config?config:null,props:maybeKey}}exports.Fragment=REACT_FRAGMENT_TYPE;exports.jsx=jsxProd;exports.jsxs=jsxProd},5893:function(module,__unused_webpack_exports,__webpack_require__){module.exports=__webpack_require__(631)}}]);
|
package/dist/mf/7906.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis["chunk_tech_app"]=globalThis["chunk_tech_app"]||[]).push([["7906"],{4063:function(module){module.exports=function equal(a,b){if(a===b)return true;if(a&&b&&"object"==typeof a&&"object"==typeof b){if(a.constructor!==b.constructor)return false;var length,i,keys;if(Array.isArray(a)){length=a.length;if(length!=b.length)return false;for(i=length;0!==i--;)if(!equal(a[i],b[i]))return false;return true}if(a.constructor===RegExp)return a.source===b.source&&a.flags===b.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===b.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===b.toString();keys=Object.keys(a);length=keys.length;if(length!==Object.keys(b).length)return false;for(i=length;0!==i--;)if(!Object.prototype.hasOwnProperty.call(b,keys[i]))return false;for(i=length;0!==i--;){var key=keys[i];if(!equal(a[key],b[key]))return false}return true}return a!==a&&b!==b}},6845:function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{hasLength:()=>hasLength,isNotEmptyHTML:()=>isNotEmptyHTML,createFormContext:()=>createFormContext,FORM_INDEX:()=>FORM_INDEX,formRootRule:()=>formRootRule,createFormActions:()=>createFormActions,superstructResolver:()=>superstructResolver,isEmail:()=>isEmail,useForm:()=>useForm,isJSONString:()=>isJSONString,Form:()=>Form,isInRange:()=>isInRange,useField:()=>useField,zodResolver:()=>zodResolver,matchesField:()=>matchesField,joiResolver:()=>joiResolver,matches:()=>matches,isNotEmpty:()=>isNotEmpty,yupResolver:()=>yupResolver});var index_js_=__webpack_require__(3106);"use client";function dispatchEvent(type,detail){window.dispatchEvent(new CustomEvent(type,{detail}))}function validateFormName(name){if(!/^[0-9a-zA-Z-]+$/.test(name))throw new Error(`[@mantine/use-form] Form name "${name}" is invalid, it should contain only letters, numbers and dashes`)}const useIsomorphicEffect="undefined"!=typeof window?index_js_.useLayoutEffect:index_js_.useEffect;function createFormActions(name){validateFormName(name);const setFieldValue=(path,value)=>dispatchEvent(`mantine-form:${name}:set-field-value`,{path,value});const setValues=values=>dispatchEvent(`mantine-form:${name}:set-values`,values);const setInitialValues=values=>dispatchEvent(`mantine-form:${name}:set-initial-values`,values);const setErrors=errors=>dispatchEvent(`mantine-form:${name}:set-errors`,errors);const setFieldError=(path,error)=>dispatchEvent(`mantine-form:${name}:set-field-error`,{path,error});const clearFieldError=path=>dispatchEvent(`mantine-form:${name}:clear-field-error`,path);const clearErrors=()=>dispatchEvent(`mantine-form:${name}:clear-errors`);const reset=()=>dispatchEvent(`mantine-form:${name}:reset`);const validate=()=>dispatchEvent(`mantine-form:${name}:validate`);const validateField=path=>dispatchEvent(`mantine-form:${name}:validate-field`,path);const reorderListItem=(path,payload)=>dispatchEvent(`mantine-form:${name}:reorder-list-item`,{path,payload});const removeListItem=(path,index)=>dispatchEvent(`mantine-form:${name}:remove-list-item`,{path,index});const insertListItem=(path,item,index)=>dispatchEvent(`mantine-form:${name}:insert-list-item`,{path,index,item});const setDirty=value=>dispatchEvent(`mantine-form:${name}:set-dirty`,value);const setTouched=value=>dispatchEvent(`mantine-form:${name}:set-touched`,value);const resetDirty=values=>dispatchEvent(`mantine-form:${name}:reset-dirty`,values);const resetTouched=()=>dispatchEvent(`mantine-form:${name}:reset-touched`);return{setFieldValue,setValues,setInitialValues,setErrors,setFieldError,clearFieldError,clearErrors,reset,validate,validateField,reorderListItem,removeListItem,insertListItem,setDirty,setTouched,resetDirty,resetTouched}}function useFormEvent(eventKey,handler){useIsomorphicEffect(()=>{if(eventKey){window.addEventListener(eventKey,handler);return()=>window.removeEventListener(eventKey,handler)}},[eventKey])}function useFormActions(name,form){if(name)validateFormName(name);useFormEvent(`mantine-form:${name}:set-field-value`,event=>form.setFieldValue(event.detail.path,event.detail.value));useFormEvent(`mantine-form:${name}:set-values`,event=>form.setValues(event.detail));useFormEvent(`mantine-form:${name}:set-initial-values`,event=>form.setInitialValues(event.detail));useFormEvent(`mantine-form:${name}:set-errors`,event=>form.setErrors(event.detail));useFormEvent(`mantine-form:${name}:set-field-error`,event=>form.setFieldError(event.detail.path,event.detail.error));useFormEvent(`mantine-form:${name}:clear-field-error`,event=>form.clearFieldError(event.detail));useFormEvent(`mantine-form:${name}:clear-errors`,form.clearErrors);useFormEvent(`mantine-form:${name}:reset`,form.reset);useFormEvent(`mantine-form:${name}:validate`,form.validate);useFormEvent(`mantine-form:${name}:validate-field`,event=>form.validateField(event.detail));useFormEvent(`mantine-form:${name}:reorder-list-item`,event=>form.reorderListItem(event.detail.path,event.detail.payload));useFormEvent(`mantine-form:${name}:remove-list-item`,event=>form.removeListItem(event.detail.path,event.detail.index));useFormEvent(`mantine-form:${name}:insert-list-item`,event=>form.insertListItem(event.detail.path,event.detail.item,event.detail.index));useFormEvent(`mantine-form:${name}:set-dirty`,event=>form.setDirty(event.detail));useFormEvent(`mantine-form:${name}:set-touched`,event=>form.setTouched(event.detail));useFormEvent(`mantine-form:${name}:reset-dirty`,event=>form.resetDirty(event.detail));useFormEvent(`mantine-form:${name}:reset-touched`,form.resetTouched)}"use client";function getInputOnChange(setValue){return val=>{if(val)if("function"==typeof val)setValue(val);else if("object"==typeof val&&"nativeEvent"in val){const{currentTarget}=val;if(currentTarget instanceof HTMLInputElement)"checkbox"===currentTarget.type?setValue(currentTarget.checked):setValue(currentTarget.value);else if(currentTarget instanceof HTMLTextAreaElement||currentTarget instanceof HTMLSelectElement)setValue(currentTarget.value)}else setValue(val);else setValue(val)}}"use client";function filterErrors(errors){if(null===errors||"object"!=typeof errors)return{};return Object.keys(errors).reduce((acc,key)=>{const errorValue=errors[key];if(null!=errorValue&&false!==errorValue)acc[key]=errorValue;return acc},{})}"use client";function useFormErrors(initialErrors){const[errorsState,setErrorsState]=(0,index_js_.useState)(filterErrors(initialErrors));const errorsRef=(0,index_js_.useRef)(errorsState);const setErrors=(0,index_js_.useCallback)(errors=>{setErrorsState(current=>{const newErrors=filterErrors("function"==typeof errors?errors(current):errors);errorsRef.current=newErrors;return newErrors})},[]);const clearErrors=(0,index_js_.useCallback)(()=>setErrors({}),[]);const clearFieldError=(0,index_js_.useCallback)(path=>{if(void 0===errorsRef.current[path])return;setErrors(current=>{const errors={...current};delete errors[path];return errors})},[errorsState]);const setFieldError=(0,index_js_.useCallback)((path,error)=>{if(null==error||false===error)clearFieldError(path);else if(errorsRef.current[path]!==error)setErrors(current=>({...current,[path]:error}))},[errorsState]);return{errorsState,setErrors,clearErrors,setFieldError,clearFieldError}}"use client";function clearListState(field,state){if(null===state||"object"!=typeof state)return{};const clone={...state};Object.keys(state).forEach(errorKey=>{if(errorKey.includes(`${String(field)}.`))delete clone[errorKey]});return clone}"use client";function getIndexFromKeyAfterPath(key,path){const split=key.substring(path.length+1).split(".")[0];return parseInt(split,10)}function changeErrorIndices(path,index,errors,change){if(void 0===index)return errors;const pathString=`${String(path)}`;let clearedErrors=errors;if(-1===change)clearedErrors=clearListState(`${pathString}.${index}`,clearedErrors);const cloned={...clearedErrors};const changedKeys=/* @__PURE__ */new Set;Object.entries(clearedErrors).filter(([key])=>{if(!key.startsWith(`${pathString}.`))return false;const currIndex=getIndexFromKeyAfterPath(key,pathString);if(Number.isNaN(currIndex))return false;return currIndex>=index}).forEach(([key,value])=>{const currIndex=getIndexFromKeyAfterPath(key,pathString);const newKey=key.replace(`${pathString}.${currIndex}`,`${pathString}.${currIndex+change}`);cloned[newKey]=value;changedKeys.add(newKey);if(!changedKeys.has(key))delete cloned[key]});return cloned}"use client";function reorderErrors(path,{from,to},errors){const oldKeyStart=`${path}.${from}`;const newKeyStart=`${path}.${to}`;const clone={...errors};const processedKeys=/* @__PURE__ */new Set;Object.keys(errors).forEach(key=>{if(processedKeys.has(key))return;let oldKey;let newKey;if(key.startsWith(oldKeyStart)){oldKey=key;newKey=key.replace(oldKeyStart,newKeyStart)}else if(key.startsWith(newKeyStart)){oldKey=key.replace(newKeyStart,oldKeyStart);newKey=key}if(oldKey&&newKey){const value1=clone[oldKey];const value2=clone[newKey];void 0===value2?delete clone[oldKey]:clone[oldKey]=value2;void 0===value1?delete clone[newKey]:clone[newKey]=value1;processedKeys.add(oldKey);processedKeys.add(newKey)}});return clone}"use client";function getSplittedPath(path){if("string"!=typeof path)return[];return path.split(".")}"use client";function getPath(path,values){const splittedPath=getSplittedPath(path);if(0===splittedPath.length||"object"!=typeof values||null===values)return;let value=values[splittedPath[0]];for(let i=1;i<splittedPath.length;i+=1){if(null==value)break;value=value[splittedPath[i]]}return value}function set(obj,key,val){if("object"==typeof val.value)val.value=klona(val.value);if(val.enumerable&&!val.get&&!val.set&&val.configurable&&val.writable&&"__proto__"!==key)obj[key]=val.value;else Object.defineProperty(obj,key,val)}function klona(x){if("object"!=typeof x)return x;var i=0,k,list,tmp,str=Object.prototype.toString.call(x);if("[object Object]"===str)tmp=Object.create(x.__proto__||null);else if("[object Array]"===str)tmp=Array(x.length);else if("[object Set]"===str){tmp=new Set;x.forEach(function(val){tmp.add(klona(val))})}else if("[object Map]"===str){tmp=new Map;x.forEach(function(val,key){tmp.set(klona(key),klona(val))})}else if("[object Date]"===str)tmp=new Date(+x);else if("[object RegExp]"===str)tmp=new RegExp(x.source,x.flags);else if("[object DataView]"===str)tmp=new x.constructor(klona(x.buffer));else if("[object ArrayBuffer]"===str)tmp=x.slice(0);else if("Array]"===str.slice(-6))tmp=new x.constructor(x);if(tmp){for(list=Object.getOwnPropertySymbols(x);i<list.length;i++)set(tmp,list[i],Object.getOwnPropertyDescriptor(x,list[i]));for(i=0,list=Object.getOwnPropertyNames(x);i<list.length;i++)if(!Object.hasOwnProperty.call(tmp,k=list[i])||tmp[k]!==x[k])set(tmp,k,Object.getOwnPropertyDescriptor(x,k))}return tmp||x}"use client";function setPath(path,value,values){const splittedPath=getSplittedPath(path);if(0===splittedPath.length)return values;const cloned=klona(values);if(1===splittedPath.length){cloned[splittedPath[0]]=value;return cloned}let val=cloned[splittedPath[0]];for(let i=1;i<splittedPath.length-1;i+=1){if(void 0===val)return cloned;val=val[splittedPath[i]]}val[splittedPath[splittedPath.length-1]]=value;return cloned}"use client";function reorderPath(path,{from,to},values){const currentValue=getPath(path,values);if(!Array.isArray(currentValue))return values;const cloned=[...currentValue];const item=currentValue[from];cloned.splice(from,1);cloned.splice(to,0,item);return setPath(path,cloned,values)}"use client";function insertPath(path,value,index,values){const currentValue=getPath(path,values);if(!Array.isArray(currentValue))return values;const cloned=[...currentValue];cloned.splice("number"==typeof index?index:cloned.length,0,value);return setPath(path,cloned,values)}"use client";function removePath(path,index,values){const currentValue=getPath(path,values);if(!Array.isArray(currentValue))return values;return setPath(path,currentValue.filter((_,itemIndex)=>itemIndex!==index),values)}"use client";function replacePath(path,item,index,values){const currentValue=getPath(path,values);if(!Array.isArray(currentValue))return values;if(currentValue.length<=index)return values;const cloned=[...currentValue];cloned[index]=item;return setPath(path,cloned,values)}"use client";function useFormList({$values,$errors,$status}){const reorderListItem=(0,index_js_.useCallback)((path,payload)=>{$status.clearFieldDirty(path);$errors.setErrors(errs=>reorderErrors(path,payload,errs));$values.setValues({values:reorderPath(path,payload,$values.refValues.current),updateState:true})},[]);const removeListItem=(0,index_js_.useCallback)((path,index)=>{$status.clearFieldDirty(path);$errors.setErrors(errs=>changeErrorIndices(path,index,errs,-1));$values.setValues({values:removePath(path,index,$values.refValues.current),updateState:true})},[]);const insertListItem=(0,index_js_.useCallback)((path,item,index)=>{$status.clearFieldDirty(path);$errors.setErrors(errs=>changeErrorIndices(path,index,errs,1));$values.setValues({values:insertPath(path,item,index,$values.refValues.current),updateState:true})},[]);const replaceListItem=(0,index_js_.useCallback)((path,index,item)=>{$status.clearFieldDirty(path);$values.setValues({values:replacePath(path,item,index,$values.refValues.current),updateState:true})},[]);return{reorderListItem,removeListItem,insertListItem,replaceListItem}}var fast_deep_equal=__webpack_require__(4063);"use client";function getStatus(status,path){const paths=Object.keys(status);if("string"==typeof path){const nestedPaths=paths.filter(statusPath=>statusPath.startsWith(`${path}.`));return status[path]||nestedPaths.some(statusPath=>status[statusPath])||false}return paths.some(statusPath=>status[statusPath])}"use client";function useFormStatus({initialDirty,initialTouched,mode,$values}){const[touchedState,setTouchedState]=(0,index_js_.useState)(initialTouched);const[dirtyState,setDirtyState]=(0,index_js_.useState)(initialDirty);const touchedRef=(0,index_js_.useRef)(initialTouched);const dirtyRef=(0,index_js_.useRef)(initialDirty);const setTouched=(0,index_js_.useCallback)(values=>{const resolvedValues="function"==typeof values?values(touchedRef.current):values;touchedRef.current=resolvedValues;if("controlled"===mode)setTouchedState(resolvedValues)},[]);const setDirty=(0,index_js_.useCallback)((values,forceUpdate=false)=>{const resolvedValues="function"==typeof values?values(dirtyRef.current):values;dirtyRef.current=resolvedValues;if("controlled"===mode||forceUpdate)setDirtyState(resolvedValues)},[]);const resetTouched=(0,index_js_.useCallback)(()=>setTouched({}),[]);const resetDirty=(0,index_js_.useCallback)(values=>{const newSnapshot=values?{...$values.refValues.current,...values}:$values.refValues.current;$values.setValuesSnapshot(newSnapshot);setDirty({})},[]);const setFieldTouched=(0,index_js_.useCallback)((path,touched)=>{setTouched(currentTouched=>{if(getStatus(currentTouched,path)===touched)return currentTouched;return{...currentTouched,[path]:touched}})},[]);const setFieldDirty=(0,index_js_.useCallback)((path,dirty,forceUpdate)=>{setDirty(currentDirty=>{if(getStatus(currentDirty,path)===dirty)return currentDirty;return{...currentDirty,[path]:dirty}},forceUpdate)},[]);const setCalculatedFieldDirty=(0,index_js_.useCallback)((path,value)=>{const currentDirty=getStatus(dirtyRef.current,path);const dirty=!fast_deep_equal(getPath(path,$values.getValuesSnapshot()),value);const clearedState=clearListState(path,dirtyRef.current);clearedState[path]=dirty;setDirty(clearedState,currentDirty!==dirty)},[]);const isTouched=(0,index_js_.useCallback)(path=>getStatus(touchedRef.current,path),[]);const clearFieldDirty=(0,index_js_.useCallback)(path=>setDirty(current=>{if("string"!=typeof path)return current;const result=clearListState(path,current);delete result[path];if(fast_deep_equal(result,current))return current;return result}),[]);const isDirty=(0,index_js_.useCallback)(path=>{if(path){const overriddenValue=getPath(path,dirtyRef.current);if("boolean"==typeof overriddenValue)return overriddenValue;const sliceOfValues=getPath(path,$values.refValues.current);const sliceOfInitialValues=getPath(path,$values.valuesSnapshot.current);return!fast_deep_equal(sliceOfValues,sliceOfInitialValues)}const isOverridden=Object.keys(dirtyRef.current).length>0;if(isOverridden)return getStatus(dirtyRef.current);return!fast_deep_equal($values.refValues.current,$values.valuesSnapshot.current)},[]);const getDirty=(0,index_js_.useCallback)(()=>dirtyRef.current,[]);const getTouched=(0,index_js_.useCallback)(()=>touchedRef.current,[]);return{touchedState,dirtyState,touchedRef,dirtyRef,setTouched,setDirty,resetDirty,resetTouched,isTouched,setFieldTouched,setFieldDirty,setTouchedState,setDirtyState,clearFieldDirty,isDirty,getDirty,getTouched,setCalculatedFieldDirty}}"use client";function useFormValues({initialValues,onValuesChange,mode}){const initialized=(0,index_js_.useRef)(false);const[stateValues,setStateValues]=(0,index_js_.useState)(initialValues||{});const refValues=(0,index_js_.useRef)(stateValues);const valuesSnapshot=(0,index_js_.useRef)(stateValues);const setValues=(0,index_js_.useCallback)(({values,subscribers,updateState=true,mergeWithPreviousValues=true})=>{const previousValues=refValues.current;const resolvedValues=values instanceof Function?values(refValues.current):values;const updatedValues=mergeWithPreviousValues?{...previousValues,...resolvedValues}:resolvedValues;refValues.current=updatedValues;if(updateState){setStateValues(updatedValues);if("uncontrolled"===mode)refValues.current=updatedValues}onValuesChange?.(updatedValues,previousValues);subscribers?.filter(Boolean).forEach(subscriber=>subscriber({updatedValues,previousValues}))},[onValuesChange]);const setFieldValue=(0,index_js_.useCallback)(payload=>{const currentValue=getPath(payload.path,refValues.current);const updatedValue=payload.value instanceof Function?payload.value(currentValue):payload.value;if(currentValue!==updatedValue){const previousValues=refValues.current;const updatedValues=setPath(payload.path,updatedValue,refValues.current);setValues({values:updatedValues,updateState:payload.updateState});payload.subscribers?.filter(Boolean).forEach(subscriber=>subscriber({path:payload.path,updatedValues,previousValues}))}},[setValues]);const setValuesSnapshot=(0,index_js_.useCallback)(payload=>{valuesSnapshot.current=payload},[]);const initialize=(0,index_js_.useCallback)((values,onInitialize)=>{if(!initialized.current){initialized.current=true;setValues({values,updateState:"controlled"===mode});setValuesSnapshot(values);onInitialize()}},[setValues]);const resetValues=(0,index_js_.useCallback)(()=>{setValues({values:valuesSnapshot.current,updateState:true,mergeWithPreviousValues:false})},[setValues]);const getValues=(0,index_js_.useCallback)(()=>refValues.current,[]);const getValuesSnapshot=(0,index_js_.useCallback)(()=>valuesSnapshot.current,[]);const resetField=(0,index_js_.useCallback)((path,subscribers)=>{const snapshotValue=getPath(path,valuesSnapshot.current);if(void 0===snapshotValue)return;setFieldValue({path,value:snapshotValue,updateState:"controlled"===mode,subscribers})},[setFieldValue,mode]);return{initialized,stateValues,refValues,valuesSnapshot,setValues,setFieldValue,resetValues,setValuesSnapshot,initialize,getValues,getValuesSnapshot,resetField}}"use client";function useFormWatch({$status,cascadeUpdates}){const subscribers=(0,index_js_.useRef)({});const watch=(0,index_js_.useCallback)((path,callback)=>{(0,index_js_.useEffect)(()=>{subscribers.current[path]=subscribers.current[path]||[];subscribers.current[path].push(callback);return()=>{subscribers.current[path]=subscribers.current[path].filter(cb=>cb!==callback)}},[callback])},[]);const getFieldSubscribers=(0,index_js_.useCallback)(path=>{const result=subscribers.current[path]?.map(callback=>input=>callback({previousValue:getPath(path,input.previousValues),value:getPath(path,input.updatedValues),touched:$status.isTouched(path),dirty:$status.isDirty(path)}))??[];if(cascadeUpdates){for(const subscriptionKey in subscribers.current)if(subscriptionKey.startsWith(`${path}.`)||path.startsWith(`${subscriptionKey}.`))result.push(...subscribers.current[subscriptionKey].map(cb=>input=>cb({previousValue:getPath(subscriptionKey,input.previousValues),value:getPath(subscriptionKey,input.updatedValues),touched:$status.isTouched(subscriptionKey),dirty:$status.isDirty(subscriptionKey)})))}return result},[]);return{subscribers,watch,getFieldSubscribers}}"use client";function getDataPath(formName,fieldPath){return formName?`${formName}-${fieldPath.toString()}`:fieldPath.toString()}"use client";const formRootRule=Symbol("root-rule");function getValidationResults(errors){const filteredErrors=filterErrors(errors);return{hasErrors:Object.keys(filteredErrors).length>0,errors:filteredErrors}}function validateRulesRecord(rules,values,path="",errors={}){if("object"!=typeof rules||null===rules)return errors;return Object.keys(rules).reduce((acc,ruleKey)=>{const rule=rules[ruleKey];const rulePath=`${""===path?"":`${path}.`}${ruleKey}`;const value=getPath(rulePath,values);let arrayValidation=false;if("function"==typeof rule)acc[rulePath]=rule(value,values,rulePath);if("object"==typeof rule&&Array.isArray(value)){arrayValidation=true;value.forEach((_item,index)=>validateRulesRecord(rule,values,`${rulePath}.${index}`,acc));if(formRootRule in rule)acc[rulePath]=rule[formRootRule](value,values,rulePath)}if("object"==typeof rule&&"object"==typeof value&&null!==value){if(!arrayValidation)validateRulesRecord(rule,values,rulePath,acc);if(formRootRule in rule)acc[rulePath]=rule[formRootRule](value,values,rulePath)}return acc},errors)}function validateValues(validate,values){if("function"==typeof validate)return getValidationResults(validate(values));return getValidationResults(validateRulesRecord(validate,values))}"use client";function validateFieldValue(path,rules,values){if("string"!=typeof path)return{hasError:false,error:null};const results=validateValues(rules,values);const pathInError=Object.keys(results.errors).find(errorKey=>path.split(".").every((pathPart,i)=>pathPart===errorKey.split(".")[i]));return{hasError:!!pathInError,error:pathInError?results.errors[pathInError]:null}}"use client";const FORM_INDEX="__MANTINE_FORM_INDEX__";"use client";function shouldValidateOnChange(path,validateInputOnChange){if(!validateInputOnChange)return false;if("boolean"==typeof validateInputOnChange)return validateInputOnChange;if(Array.isArray(validateInputOnChange))return validateInputOnChange.includes(path.replace(/[.][0-9]+/g,`.${FORM_INDEX}`));return false}"use client";function useForm({name,mode="controlled",initialValues,initialErrors={},initialDirty={},initialTouched={},clearInputErrorOnChange=true,validateInputOnChange=false,validateInputOnBlur=false,onValuesChange,transformValues=values=>values,enhanceGetInputProps,validate:rules,onSubmitPreventDefault="always",touchTrigger="change",cascadeUpdates=false}={}){const $errors=useFormErrors(initialErrors);const $values=useFormValues({initialValues,onValuesChange,mode});const $status=useFormStatus({initialDirty,initialTouched,$values,mode});const $list=useFormList({$values,$errors,$status});const $watch=useFormWatch({$status,cascadeUpdates});const[formKey,setFormKey]=(0,index_js_.useState)(0);const[fieldKeys,setFieldKeys]=(0,index_js_.useState)({});const[submitting,setSubmitting]=(0,index_js_.useState)(false);const reset=(0,index_js_.useCallback)(()=>{$values.resetValues();$errors.clearErrors();$status.resetDirty();$status.resetTouched();"uncontrolled"===mode&&setFormKey(key2=>key2+1)},[]);const handleValuesChanges=(0,index_js_.useCallback)(previousValues=>{clearInputErrorOnChange&&$errors.clearErrors();"uncontrolled"===mode&&setFormKey(key2=>key2+1);Object.keys($watch.subscribers.current).forEach(path=>{const value=getPath(path,$values.refValues.current);const previousValue=getPath(path,previousValues);if(value!==previousValue)$watch.getFieldSubscribers(path).forEach(cb=>cb({previousValues,updatedValues:$values.refValues.current}))})},[clearInputErrorOnChange]);const initialize=(0,index_js_.useCallback)(values=>{const previousValues=$values.refValues.current;$values.initialize(values,()=>"uncontrolled"===mode&&setFormKey(key2=>key2+1));handleValuesChanges(previousValues)},[handleValuesChanges]);const setFieldValue=(0,index_js_.useCallback)((path,value,options)=>{const shouldValidate=shouldValidateOnChange(path,validateInputOnChange);const resolvedValue=value instanceof Function?value(getPath(path,$values.refValues.current)):value;$status.setCalculatedFieldDirty(path,resolvedValue);"change"===touchTrigger&&$status.setFieldTouched(path,true);!shouldValidate&&clearInputErrorOnChange&&$errors.clearFieldError(path);$values.setFieldValue({path,value,updateState:"controlled"===mode,subscribers:[...$watch.getFieldSubscribers(path),shouldValidate?payload=>{const validationResults=validateFieldValue(path,rules,payload.updatedValues);validationResults.hasError?$errors.setFieldError(path,validationResults.error):$errors.clearFieldError(path)}:null,options?.forceUpdate!==false&&"controlled"!==mode?()=>setFieldKeys(keys=>({...keys,[path]:(keys[path]||0)+1})):null]})},[onValuesChange,rules]);const setValues=(0,index_js_.useCallback)(values=>{const previousValues=$values.refValues.current;$values.setValues({values,updateState:"controlled"===mode});handleValuesChanges(previousValues)},[onValuesChange,handleValuesChanges]);const validate=(0,index_js_.useCallback)(()=>{const results=validateValues(rules,$values.refValues.current);$errors.setErrors(results.errors);return results},[rules]);const validateField=(0,index_js_.useCallback)(path=>{const results=validateFieldValue(path,rules,$values.refValues.current);results.hasError?$errors.setFieldError(path,results.error):$errors.clearFieldError(path);return results},[rules]);const getInputProps=(path,{type="input",withError=true,withFocus=true,...otherOptions}={})=>{const onChange=getInputOnChange(value=>setFieldValue(path,value,{forceUpdate:false}));const payload={onChange,"data-path":getDataPath(name,path)};if(withError)payload.error=$errors.errorsState[path];if("checkbox"===type)payload["controlled"===mode?"checked":"defaultChecked"]=getPath(path,$values.refValues.current);else payload["controlled"===mode?"value":"defaultValue"]=getPath(path,$values.refValues.current);if(withFocus){payload.onFocus=()=>$status.setFieldTouched(path,true);payload.onBlur=()=>{if(shouldValidateOnChange(path,validateInputOnBlur)){const validationResults=validateFieldValue(path,rules,$values.refValues.current);validationResults.hasError?$errors.setFieldError(path,validationResults.error):$errors.clearFieldError(path)}}}return Object.assign(payload,enhanceGetInputProps?.({inputProps:payload,field:path,options:{type,withError,withFocus,...otherOptions},form}))};const onSubmit=(handleSubmit,handleValidationFailure)=>event=>{if("always"===onSubmitPreventDefault)event?.preventDefault();const results=validate();if(results.hasErrors){if("validation-failed"===onSubmitPreventDefault)event?.preventDefault();handleValidationFailure?.(results.errors,$values.refValues.current,event)}else{const submitResult=handleSubmit?.(transformValues($values.refValues.current),event);if(submitResult instanceof Promise){setSubmitting(true);submitResult.finally(()=>setSubmitting(false))}}};const getTransformedValues=input=>transformValues(input||$values.refValues.current);const onReset=(0,index_js_.useCallback)(event=>{event.preventDefault();reset()},[]);const isValid=(0,index_js_.useCallback)(path=>path?!validateFieldValue(path,rules,$values.refValues.current).hasError:!validateValues(rules,$values.refValues.current).hasErrors,[rules]);const key=path=>`${formKey}-${String(path)}-${fieldKeys[String(path)]||0}`;const getInputNode=(0,index_js_.useCallback)(path=>document.querySelector(`[data-path="${getDataPath(name,path)}"]`),[]);const resetField=(0,index_js_.useCallback)(path=>{$values.resetField(path,["controlled"!==mode?()=>setFieldKeys(keys=>({...keys,[path]:(keys[path]||0)+1})):null])},[$values.resetField,mode,setFieldKeys]);const form={watch:$watch.watch,initialized:$values.initialized.current,values:"uncontrolled"===mode?$values.refValues.current:$values.stateValues,getValues:$values.getValues,getInitialValues:$values.getValuesSnapshot,setInitialValues:$values.setValuesSnapshot,resetField,initialize,setValues,setFieldValue,submitting,setSubmitting,errors:$errors.errorsState,setErrors:$errors.setErrors,setFieldError:$errors.setFieldError,clearFieldError:$errors.clearFieldError,clearErrors:$errors.clearErrors,resetDirty:$status.resetDirty,setTouched:$status.setTouched,setDirty:$status.setDirty,isTouched:$status.isTouched,resetTouched:$status.resetTouched,isDirty:$status.isDirty,getTouched:$status.getTouched,getDirty:$status.getDirty,reorderListItem:$list.reorderListItem,insertListItem:$list.insertListItem,removeListItem:$list.removeListItem,replaceListItem:$list.replaceListItem,reset,validate,validateField,getInputProps,onSubmit,onReset,isValid,getTransformedValues,key,getInputNode};useFormActions(name,form);return form}var jsx_runtime=__webpack_require__(5893);"use client";function createFormContext(){const FormContext=(0,index_js_.createContext)(null);function FormProvider({form,children}){return/* @__PURE__ */(0,jsx_runtime.jsx)(FormContext.Provider,{value:form,children})}function useFormContext(){const ctx=(0,index_js_.useContext)(FormContext);if(!ctx)throw new Error("useFormContext was called outside of FormProvider context");return ctx}return[FormProvider,useFormContext,useForm]}"use client";const Form=(0,index_js_.forwardRef)(({form,onSubmit,onReset,...others},ref)=>/* @__PURE__ */(0,jsx_runtime.jsx)("form",{...others,onSubmit:form.onSubmit("function"==typeof onSubmit?onSubmit:()=>{}),onReset:event=>{onReset?.(event);form.onReset(event)},ref}));Form.displayName="@mantine/use-form/Form";"use client";function isNotEmpty(error){const _error=error||true;return value=>{if("string"==typeof value)return value.trim().length>0?null:_error;if(Array.isArray(value))return value.length>0?null:_error;if(null==value)return _error;if(false===value)return _error;return null}}"use client";function matches(regexp,error){const _error=error||true;return value=>{if("string"!=typeof value)return _error;return regexp.test(value)?null:_error}}"use client";function isEmail(error){return matches(/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,error)}"use client";function isLengthValid(payload,value){if("number"==typeof payload)return value.length===payload;const{max,min}=payload;let valid=true;if("number"==typeof max&&value.length>max)valid=false;if("number"==typeof min&&value.length<min)valid=false;return valid}function hasLength(payload,error){const _error=error||true;return value=>{if("string"==typeof value)return isLengthValid(payload,value.trim())?null:_error;if("object"==typeof value&&null!==value&&"length"in value)return isLengthValid(payload,value)?null:_error;return _error}}"use client";function isInRange({min,max},error){const _error=error||true;return value=>{if("number"!=typeof value)return _error;let valid=true;if("number"==typeof min&&value<min)valid=false;if("number"==typeof max&&value>max)valid=false;return valid?null:_error}}"use client";function matchesField(field,error){const _error=error||true;return(value,values)=>{if(!values||!(field in values))return _error;return value===values[field]?null:_error}}"use client";function removeHtmlTags(input){return input.replace(/<\/?[^>]+(>|$)/g,"")}function isNotEmptyHTML(error){const _error=error||true;return value=>{if("string"==typeof value)return removeHtmlTags(value).trim().length>0?null:_error;return _error}}"use client";function isJSONString(error){const _error=error||true;return value=>{if("string"==typeof value)try{JSON.parse(value);return null}catch(e){}return _error}}"use client";function useField({mode="controlled",clearErrorOnChange=true,initialValue,initialError=null,initialTouched=false,onValueChange,validateOnChange=false,validateOnBlur=false,validate,resolveValidationError,type="input"}){const[valueState,setValueState]=(0,index_js_.useState)(initialValue);const valueRef=(0,index_js_.useRef)(valueState);const[key,setKey]=(0,index_js_.useState)(0);const[error,setError]=(0,index_js_.useState)(initialError||null);const touchedRef=(0,index_js_.useRef)(initialTouched||false);const[,setTouchedState]=(0,index_js_.useState)(touchedRef.current);const[isValidating,setIsValidating]=(0,index_js_.useState)(false);const errorResolver=(0,index_js_.useMemo)(()=>resolveValidationError||(err=>err),[resolveValidationError]);const setTouched=(0,index_js_.useCallback)((val,{updateState="controlled"===mode}={})=>{touchedRef.current=val;updateState&&setTouchedState(val)},[]);const setValue=(0,index_js_.useCallback)((value,{updateKey="uncontrolled"===mode,updateState="controlled"===mode}={})=>{if(valueRef.current===value)return;valueRef.current=value;onValueChange?.(value);if(clearErrorOnChange&&null!==error)setError(null);if(updateState)setValueState(value);if(updateKey)setKey(currentKey=>currentKey+1);if(validateOnChange)_validate()},[error,clearErrorOnChange,onValueChange]);const reset=(0,index_js_.useCallback)(()=>{setValue(initialValue);setError(null);setTouched(false)},[initialValue]);const getValue=(0,index_js_.useCallback)(()=>valueRef.current,[]);const isTouched=(0,index_js_.useCallback)(()=>touchedRef.current,[]);const isDirty=(0,index_js_.useCallback)(()=>valueRef.current!==initialValue,[initialValue]);const _validate=(0,index_js_.useCallback)(async()=>{const validationResult=validate?.(valueRef.current);if(validationResult instanceof Promise){setIsValidating(true);try{const result=await validationResult;setIsValidating(false);setError(result)}catch(err){setIsValidating(false);const resolvedError=errorResolver(err);setError(resolvedError);return resolvedError}}else{setError(validationResult);return validationResult}},[]);const getInputProps=({withError=true,withFocus=true}={})=>{const onChange=getInputOnChange(val=>setValue(val,{updateKey:false}));const payload={onChange};if(withError)payload.error=error;if("checkbox"===type)payload["controlled"===mode?"checked":"defaultChecked"]=valueRef.current;else payload["controlled"===mode?"value":"defaultValue"]=valueRef.current;if(withFocus){payload.onFocus=()=>{setTouched(true)};payload.onBlur=()=>{if(shouldValidateOnChange("",!!validateOnBlur))_validate()}}return payload};const resetTouched=(0,index_js_.useCallback)(()=>setTouched(false),[]);return{key,getValue,setValue,reset,getInputProps,isValidating,validate:_validate,error,setError,isTouched,isDirty,resetTouched}}"use client";function zodResolver(schema){return values=>{const parsed=schema.safeParse(values);if(parsed.success)return{};const results={};parsed.error.errors.forEach(error=>{results[error.path.join(".")]=error.message});return results}}"use client";function superstructResolver(schema){function structValidation(values){const formErrors={};const[err]=schema.validate(values);if(!err)return formErrors;err.failures().forEach(fieldFailure=>{const fieldName=fieldFailure.path.join(" ");formErrors[fieldFailure.path.join(".")]=`${fieldName}: ${fieldFailure.message}`});return formErrors}return structValidation}"use client";function yupResolver(schema){const _schema=schema;return values=>{try{_schema.validateSync(values,{abortEarly:false});return{}}catch(_yupError){const yupError=_yupError;const results={};yupError.inner.forEach(error=>{results[error.path.replaceAll("[",".").replaceAll("]","")]=error.message});return results}}}"use client";function joiResolver(schema,options){const _schema=schema;return values=>{const parsed=_schema.validate(values,{abortEarly:false,...options});if(!parsed.error)return{};const results={};parsed.error.details.forEach(error=>{results[error.path.join(".")]=error.message});return results}}}}]);
|
package/dist/mf/9660.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis["chunk_tech_app"]=globalThis["chunk_tech_app"]||[]).push([["9660"],{2663:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{r:()=>QueueDashboard});var jsx_runtime=__webpack_require__(5893);var index_mjs_=__webpack_require__(207);var index_js_=__webpack_require__(3106);var PageHeader=__webpack_require__(1354);var esm_index_mjs_=__webpack_require__(1455);function BulkActionBar({selectedIds,onClear,actions}){const count=selectedIds.length;const[confirm,setConfirm]=(0,index_js_.useState)(null);const[prompt,setPrompt]=(0,index_js_.useState)(null);const[promptValue,setPromptValue]=(0,index_js_.useState)("");const[pending,setPending]=(0,index_js_.useState)(false);if(0===count)return null;const run=async(action,value)=>{setConfirm(null);setPrompt(null);setPending(true);const res=await action.run(selectedIds,value);setPending(false);onClear();esm_index_mjs_.notifications.show({title:action.label,message:`${res.ok} succeeded${res.failed?`, ${res.failed} failed`:""}`,color:res.failed?"red":"green"})};const trigger=action=>{if(action.prompt){setPromptValue("");setPrompt(action.key)}else if(action.confirm)setConfirm(action.key);else run(action)};return/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Paper,{p:"sm",radius:"md",withBorder:true,style:{position:"sticky",bottom:16,zIndex:5,backgroundColor:"var(--mantine-color-dark-7)"},children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{justify:"space-between",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{size:"sm",fw:600,children:[count," selected"]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Button,{size:"xs",variant:"subtle",onClick:onClear,children:"Clear"})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Group,{gap:"xs",children:actions.map(a=>/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Button,{size:"xs",variant:a.variant??"default",color:a.color,loading:pending,onClick:()=>trigger(a),children:a.label},a.key))})]})}),actions.filter(a=>a.confirm).map(a=>/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Modal,{opened:confirm===a.key,onClose:()=>setConfirm(null),title:a.confirm.title.replace("{count}",String(count)),children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{size:"sm",children:a.confirm.body}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{justify:"flex-end",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Button,{variant:"default",onClick:()=>setConfirm(null),children:"Cancel"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Button,{color:a.color,onClick:()=>run(a),children:[a.label," ",count]})]})]})},a.key)),actions.filter(a=>a.prompt).map(a=>/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Modal,{opened:prompt===a.key,onClose:()=>setPrompt(null),title:`${a.label} \u{2014} ${count} task(s)`,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.TextInput,{label:a.prompt.label,placeholder:a.prompt.placeholder,value:promptValue,onChange:e=>setPromptValue(e.currentTarget.value)}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{justify:"flex-end",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Button,{variant:"default",onClick:()=>setPrompt(null),children:"Cancel"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Button,{color:a.color,disabled:!promptValue.trim(),onClick:()=>run(a,promptValue.trim()),children:["Apply to ",count]})]})]})},a.key))]})}function FiltersBar({fields,values,onChange,stock}){return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Group,{align:"flex-end",children:fields.map(field=>{if("search"===field.kind)return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.TextInput,{label:field.label,placeholder:field.placeholder??"Rechercher…",value:values[field.key]??"",onChange:e=>onChange({...values,[field.key]:e.currentTarget.value}),w:field.width??220},field.key);const raw=field.options(stock);const options=raw.map(o=>"string"==typeof o?{value:o,label:o}:o);return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Select,{label:field.label,placeholder:field.placeholder??"All",data:options,value:values[field.key]??null,onChange:v=>onChange({...values,[field.key]:v}),searchable:true,clearable:field.clearable??true,w:field.width??220},field.key)})})}var modern_index_js_=__webpack_require__(6197);var useApi=__webpack_require__(4148);function useJobLogs(githubJob){const api=(0,useApi.h)();return(0,modern_index_js_.useQuery)({queryKey:["tech","github","job-logs",githubJob],queryFn:async()=>(await api.github.getJobLogsV1({githubJob:githubJob})).data,enabled:!!githubJob,refetchOnWindowFocus:false,retry:false})}function fallbackUrl(githubJob){const parts=githubJob.split("/");if(parts.length<3)return null;const runId=parts[parts.length-1];const repo=parts[parts.length-2];const owner=parts.slice(0,-2).join("/");return`https://github.com/${owner}/${repo}/actions/runs/${runId}`}function JobLogsDrawer({githubJob,opened,onClose}){const query=useJobLogs(opened?githubJob:null);const ghLink=githubJob?fallbackUrl(githubJob):null;return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Drawer,{opened:opened,onClose:onClose,position:"right",size:"60%",title:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Title,{order:4,children:"Workflow logs"}),query.data?.conclusion&&/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Badge,{color:"success"===query.data.conclusion?"green":"red",children:query.data.conclusion})]}),children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{children:[ghLink&&/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Button,{component:"a",href:ghLink,target:"_blank",variant:"default",size:"xs",children:"Open in GitHub"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Button,{size:"xs",variant:"default",onClick:()=>query.refetch(),children:"Refresh logs"})]}),query.isLoading&&/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Skeleton,{height:400}),query.isError&&/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Alert,{color:"red",title:"Failed to load logs",children:query.error?.message??"Unknown error"}),query.data?.jobs.map((j,i)=>/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:"xs",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Title,{order:5,children:j.name}),j.conclusion&&/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Badge,{color:"success"===j.conclusion?"green":"red",children:j.conclusion})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Code,{block:true,style:{maxHeight:400,overflow:"auto",whiteSpace:"pre"},children:j.logs||"(empty)"})]},i)),query.data&&0===query.data.jobs.length&&/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",children:"No jobs found."})]})})}var jobLogsContext=__webpack_require__(6845);function toneToBg(tone){switch(tone){case"bad":return"rgba(255, 99, 99, 0.12)";case"warn":return"rgba(255, 170, 80, 0.12)";case"good":return"rgba(80, 200, 120, 0.10)";default:return}}function isFilterActive(tileFilter,active){if(!tileFilter||!active)return false;return Object.entries(tileFilter).every(([k,v])=>active[k]===v)}function KpiStrip({stock,isLoading,isError,tiles,activeFilter,onTileClick}){if(isLoading)return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.SimpleGrid,{cols:Math.min(tiles.length,6),children:tiles.map(t=>/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Skeleton,{height:60},t.key))});if(isError)return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"red",children:"Failed to load stock"});return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.SimpleGrid,{cols:Math.min(tiles.length,6),children:tiles.map(t=>{const tone=t.tone?.(stock);const clickable=Boolean(t.filter&&onTileClick);const active=isFilterActive(t.filter,activeFilter);return/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Card,{padding:"sm",radius:"md",withBorder:true,onClick:clickable?()=>onTileClick(t):void 0,style:{backgroundColor:toneToBg(tone),minHeight:60,cursor:clickable?"pointer":"default",outline:active?"2px solid var(--mantine-color-teal-5)":void 0,outlineOffset:active?-2:void 0,transition:"outline 120ms ease"},children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{size:"xs",c:"dimmed",children:t.label}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{fw:700,size:"lg",children:t.value(stock)})]},t.key)})})}function TasksTable({items,total,isLoading,columns,rowActions,selectedIds,getRowId,onToggleId,onToggleAll}){if(isLoading)return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Skeleton,{height:300});if(!items||0===items.length)return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",children:"No tasks for current filters."});const visibleIds=items.map(getRowId);const allSelected=visibleIds.every(id=>selectedIds.has(id));const someSelected=!allSelected&&visibleIds.some(id=>selectedIds.has(id));return/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.ScrollArea,{children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{size:"xs",c:"dimmed",mb:"xs",children:[total," task(s)"]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Table,{miw:1100,verticalSpacing:"xs",highlightOnHover:true,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Thead,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Table.Tr,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{w:40,children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Checkbox,{checked:allSelected,indeterminate:someSelected,onChange:e=>onToggleAll(visibleIds,e.currentTarget.checked),"aria-label":"Select all"})}),columns.map(col=>/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{style:{minWidth:col.minWidth},children:col.label},col.key)),rowActions.length>0&&/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{children:"Actions"})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Tbody,{children:items.map(item=>{const id=getRowId(item);return/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Table.Tr,{bg:selectedIds.has(id)?"var(--mantine-color-dark-6)":void 0,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Checkbox,{checked:selectedIds.has(id),onChange:()=>onToggleId(id),"aria-label":`Select task ${id}`})}),columns.map(col=>/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:col.render(item)},col.key)),rowActions.length>0&&/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:rowActions.map(a=>/*#__PURE__*/(0,jsx_runtime.jsx)("span",{children:a.render(item)},a.key))})]},id)})})]})]})}function normalizeSignature(message){return message.replace(/[\d]+/g,"#").replace(/['"]/g,"").replace(/\s+/g," ").trim().slice(0,140)}function TopErrorsCard({items,extract,onPick,limit=5}){const groups=(0,index_js_.useMemo)(()=>{const map=new Map;for(const item of items??[]){const raw=extract(item);if(!raw)continue;const sig=normalizeSignature(raw);map.set(sig,(map.get(sig)??0)+1)}return[...map.entries()].sort((a,b)=>b[1]-a[1]).slice(0,limit).map(([sig,count])=>({sig,count}))},[items,extract,limit]);if(0===groups.length)return null;return/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Card,{padding:"md",radius:"md",withBorder:true,children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{justify:"space-between",mb:"sm",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Title,{order:5,children:"Top erreurs"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{size:"xs",c:"dimmed",children:"regroup\xe9es par signature"})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Stack,{gap:6,children:groups.map(({sig,count})=>/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{gap:"sm",wrap:"nowrap",style:{cursor:onPick?"pointer":"default"},onClick:()=>onPick?.(sig),children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Badge,{color:"red",variant:"light",children:["\xd7",count]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{size:"sm",style:{flex:1},truncate:true,children:sig})]},sig))})]})}function QueueDashboard({config}){const stock=config.source.useStock();const[filters,setFilters]=(0,index_js_.useState)(config.initialFilters);const tasksQuery=config.source.useTasks(filters);const items=tasksQuery.data?.items;const[selectedIds,setSelectedIds]=(0,index_js_.useState)(new Set);const toggleId=(0,index_js_.useCallback)(id=>{setSelectedIds(prev=>{const next=new Set(prev);if(next.has(id))next.delete(id);else next.add(id);return next})},[]);const toggleAll=(0,index_js_.useCallback)((ids,select)=>{setSelectedIds(prev=>{const next=new Set(prev);for(const id of ids)if(select)next.add(id);else next.delete(id);return next})},[]);const clearSelection=(0,index_js_.useCallback)(()=>setSelectedIds(new Set),[]);const searchKey=config.filters.find(f=>"search"===f.kind)?.key;const searchValue=searchKey?(filters[searchKey]??"").trim().toLowerCase():"";const filtered=(0,index_js_.useMemo)(()=>{if(!items)return;if(!searchValue||!config.searchMatches)return items;return items.filter(it=>config.searchMatches(it,searchValue))},[items,searchValue,config]);const onErrorPick=signature=>{if(!searchKey)return;setFilters({...filters,[searchKey]:signature})};return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Container,{fluid:true,my:"md",children:/*#__PURE__*/(0,jsx_runtime.jsx)(jobLogsContext.z,{children:(currentJob,closeJob)=>/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(PageHeader.m,{title:config.title,badge:config.headerBadge,updatedAt:stock.dataUpdatedAt,isFetching:stock.isFetching||tasksQuery.isFetching,isError:stock.isError,onRefresh:()=>{stock.refetch();tasksQuery.refetch()},actions:config.headerActions}),/*#__PURE__*/(0,jsx_runtime.jsx)(KpiStrip,{stock:stock.data,isLoading:stock.isLoading,isError:stock.isError,tiles:config.kpis,activeFilter:filters,onTileClick:tile=>{if(tile.filter)setFilters({...filters,...tile.filter})}}),config.topErrors&&/*#__PURE__*/(0,jsx_runtime.jsx)(TopErrorsCard,{items:items,extract:config.topErrors.extract,onPick:onErrorPick}),/*#__PURE__*/(0,jsx_runtime.jsx)(FiltersBar,{fields:config.filters,values:filters,onChange:setFilters,stock:stock.data}),/*#__PURE__*/(0,jsx_runtime.jsx)(TasksTable,{items:filtered,total:tasksQuery.data?.total??filtered?.length??0,isLoading:tasksQuery.isLoading,columns:config.columns,rowActions:config.rowActions,selectedIds:selectedIds,getRowId:config.getRowId,onToggleId:toggleId,onToggleAll:toggleAll}),/*#__PURE__*/(0,jsx_runtime.jsx)(BulkActionBar,{selectedIds:[...selectedIds],onClear:clearSelection,actions:config.bulkActions}),/*#__PURE__*/(0,jsx_runtime.jsx)(JobLogsDrawer,{githubJob:currentJob,opened:!!currentJob,onClose:closeJob})]})})})}},6845:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{j:()=>useOpenJobLogs,z:()=>JobLogsProvider});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5893);var react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(3106);const JobLogsContext=/*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.createContext)(null);function useOpenJobLogs(){const ctx=(0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(JobLogsContext);if(!ctx)throw new Error("useOpenJobLogs must be used within JobLogsProvider");return ctx.open}function JobLogsProvider({children}){const[current,setCurrent]=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(JobLogsContext.Provider,{value:{open:setCurrent},children:children(current,()=>setCurrent(null))})}},1354:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{m:()=>PageHeader});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5893);var _mantine_core__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(207);var _tabler_icons_react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(9632);var react__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(3106);function formatRelative(now,then){const seconds=Math.max(0,Math.floor((now-then)/1e3));if(seconds<5)return"\xe0 l’instant";if(seconds<60)return`il y a ${seconds}s`;const minutes=Math.floor(seconds/60);if(minutes<60)return`il y a ${minutes} min`;const hours=Math.floor(minutes/60);return`il y a ${hours} h`}function PageHeader({title,leading,badge,updatedAt,isFetching,isError,onRefresh,actions}){const[now,setNow]=(0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(()=>Date.now());(0,react__WEBPACK_IMPORTED_MODULE_3__.useEffect)(()=>{if(!updatedAt)return;const id=window.setInterval(()=>setNow(Date.now()),1e3);return()=>window.clearInterval(id)},[updatedAt]);const relative=updatedAt?formatRelative(now,updatedAt):null;const color=isError?"orange":isFetching?"teal":"dimmed";return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{justify:"space-between",align:"center",mih:48,mb:"md",children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{gap:"sm",align:"center",children:[leading,/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Title,{order:2,children:title}),badge]}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{gap:"sm",align:"center",children:[relative&&/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Text,{size:"xs",c:color,fw:isFetching?600:400,"data-testid":"page-header-freshness",children:isError?"\xe9chec maj":isFetching?"maj…":relative}),onRefresh&&/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Tooltip,{label:"Rafra\xeechir",children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.ActionIcon,{variant:"default",size:"md",onClick:onRefresh,loading:isFetching,"aria-label":"Refresh",children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tabler_icons_react__WEBPACK_IMPORTED_MODULE_2__.IconRefresh,{size:16})})}),actions]})]})}}}]);
|
|
1
|
+
"use strict";(globalThis["chunk_tech_app"]=globalThis["chunk_tech_app"]||[]).push([["9660"],{2663:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{r:()=>QueueDashboard});var jsx_runtime=__webpack_require__(5893);var index_mjs_=__webpack_require__(207);var index_js_=__webpack_require__(3106);var PageHeader=__webpack_require__(1354);var esm_index_mjs_=__webpack_require__(1455);function BulkActionBar({selectedIds,onClear,actions}){const count=selectedIds.length;const[confirm,setConfirm]=(0,index_js_.useState)(null);const[prompt,setPrompt]=(0,index_js_.useState)(null);const[promptValue,setPromptValue]=(0,index_js_.useState)("");const[pending,setPending]=(0,index_js_.useState)(false);if(0===count)return null;const run=async(action,value)=>{setConfirm(null);setPrompt(null);setPending(true);const res=await action.run(selectedIds,value);setPending(false);onClear();esm_index_mjs_.notifications.show({title:action.label,message:`${res.ok} succeeded${res.failed?`, ${res.failed} failed`:""}`,color:res.failed?"red":"green"})};const trigger=action=>{if(action.prompt){setPromptValue("");setPrompt(action.key)}else if(action.confirm)setConfirm(action.key);else run(action)};return/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Paper,{p:"sm",radius:"md",withBorder:true,style:{position:"sticky",bottom:16,zIndex:5,backgroundColor:"var(--mantine-color-dark-7)"},children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{justify:"space-between",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{size:"sm",fw:600,children:[count," selected"]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Button,{size:"xs",variant:"subtle",onClick:onClear,children:"Clear"})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Group,{gap:"xs",children:actions.map(a=>/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Button,{size:"xs",variant:a.variant??"default",color:a.color,loading:pending,onClick:()=>trigger(a),children:a.label},a.key))})]})}),actions.filter(a=>a.confirm).map(a=>/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Modal,{opened:confirm===a.key,onClose:()=>setConfirm(null),title:a.confirm.title.replace("{count}",String(count)),children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{size:"sm",children:a.confirm.body}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{justify:"flex-end",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Button,{variant:"default",onClick:()=>setConfirm(null),children:"Cancel"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Button,{color:a.color,onClick:()=>run(a),children:[a.label," ",count]})]})]})},a.key)),actions.filter(a=>a.prompt).map(a=>/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Modal,{opened:prompt===a.key,onClose:()=>setPrompt(null),title:`${a.label} \u{2014} ${count} task(s)`,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.TextInput,{label:a.prompt.label,placeholder:a.prompt.placeholder,value:promptValue,onChange:e=>setPromptValue(e.currentTarget.value)}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{justify:"flex-end",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Button,{variant:"default",onClick:()=>setPrompt(null),children:"Cancel"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Button,{color:a.color,disabled:!promptValue.trim(),onClick:()=>run(a,promptValue.trim()),children:["Apply to ",count]})]})]})},a.key))]})}function FiltersBar({fields,values,onChange,stock}){return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Group,{align:"flex-end",children:fields.map(field=>{if("search"===field.kind)return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.TextInput,{label:field.label,placeholder:field.placeholder??"Rechercher…",value:values[field.key]??"",onChange:e=>onChange({...values,[field.key]:e.currentTarget.value}),w:field.width??220},field.key);const raw=field.options(stock);const options=raw.map(o=>"string"==typeof o?{value:o,label:o}:o);return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Select,{label:field.label,placeholder:field.placeholder??"All",data:options,value:values[field.key]??null,onChange:v=>onChange({...values,[field.key]:v}),searchable:true,clearable:field.clearable??true,w:field.width??220},field.key)})})}var modern_index_js_=__webpack_require__(6197);var useApi=__webpack_require__(4148);function useJobLogs(githubJob){const api=(0,useApi.h)();return(0,modern_index_js_.useQuery)({queryKey:["tech","github","job-logs",githubJob],queryFn:async()=>(await api.github.getJobLogsV1({githubJob:githubJob})).data,enabled:!!githubJob,refetchOnWindowFocus:false,retry:false})}function fallbackUrl(githubJob){const parts=githubJob.split("/");if(parts.length<3)return null;const runId=parts[parts.length-1];const repo=parts[parts.length-2];const owner=parts.slice(0,-2).join("/");return`https://github.com/${owner}/${repo}/actions/runs/${runId}`}function JobLogsDrawer({githubJob,opened,onClose}){const query=useJobLogs(opened?githubJob:null);const ghLink=githubJob?fallbackUrl(githubJob):null;return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Drawer,{opened:opened,onClose:onClose,position:"right",size:"60%",title:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Title,{order:4,children:"Workflow logs"}),query.data?.conclusion&&/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Badge,{color:"success"===query.data.conclusion?"green":"red",children:query.data.conclusion})]}),children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{children:[ghLink&&/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Button,{component:"a",href:ghLink,target:"_blank",variant:"default",size:"xs",children:"Open in GitHub"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Button,{size:"xs",variant:"default",onClick:()=>query.refetch(),children:"Refresh logs"})]}),query.isLoading&&/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Skeleton,{height:400}),query.isError&&/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Alert,{color:"red",title:"Failed to load logs",children:query.error?.message??"Unknown error"}),query.data?.jobs.map((j,i)=>/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:"xs",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Title,{order:5,children:j.name}),j.conclusion&&/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Badge,{color:"success"===j.conclusion?"green":"red",children:j.conclusion})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Code,{block:true,style:{maxHeight:400,overflow:"auto",whiteSpace:"pre"},children:j.logs||"(empty)"})]},i)),query.data&&0===query.data.jobs.length&&/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",children:"No jobs found."})]})})}var jobLogsContext=__webpack_require__(4302);function toneToBg(tone){switch(tone){case"bad":return"rgba(255, 99, 99, 0.12)";case"warn":return"rgba(255, 170, 80, 0.12)";case"good":return"rgba(80, 200, 120, 0.10)";default:return}}function isFilterActive(tileFilter,active){if(!tileFilter||!active)return false;return Object.entries(tileFilter).every(([k,v])=>active[k]===v)}function KpiStrip({stock,isLoading,isError,tiles,activeFilter,onTileClick}){if(isLoading)return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.SimpleGrid,{cols:Math.min(tiles.length,6),children:tiles.map(t=>/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Skeleton,{height:60},t.key))});if(isError)return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"red",children:"Failed to load stock"});return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.SimpleGrid,{cols:Math.min(tiles.length,6),children:tiles.map(t=>{const tone=t.tone?.(stock);const clickable=Boolean(t.filter&&onTileClick);const active=isFilterActive(t.filter,activeFilter);return/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Card,{padding:"sm",radius:"md",withBorder:true,onClick:clickable?()=>onTileClick(t):void 0,style:{backgroundColor:toneToBg(tone),minHeight:60,cursor:clickable?"pointer":"default",outline:active?"2px solid var(--mantine-color-teal-5)":void 0,outlineOffset:active?-2:void 0,transition:"outline 120ms ease"},children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{size:"xs",c:"dimmed",children:t.label}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{fw:700,size:"lg",children:t.value(stock)})]},t.key)})})}function TasksTable({items,total,isLoading,columns,rowActions,selectedIds,getRowId,onToggleId,onToggleAll}){if(isLoading)return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Skeleton,{height:300});if(!items||0===items.length)return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",children:"No tasks for current filters."});const visibleIds=items.map(getRowId);const allSelected=visibleIds.every(id=>selectedIds.has(id));const someSelected=!allSelected&&visibleIds.some(id=>selectedIds.has(id));return/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.ScrollArea,{children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{size:"xs",c:"dimmed",mb:"xs",children:[total," task(s)"]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Table,{miw:1100,verticalSpacing:"xs",highlightOnHover:true,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Thead,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Table.Tr,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{w:40,children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Checkbox,{checked:allSelected,indeterminate:someSelected,onChange:e=>onToggleAll(visibleIds,e.currentTarget.checked),"aria-label":"Select all"})}),columns.map(col=>/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{style:{minWidth:col.minWidth},children:col.label},col.key)),rowActions.length>0&&/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{children:"Actions"})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Tbody,{children:items.map(item=>{const id=getRowId(item);return/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Table.Tr,{bg:selectedIds.has(id)?"var(--mantine-color-dark-6)":void 0,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Checkbox,{checked:selectedIds.has(id),onChange:()=>onToggleId(id),"aria-label":`Select task ${id}`})}),columns.map(col=>/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:col.render(item)},col.key)),rowActions.length>0&&/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:rowActions.map(a=>/*#__PURE__*/(0,jsx_runtime.jsx)("span",{children:a.render(item)},a.key))})]},id)})})]})]})}function normalizeSignature(message){return message.replace(/[\d]+/g,"#").replace(/['"]/g,"").replace(/\s+/g," ").trim().slice(0,140)}function TopErrorsCard({items,extract,onPick,limit=5}){const groups=(0,index_js_.useMemo)(()=>{const map=new Map;for(const item of items??[]){const raw=extract(item);if(!raw)continue;const sig=normalizeSignature(raw);map.set(sig,(map.get(sig)??0)+1)}return[...map.entries()].sort((a,b)=>b[1]-a[1]).slice(0,limit).map(([sig,count])=>({sig,count}))},[items,extract,limit]);if(0===groups.length)return null;return/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Card,{padding:"md",radius:"md",withBorder:true,children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{justify:"space-between",mb:"sm",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Title,{order:5,children:"Top erreurs"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{size:"xs",c:"dimmed",children:"regroup\xe9es par signature"})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Stack,{gap:6,children:groups.map(({sig,count})=>/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{gap:"sm",wrap:"nowrap",style:{cursor:onPick?"pointer":"default"},onClick:()=>onPick?.(sig),children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Badge,{color:"red",variant:"light",children:["\xd7",count]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{size:"sm",style:{flex:1},truncate:true,children:sig})]},sig))})]})}function QueueDashboard({config}){const stock=config.source.useStock();const[filters,setFilters]=(0,index_js_.useState)(config.initialFilters);const tasksQuery=config.source.useTasks(filters);const items=tasksQuery.data?.items;const[selectedIds,setSelectedIds]=(0,index_js_.useState)(new Set);const toggleId=(0,index_js_.useCallback)(id=>{setSelectedIds(prev=>{const next=new Set(prev);if(next.has(id))next.delete(id);else next.add(id);return next})},[]);const toggleAll=(0,index_js_.useCallback)((ids,select)=>{setSelectedIds(prev=>{const next=new Set(prev);for(const id of ids)if(select)next.add(id);else next.delete(id);return next})},[]);const clearSelection=(0,index_js_.useCallback)(()=>setSelectedIds(new Set),[]);const searchKey=config.filters.find(f=>"search"===f.kind)?.key;const searchValue=searchKey?(filters[searchKey]??"").trim().toLowerCase():"";const filtered=(0,index_js_.useMemo)(()=>{if(!items)return;if(!searchValue||!config.searchMatches)return items;return items.filter(it=>config.searchMatches(it,searchValue))},[items,searchValue,config]);const onErrorPick=signature=>{if(!searchKey)return;setFilters({...filters,[searchKey]:signature})};return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Container,{fluid:true,my:"md",children:/*#__PURE__*/(0,jsx_runtime.jsx)(jobLogsContext.z,{children:(currentJob,closeJob)=>/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(PageHeader.m,{title:config.title,badge:config.headerBadge,updatedAt:stock.dataUpdatedAt,isFetching:stock.isFetching||tasksQuery.isFetching,isError:stock.isError,onRefresh:()=>{stock.refetch();tasksQuery.refetch()},actions:config.headerActions}),/*#__PURE__*/(0,jsx_runtime.jsx)(KpiStrip,{stock:stock.data,isLoading:stock.isLoading,isError:stock.isError,tiles:config.kpis,activeFilter:filters,onTileClick:tile=>{if(tile.filter)setFilters({...filters,...tile.filter})}}),config.topErrors&&/*#__PURE__*/(0,jsx_runtime.jsx)(TopErrorsCard,{items:items,extract:config.topErrors.extract,onPick:onErrorPick}),/*#__PURE__*/(0,jsx_runtime.jsx)(FiltersBar,{fields:config.filters,values:filters,onChange:setFilters,stock:stock.data}),/*#__PURE__*/(0,jsx_runtime.jsx)(TasksTable,{items:filtered,total:tasksQuery.data?.total??filtered?.length??0,isLoading:tasksQuery.isLoading,columns:config.columns,rowActions:config.rowActions,selectedIds:selectedIds,getRowId:config.getRowId,onToggleId:toggleId,onToggleAll:toggleAll}),/*#__PURE__*/(0,jsx_runtime.jsx)(BulkActionBar,{selectedIds:[...selectedIds],onClear:clearSelection,actions:config.bulkActions}),/*#__PURE__*/(0,jsx_runtime.jsx)(JobLogsDrawer,{githubJob:currentJob,opened:!!currentJob,onClose:closeJob})]})})})}},4302:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{j:()=>useOpenJobLogs,z:()=>JobLogsProvider});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5893);var react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(3106);const JobLogsContext=/*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.createContext)(null);function useOpenJobLogs(){const ctx=(0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(JobLogsContext);if(!ctx)throw new Error("useOpenJobLogs must be used within JobLogsProvider");return ctx.open}function JobLogsProvider({children}){const[current,setCurrent]=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(JobLogsContext.Provider,{value:{open:setCurrent},children:children(current,()=>setCurrent(null))})}},1354:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{m:()=>PageHeader});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5893);var _mantine_core__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(207);var _tabler_icons_react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(9632);var react__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(3106);function formatRelative(now,then){const seconds=Math.max(0,Math.floor((now-then)/1e3));if(seconds<5)return"\xe0 l’instant";if(seconds<60)return`il y a ${seconds}s`;const minutes=Math.floor(seconds/60);if(minutes<60)return`il y a ${minutes} min`;const hours=Math.floor(minutes/60);return`il y a ${hours} h`}function PageHeader({title,leading,badge,updatedAt,isFetching,isError,onRefresh,actions}){const[now,setNow]=(0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(()=>Date.now());(0,react__WEBPACK_IMPORTED_MODULE_3__.useEffect)(()=>{if(!updatedAt)return;const id=window.setInterval(()=>setNow(Date.now()),1e3);return()=>window.clearInterval(id)},[updatedAt]);const relative=updatedAt?formatRelative(now,updatedAt):null;const color=isError?"orange":isFetching?"teal":"dimmed";return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{justify:"space-between",align:"center",mih:48,mb:"md",children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{gap:"sm",align:"center",children:[leading,/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Title,{order:2,children:title}),badge]}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{gap:"sm",align:"center",children:[relative&&/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Text,{size:"xs",c:color,fw:isFetching?600:400,"data-testid":"page-header-freshness",children:isError?"\xe9chec maj":isFetching?"maj…":relative}),onRefresh&&/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Tooltip,{label:"Rafra\xeechir",children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.ActionIcon,{variant:"default",size:"md",onClick:onRefresh,loading:isFetching,"aria-label":"Refresh",children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tabler_icons_react__WEBPACK_IMPORTED_MODULE_2__.IconRefresh,{size:16})})}),actions]})]})}}}]);
|
package/dist/mf/9669.js
CHANGED
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var REACT_ELEMENT_TYPE=Symbol.for("react.transitional.element"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment");function jsxProd(type,config,maybeKey){var key=null;void 0!==maybeKey&&(key=""+maybeKey);void 0!==config.key&&(key=""+config.key);if("key"in config){maybeKey={};for(var propName in config)"key"!==propName&&(maybeKey[propName]=config[propName])}else maybeKey=config;config=maybeKey.ref;return{$$typeof:REACT_ELEMENT_TYPE,type:type,key:key,ref:void 0!==config?config:null,props:maybeKey}}exports.Fragment=REACT_FRAGMENT_TYPE;exports.jsx=jsxProd;exports.jsxs=jsxProd},5893:function(module,__unused_webpack_exports,__webpack_require__){module.exports=__webpack_require__(631)},4148:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{h:()=>useApi});var _src_gen_TechApi_index_ts__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(9056);var _src_hooks_useAppConfig_ts__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(7936);function useApi(){const config=(0,_src_hooks_useAppConfig_ts__WEBPACK_IMPORTED_MODULE_0__.M)();const client=new _src_gen_TechApi_index_ts__WEBPACK_IMPORTED_MODULE_1__.eN({baseUrl:config.api.replace(/\/$/,""),baseApiParams:{headers:{Authorization:config.token?`Bearer ${config.token}`:"",From:config.owner}}});return new _src_gen_TechApi_index_ts__WEBPACK_IMPORTED_MODULE_1__.eT(client)}},9056:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{eN:()=>HttpClient,eT:()=>TechApi});class HttpClient{baseUrl="";securityData=null;securityWorker;abortControllers=new Map;customFetch=(...fetchParams)=>fetch(...fetchParams);baseApiParams={credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"};constructor(apiConfig={}){Object.assign(this,apiConfig)}setSecurityData=data=>{this.securityData=data};encodeQueryParam(key,value){const encodedKey=encodeURIComponent(key);return`${encodedKey}=${encodeURIComponent("number"==typeof value?value:`${value}`)}`}addQueryParam(query,key){return this.encodeQueryParam(key,query[key])}addArrayQueryParam(query,key){const value=query[key];return value.map(v=>this.encodeQueryParam(key,v)).join("&")}toQueryString(rawQuery){const query=rawQuery||{};const keys=Object.keys(query).filter(key=>void 0!==query[key]);return keys.map(key=>Array.isArray(query[key])?this.addArrayQueryParam(query,key):this.addQueryParam(query,key)).join("&")}addQueryParams(rawQuery){const queryString=this.toQueryString(rawQuery);return queryString?`?${queryString}`:""}contentFormatters={["application/json"]:input=>null!==input&&("object"==typeof input||"string"==typeof input)?JSON.stringify(input):input,["application/vnd.api+json"]:input=>null!==input&&("object"==typeof input||"string"==typeof input)?JSON.stringify(input):input,["text/plain"]:input=>null!==input&&"string"!=typeof input?JSON.stringify(input):input,["multipart/form-data"]:input=>{if(input instanceof FormData)return input;return Object.keys(input||{}).reduce((formData,key)=>{const property=input[key];formData.append(key,property instanceof Blob?property:"object"==typeof property&&null!==property?JSON.stringify(property):`${property}`);return formData},new FormData)},["application/x-www-form-urlencoded"]:input=>this.toQueryString(input)};mergeRequestParams(params1,params2){return{...this.baseApiParams,...params1,...params2||{},headers:{...this.baseApiParams.headers||{},...params1.headers||{},...params2&¶ms2.headers||{}}}}createAbortSignal=cancelToken=>{if(this.abortControllers.has(cancelToken)){const abortController=this.abortControllers.get(cancelToken);if(abortController)return abortController.signal;return}const abortController=new AbortController;this.abortControllers.set(cancelToken,abortController);return abortController.signal};abortRequest=cancelToken=>{const abortController=this.abortControllers.get(cancelToken);if(abortController){abortController.abort();this.abortControllers.delete(cancelToken)}};request=async({body,secure,path,type,query,format,baseUrl,cancelToken,...params})=>{const secureParams=("boolean"==typeof secure?secure:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{};const requestParams=this.mergeRequestParams(params,secureParams);const queryString=query&&this.toQueryString(query);const payloadFormatter=this.contentFormatters[type||"application/json"];const responseFormat=format||requestParams.format;return this.customFetch(`${baseUrl||this.baseUrl||""}${path}${queryString?`?${queryString}`:""}`,{...requestParams,headers:{...requestParams.headers||{},...type&&"multipart/form-data"!==type?{"Content-Type":type}:{}},signal:(cancelToken?this.createAbortSignal(cancelToken):requestParams.signal)||null,body:null==body?null:payloadFormatter(body)}).then(async response=>{const r=response;r.data=null;r.error=null;const responseToParse=responseFormat?response.clone():response;const data=responseFormat?await responseToParse[responseFormat]().then(data=>{if(r.ok)r.data=data;else r.error=data;return r}).catch(e=>{r.error=e;return r}):r;if(cancelToken)this.abortControllers.delete(cancelToken);if(!response.ok)throw data;return data})}}class TechApi{http;constructor(http){this.http=http}status=(params={})=>this.http.request({path:"/status",method:"GET",...params});getDashboard=(params={})=>this.http.request({path:"/dashboard",method:"GET",format:"json",...params});getCompanies=(params={})=>this.http.request({path:"/companies",method:"GET",format:"json",...params});webhook={postSmsWebhook:(query,params={})=>this.http.request({path:"/sms/webhook",method:"POST",query:query,...params})};amex={getTransactionsV1:(query,params={})=>this.http.request({path:"/v1/amex/transactions",method:"GET",query:query,...params})};etatSaisie={getLatestV1:(params={})=>this.http.request({path:"/v1/etat-saisie/latest",method:"GET",format:"json",...params}),getDossiersV1:(params={})=>this.http.request({path:"/v1/etat-saisie/dossiers",method:"GET",format:"json",...params}),setManagedV1:({id,...query},data,params={})=>this.http.request({path:`/v1/etat-saisie/dossiers/${id}`,method:"PATCH",body:data,type:"application/json",format:"json",...params}),setResponsableV1:({id,...query},data,params={})=>this.http.request({path:`/v1/etat-saisie/dossiers/${id}/responsable`,method:"PATCH",body:data,type:"application/json",format:"json",...params}),recomputeV1:(params={})=>this.http.request({path:"/v1/etat-saisie/recompute",method:"POST",format:"json",...params})};sales={listLeadsV1:(params={})=>this.http.request({path:"/v1/sales/leads",method:"GET",format:"json",...params}),getLeadV1:({id,...query},params={})=>this.http.request({path:`/v1/sales/leads/${id}`,method:"GET",format:"json",...params}),updateLeadV1:({id,...query},data,params={})=>this.http.request({path:`/v1/sales/leads/${id}`,method:"PATCH",body:data,type:"application/json",format:"json",...params}),deleteLeadV1:({id,...query},params={})=>this.http.request({path:`/v1/sales/leads/${id}`,method:"DELETE",format:"json",...params}),rescanV1:(params={})=>this.http.request({path:"/v1/sales/rescan",method:"POST",format:"json",...params})};financeJobs={getStockV1:(params={})=>this.http.request({path:"/v1/finance-jobs/stock",method:"GET",format:"json",...params}),listTasksV1:(query,params={})=>this.http.request({path:"/v1/finance-jobs/tasks",method:"GET",query:query,format:"json",...params}),unstickV1:({id,...query},params={})=>this.http.request({path:`/v1/finance-jobs/tasks/${id}/unstick`,method:"POST",format:"json",...params}),retryV1:({id,...query},params={})=>this.http.request({path:`/v1/finance-jobs/tasks/${id}/retry`,method:"POST",format:"json",...params}),discardV1:({id,...query},params={})=>this.http.request({path:`/v1/finance-jobs/tasks/${id}/discard`,method:"POST",format:"json",...params}),setOwnerV1:({id,...query},data,params={})=>this.http.request({path:`/v1/finance-jobs/tasks/${id}/owner`,method:"PUT",body:data,type:"application/json",format:"json",...params}),deleteRedisLockV1:({id,...query},params={})=>this.http.request({path:`/v1/finance-jobs/tasks/${id}/redis-lock`,method:"DELETE",format:"json",...params}),runRecipeV1:(data,params={})=>this.http.request({path:"/v1/finance-jobs/run-recipe",method:"POST",body:data,type:"application/json",format:"json",...params}),getRunnersV1:(params={})=>this.http.request({path:"/v1/finance-jobs/runners",method:"GET",format:"json",...params})};github={getJobsRunnersV1:(params={})=>this.http.request({path:"/v1/github/jobs/runners",method:"GET",format:"json",...params}),getLabelsV1:({host,...query},params={})=>this.http.request({path:`/v1/github/labels/${host}`,method:"GET",format:"json",...params}),getJobLogsV1:(query,params={})=>this.http.request({path:"/v1/github/job-logs",method:"GET",query:query,format:"json",...params})};gsheet={getStockV1:(params={})=>this.http.request({path:"/v1/gsheet/stock",method:"GET",format:"json",...params}),listTasksV1:(query,params={})=>this.http.request({path:"/v1/gsheet/tasks",method:"GET",query:query,format:"json",...params}),unstickV1:({id,...query},params={})=>this.http.request({path:`/v1/gsheet/tasks/${id}/unstick`,method:"POST",format:"json",...params}),discardV1:({id,...query},params={})=>this.http.request({path:`/v1/gsheet/tasks/${id}/discard`,method:"POST",format:"json",...params}),setOwnerV1:({id,...query},data,params={})=>this.http.request({path:`/v1/gsheet/tasks/${id}/owner`,method:"PUT",body:data,type:"application/json",format:"json",...params}),deleteRedisLockV1:({id,...query},params={})=>this.http.request({path:`/v1/gsheet/tasks/${id}/redis-lock`,method:"DELETE",format:"json",...params})};notion={getKikouV1:(params={})=>this.http.request({path:"/v1/notion/kikou",method:"GET",format:"json",...params})};payfit={getChartV1:(query,params={})=>this.http.request({path:"/v1/payfit/chart",method:"GET",query:query,...params})};sobank={getExportsV1:(query,params={})=>this.http.request({path:"/v1/sobank/exports",method:"GET",query:query,format:"json",...params})};synchro={getRunStatsV1:(params={})=>this.http.request({path:"/v1/synchro/run/stats",method:"GET",format:"json",...params}),getTasksV1:(query,params={})=>this.http.request({path:"/v1/synchro/tasks",method:"GET",query:query,format:"json",...params}),getJobsDefaultsV1:(params={})=>this.http.request({path:"/v1/synchro/jobs/defaults",method:"GET",format:"json",...params}),putStopTaskV1:({id,...query},params={})=>this.http.request({path:`/v1/synchro/tasks/stop/${id}`,method:"PUT",...params}),resetOwnerStatsV1:({owner,value,...query},params={})=>this.http.request({path:`/v1/synchro/run/stats/${owner}/${value}`,method:"PUT",...params})}}},7936:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{$:()=>AppConfigProvider,M:()=>useAppConfig});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(3106);const AppConfigCtx=(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);const AppConfigProvider=AppConfigCtx.Provider;function useAppConfig(){const config=(0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(AppConfigCtx);if(!config)throw new Error("Called `useAppConfig` outside a `<AppConfigProvider />`");return config}},7034:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{C:()=>Providers});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5893);var _airporting_app_front__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1380);var _mantine_core__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(207);var _mantine_modals__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(4142);var _mantine_notifications__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(1455);var _tanstack_react_query__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(6197);var radash__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(9877);var _hooks_useAppConfig__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(7936);const theme=(0,_mantine_core__WEBPACK_IMPORTED_MODULE_2__.createTheme)((0,radash__WEBPACK_IMPORTED_MODULE_6__.assign)(_airporting_app_front__WEBPACK_IMPORTED_MODULE_1__.theme,{components:{}}));const cssVarResolver=x=>(0,radash__WEBPACK_IMPORTED_MODULE_6__.assign)(_airporting_app_front__WEBPACK_IMPORTED_MODULE_1__.cssVarResolver(x),{dark:{},light:{},variables:{}});function Providers(props){const{children,config,mantine,tanstack}=props;return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_hooks_useAppConfig__WEBPACK_IMPORTED_MODULE_7__.$,{value:config,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tanstack_react_query__WEBPACK_IMPORTED_MODULE_5__.QueryClientProvider,{client:tanstack?.queryClient??new _tanstack_react_query__WEBPACK_IMPORTED_MODULE_5__.QueryClient,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_2__.MantineProvider,{theme:theme,cssVariablesResolver:cssVarResolver,defaultColorScheme:mantine?.defaultColorScheme,forceColorScheme:mantine?.forceColorScheme,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_modals__WEBPACK_IMPORTED_MODULE_3__.ModalsProvider,{children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_notifications__WEBPACK_IMPORTED_MODULE_4__.Notifications,{}),children]})})})})}}}]);
|
|
10
|
+
*/var REACT_ELEMENT_TYPE=Symbol.for("react.transitional.element"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment");function jsxProd(type,config,maybeKey){var key=null;void 0!==maybeKey&&(key=""+maybeKey);void 0!==config.key&&(key=""+config.key);if("key"in config){maybeKey={};for(var propName in config)"key"!==propName&&(maybeKey[propName]=config[propName])}else maybeKey=config;config=maybeKey.ref;return{$$typeof:REACT_ELEMENT_TYPE,type:type,key:key,ref:void 0!==config?config:null,props:maybeKey}}exports.Fragment=REACT_FRAGMENT_TYPE;exports.jsx=jsxProd;exports.jsxs=jsxProd},5893:function(module,__unused_webpack_exports,__webpack_require__){module.exports=__webpack_require__(631)},4148:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{h:()=>useApi});var _src_gen_TechApi_index_ts__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(9056);var _src_hooks_useAppConfig_ts__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(7936);function useApi(){const config=(0,_src_hooks_useAppConfig_ts__WEBPACK_IMPORTED_MODULE_0__.M)();const client=new _src_gen_TechApi_index_ts__WEBPACK_IMPORTED_MODULE_1__.eN({baseUrl:config.api.replace(/\/$/,""),baseApiParams:{headers:{Authorization:config.token?`Bearer ${config.token}`:"",From:config.owner}}});return new _src_gen_TechApi_index_ts__WEBPACK_IMPORTED_MODULE_1__.eT(client)}},9056:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{eN:()=>HttpClient,eT:()=>TechApi});class HttpClient{baseUrl="";securityData=null;securityWorker;abortControllers=new Map;customFetch=(...fetchParams)=>fetch(...fetchParams);baseApiParams={credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"};constructor(apiConfig={}){Object.assign(this,apiConfig)}setSecurityData=data=>{this.securityData=data};encodeQueryParam(key,value){const encodedKey=encodeURIComponent(key);return`${encodedKey}=${encodeURIComponent("number"==typeof value?value:`${value}`)}`}addQueryParam(query,key){return this.encodeQueryParam(key,query[key])}addArrayQueryParam(query,key){const value=query[key];return value.map(v=>this.encodeQueryParam(key,v)).join("&")}toQueryString(rawQuery){const query=rawQuery||{};const keys=Object.keys(query).filter(key=>void 0!==query[key]);return keys.map(key=>Array.isArray(query[key])?this.addArrayQueryParam(query,key):this.addQueryParam(query,key)).join("&")}addQueryParams(rawQuery){const queryString=this.toQueryString(rawQuery);return queryString?`?${queryString}`:""}contentFormatters={["application/json"]:input=>null!==input&&("object"==typeof input||"string"==typeof input)?JSON.stringify(input):input,["application/vnd.api+json"]:input=>null!==input&&("object"==typeof input||"string"==typeof input)?JSON.stringify(input):input,["text/plain"]:input=>null!==input&&"string"!=typeof input?JSON.stringify(input):input,["multipart/form-data"]:input=>{if(input instanceof FormData)return input;return Object.keys(input||{}).reduce((formData,key)=>{const property=input[key];formData.append(key,property instanceof Blob?property:"object"==typeof property&&null!==property?JSON.stringify(property):`${property}`);return formData},new FormData)},["application/x-www-form-urlencoded"]:input=>this.toQueryString(input)};mergeRequestParams(params1,params2){return{...this.baseApiParams,...params1,...params2||{},headers:{...this.baseApiParams.headers||{},...params1.headers||{},...params2&¶ms2.headers||{}}}}createAbortSignal=cancelToken=>{if(this.abortControllers.has(cancelToken)){const abortController=this.abortControllers.get(cancelToken);if(abortController)return abortController.signal;return}const abortController=new AbortController;this.abortControllers.set(cancelToken,abortController);return abortController.signal};abortRequest=cancelToken=>{const abortController=this.abortControllers.get(cancelToken);if(abortController){abortController.abort();this.abortControllers.delete(cancelToken)}};request=async({body,secure,path,type,query,format,baseUrl,cancelToken,...params})=>{const secureParams=("boolean"==typeof secure?secure:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{};const requestParams=this.mergeRequestParams(params,secureParams);const queryString=query&&this.toQueryString(query);const payloadFormatter=this.contentFormatters[type||"application/json"];const responseFormat=format||requestParams.format;return this.customFetch(`${baseUrl||this.baseUrl||""}${path}${queryString?`?${queryString}`:""}`,{...requestParams,headers:{...requestParams.headers||{},...type&&"multipart/form-data"!==type?{"Content-Type":type}:{}},signal:(cancelToken?this.createAbortSignal(cancelToken):requestParams.signal)||null,body:null==body?null:payloadFormatter(body)}).then(async response=>{const r=response;r.data=null;r.error=null;const responseToParse=responseFormat?response.clone():response;const data=responseFormat?await responseToParse[responseFormat]().then(data=>{if(r.ok)r.data=data;else r.error=data;return r}).catch(e=>{r.error=e;return r}):r;if(cancelToken)this.abortControllers.delete(cancelToken);if(!response.ok)throw data;return data})}}class TechApi{http;constructor(http){this.http=http}status=(params={})=>this.http.request({path:"/status",method:"GET",...params});getDashboard=(params={})=>this.http.request({path:"/dashboard",method:"GET",format:"json",...params});getScrapers=(params={})=>this.http.request({path:"/scrapers",method:"GET",format:"json",...params});getCompanies=(params={})=>this.http.request({path:"/companies",method:"GET",format:"json",...params});webhook={postSmsWebhook:(query,params={})=>this.http.request({path:"/sms/webhook",method:"POST",query:query,...params})};amex={getTransactionsV1:(query,params={})=>this.http.request({path:"/v1/amex/transactions",method:"GET",query:query,...params})};etatSaisie={getLatestV1:(params={})=>this.http.request({path:"/v1/etat-saisie/latest",method:"GET",format:"json",...params}),getDossiersV1:(params={})=>this.http.request({path:"/v1/etat-saisie/dossiers",method:"GET",format:"json",...params}),setManagedV1:({id,...query},data,params={})=>this.http.request({path:`/v1/etat-saisie/dossiers/${id}`,method:"PATCH",body:data,type:"application/json",format:"json",...params}),setResponsableV1:({id,...query},data,params={})=>this.http.request({path:`/v1/etat-saisie/dossiers/${id}/responsable`,method:"PATCH",body:data,type:"application/json",format:"json",...params}),recomputeV1:(params={})=>this.http.request({path:"/v1/etat-saisie/recompute",method:"POST",format:"json",...params})};sales={listLeadsV1:(params={})=>this.http.request({path:"/v1/sales/leads",method:"GET",format:"json",...params}),createLeadV1:(data,params={})=>this.http.request({path:"/v1/sales/leads",method:"POST",body:data,type:"application/json",format:"json",...params}),getLeadV1:({id,...query},params={})=>this.http.request({path:`/v1/sales/leads/${id}`,method:"GET",format:"json",...params}),updateLeadV1:({id,...query},data,params={})=>this.http.request({path:`/v1/sales/leads/${id}`,method:"PATCH",body:data,type:"application/json",format:"json",...params}),deleteLeadV1:({id,...query},params={})=>this.http.request({path:`/v1/sales/leads/${id}`,method:"DELETE",format:"json",...params}),reconstructV1:({id,...query},params={})=>this.http.request({path:`/v1/sales/leads/${id}/reconstruct`,method:"POST",format:"json",...params}),rescanV1:(params={})=>this.http.request({path:"/v1/sales/rescan",method:"POST",format:"json",...params})};financeJobs={getStockV1:(params={})=>this.http.request({path:"/v1/finance-jobs/stock",method:"GET",format:"json",...params}),listTasksV1:(query,params={})=>this.http.request({path:"/v1/finance-jobs/tasks",method:"GET",query:query,format:"json",...params}),unstickV1:({id,...query},params={})=>this.http.request({path:`/v1/finance-jobs/tasks/${id}/unstick`,method:"POST",format:"json",...params}),retryV1:({id,...query},params={})=>this.http.request({path:`/v1/finance-jobs/tasks/${id}/retry`,method:"POST",format:"json",...params}),discardV1:({id,...query},params={})=>this.http.request({path:`/v1/finance-jobs/tasks/${id}/discard`,method:"POST",format:"json",...params}),setOwnerV1:({id,...query},data,params={})=>this.http.request({path:`/v1/finance-jobs/tasks/${id}/owner`,method:"PUT",body:data,type:"application/json",format:"json",...params}),deleteRedisLockV1:({id,...query},params={})=>this.http.request({path:`/v1/finance-jobs/tasks/${id}/redis-lock`,method:"DELETE",format:"json",...params}),runRecipeV1:(data,params={})=>this.http.request({path:"/v1/finance-jobs/run-recipe",method:"POST",body:data,type:"application/json",format:"json",...params}),getRunnersV1:(params={})=>this.http.request({path:"/v1/finance-jobs/runners",method:"GET",format:"json",...params})};github={getJobsRunnersV1:(params={})=>this.http.request({path:"/v1/github/jobs/runners",method:"GET",format:"json",...params}),getLabelsV1:({host,...query},params={})=>this.http.request({path:`/v1/github/labels/${host}`,method:"GET",format:"json",...params}),getJobLogsV1:(query,params={})=>this.http.request({path:"/v1/github/job-logs",method:"GET",query:query,format:"json",...params})};gsheet={getStockV1:(params={})=>this.http.request({path:"/v1/gsheet/stock",method:"GET",format:"json",...params}),listTasksV1:(query,params={})=>this.http.request({path:"/v1/gsheet/tasks",method:"GET",query:query,format:"json",...params}),unstickV1:({id,...query},params={})=>this.http.request({path:`/v1/gsheet/tasks/${id}/unstick`,method:"POST",format:"json",...params}),discardV1:({id,...query},params={})=>this.http.request({path:`/v1/gsheet/tasks/${id}/discard`,method:"POST",format:"json",...params}),setOwnerV1:({id,...query},data,params={})=>this.http.request({path:`/v1/gsheet/tasks/${id}/owner`,method:"PUT",body:data,type:"application/json",format:"json",...params}),deleteRedisLockV1:({id,...query},params={})=>this.http.request({path:`/v1/gsheet/tasks/${id}/redis-lock`,method:"DELETE",format:"json",...params})};notion={getKikouV1:(params={})=>this.http.request({path:"/v1/notion/kikou",method:"GET",format:"json",...params})};payfit={getChartV1:(query,params={})=>this.http.request({path:"/v1/payfit/chart",method:"GET",query:query,...params})};sobank={getExportsV1:(query,params={})=>this.http.request({path:"/v1/sobank/exports",method:"GET",query:query,format:"json",...params})};synchro={getRunStatsV1:(params={})=>this.http.request({path:"/v1/synchro/run/stats",method:"GET",format:"json",...params}),getTasksV1:(query,params={})=>this.http.request({path:"/v1/synchro/tasks",method:"GET",query:query,format:"json",...params}),getJobsDefaultsV1:(params={})=>this.http.request({path:"/v1/synchro/jobs/defaults",method:"GET",format:"json",...params}),putStopTaskV1:({id,...query},params={})=>this.http.request({path:`/v1/synchro/tasks/stop/${id}`,method:"PUT",...params}),resetOwnerStatsV1:({owner,value,...query},params={})=>this.http.request({path:`/v1/synchro/run/stats/${owner}/${value}`,method:"PUT",...params})}}},7936:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{$:()=>AppConfigProvider,M:()=>useAppConfig});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(3106);const AppConfigCtx=(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);const AppConfigProvider=AppConfigCtx.Provider;function useAppConfig(){const config=(0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(AppConfigCtx);if(!config)throw new Error("Called `useAppConfig` outside a `<AppConfigProvider />`");return config}},7034:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{C:()=>Providers});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5893);var _airporting_app_front__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1380);var _mantine_core__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(207);var _mantine_modals__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(4142);var _mantine_notifications__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(1455);var _tanstack_react_query__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(6197);var radash__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(9877);var _hooks_useAppConfig__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(7936);const theme=(0,_mantine_core__WEBPACK_IMPORTED_MODULE_2__.createTheme)((0,radash__WEBPACK_IMPORTED_MODULE_6__.assign)(_airporting_app_front__WEBPACK_IMPORTED_MODULE_1__.theme,{components:{}}));const cssVarResolver=x=>(0,radash__WEBPACK_IMPORTED_MODULE_6__.assign)(_airporting_app_front__WEBPACK_IMPORTED_MODULE_1__.cssVarResolver(x),{dark:{},light:{},variables:{}});function Providers(props){const{children,config,mantine,tanstack}=props;return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_hooks_useAppConfig__WEBPACK_IMPORTED_MODULE_7__.$,{value:config,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tanstack_react_query__WEBPACK_IMPORTED_MODULE_5__.QueryClientProvider,{client:tanstack?.queryClient??new _tanstack_react_query__WEBPACK_IMPORTED_MODULE_5__.QueryClient,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_2__.MantineProvider,{theme:theme,cssVariablesResolver:cssVarResolver,defaultColorScheme:mantine?.defaultColorScheme,forceColorScheme:mantine?.forceColorScheme,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_modals__WEBPACK_IMPORTED_MODULE_3__.ModalsProvider,{children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_notifications__WEBPACK_IMPORTED_MODULE_4__.Notifications,{}),children]})})})})}}}]);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type CreateLeadPayload = {
|
|
2
|
+
first_name?: string | null;
|
|
3
|
+
last_name?: string | null;
|
|
4
|
+
company?: string | null;
|
|
5
|
+
emails?: string[];
|
|
6
|
+
phones?: string[];
|
|
7
|
+
note?: string | null;
|
|
8
|
+
next_action_due_at?: string | null;
|
|
9
|
+
temperature?: string;
|
|
10
|
+
request_reconstruction?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare function useCreateLead(): import("@tanstack/react-query").UseMutationResult<{
|
|
13
|
+
id: number;
|
|
14
|
+
attached: boolean;
|
|
15
|
+
}, any, CreateLeadPayload, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useScrapersQuery(): import("@tanstack/react-query").UseQueryResult<import("../../gen/TechApi").GetScrapersResponse, Error>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ScraperItem, ScraperPennylane } from './types.ts';
|
|
2
|
+
type ScraperCardProps = {
|
|
3
|
+
scraper: ScraperItem;
|
|
4
|
+
onClick: () => void;
|
|
5
|
+
};
|
|
6
|
+
export declare function ScraperCard({ scraper, onClick }: ScraperCardProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
type PennylaneCardProps = {
|
|
8
|
+
pennylane: ScraperPennylane;
|
|
9
|
+
};
|
|
10
|
+
export declare function PennylaneCard({ pennylane }: PennylaneCardProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ScrapersApp(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,6 +7,21 @@ export interface CompanyItem {
|
|
|
7
7
|
display_name: string | null;
|
|
8
8
|
id: number;
|
|
9
9
|
}
|
|
10
|
+
export interface CreateSalesLeadBody {
|
|
11
|
+
company?: string | null;
|
|
12
|
+
emails?: string[];
|
|
13
|
+
first_name?: string | null;
|
|
14
|
+
last_name?: string | null;
|
|
15
|
+
next_action_due_at?: string | null;
|
|
16
|
+
note?: string | null;
|
|
17
|
+
phones?: string[];
|
|
18
|
+
request_reconstruction?: boolean;
|
|
19
|
+
temperature?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface CreateSalesLeadResponse {
|
|
22
|
+
attached: boolean;
|
|
23
|
+
id: number;
|
|
24
|
+
}
|
|
10
25
|
export interface DeleteFinanceJobsRedisLockResponse {
|
|
11
26
|
existed: boolean;
|
|
12
27
|
key: string;
|
|
@@ -346,6 +361,10 @@ export interface GetSalesLeadResponse {
|
|
|
346
361
|
export interface GetSalesLeadsResponse {
|
|
347
362
|
leads: SalesLeadListItem[];
|
|
348
363
|
}
|
|
364
|
+
export interface GetScrapersResponse {
|
|
365
|
+
pennylane: ScraperPennylane;
|
|
366
|
+
scrapers: ScraperItem[];
|
|
367
|
+
}
|
|
349
368
|
export interface GetSynchroDashboardResponse {
|
|
350
369
|
askedToday: number;
|
|
351
370
|
errorsToday: number;
|
|
@@ -471,6 +490,9 @@ export interface RecomputeEtatSaisieResponse {
|
|
|
471
490
|
message: string;
|
|
472
491
|
ok: boolean;
|
|
473
492
|
}
|
|
493
|
+
export interface ReconstructV1Params {
|
|
494
|
+
id: number;
|
|
495
|
+
}
|
|
474
496
|
export interface RescanResponse {
|
|
475
497
|
message: string;
|
|
476
498
|
ok: boolean;
|
|
@@ -516,6 +538,24 @@ export interface SalesLeadListItem {
|
|
|
516
538
|
next_action_due_at: string | null;
|
|
517
539
|
temperature: string;
|
|
518
540
|
}
|
|
541
|
+
export interface ScraperConnectorItem {
|
|
542
|
+
client: string | null;
|
|
543
|
+
connector: string;
|
|
544
|
+
isTooOld: boolean;
|
|
545
|
+
lastDataDate: string | null;
|
|
546
|
+
}
|
|
547
|
+
export interface ScraperItem {
|
|
548
|
+
connectors: ScraperConnectorItem[];
|
|
549
|
+
isTooOld: boolean;
|
|
550
|
+
key: string;
|
|
551
|
+
label: string;
|
|
552
|
+
lastDataDate: string | null;
|
|
553
|
+
logoDomain: string | null;
|
|
554
|
+
}
|
|
555
|
+
export interface ScraperPennylane {
|
|
556
|
+
isTooOld: boolean;
|
|
557
|
+
lastTime: string;
|
|
558
|
+
}
|
|
519
559
|
export interface SetFinanceJobsOwnerBody {
|
|
520
560
|
owner: string;
|
|
521
561
|
}
|
|
@@ -736,6 +776,22 @@ export declare namespace Sales {
|
|
|
736
776
|
type RequestHeaders = {};
|
|
737
777
|
type ResponseBody = GetSalesLeadsResponse;
|
|
738
778
|
}
|
|
779
|
+
/**
|
|
780
|
+
* No description
|
|
781
|
+
* @tags Sales
|
|
782
|
+
* @name CreateLeadV1
|
|
783
|
+
* @request POST:/v1/sales/leads
|
|
784
|
+
* @response `201` `CreateSalesLeadResponse`
|
|
785
|
+
*/
|
|
786
|
+
namespace CreateLeadV1 {
|
|
787
|
+
type RequestParams = {};
|
|
788
|
+
type RequestQuery = {};
|
|
789
|
+
type RequestBody = CreateSalesLeadBody;
|
|
790
|
+
type RequestHeaders = {
|
|
791
|
+
from: string;
|
|
792
|
+
};
|
|
793
|
+
type ResponseBody = CreateSalesLeadResponse;
|
|
794
|
+
}
|
|
739
795
|
/**
|
|
740
796
|
* No description
|
|
741
797
|
* @tags Sales
|
|
@@ -788,6 +844,22 @@ export declare namespace Sales {
|
|
|
788
844
|
};
|
|
789
845
|
type ResponseBody = OkResponse;
|
|
790
846
|
}
|
|
847
|
+
/**
|
|
848
|
+
* No description
|
|
849
|
+
* @tags Sales
|
|
850
|
+
* @name ReconstructV1
|
|
851
|
+
* @request POST:/v1/sales/leads/{id}/reconstruct
|
|
852
|
+
* @response `201` `OkResponse`
|
|
853
|
+
*/
|
|
854
|
+
namespace ReconstructV1 {
|
|
855
|
+
type RequestParams = {
|
|
856
|
+
id: number;
|
|
857
|
+
};
|
|
858
|
+
type RequestQuery = {};
|
|
859
|
+
type RequestBody = never;
|
|
860
|
+
type RequestHeaders = {};
|
|
861
|
+
type ResponseBody = OkResponse;
|
|
862
|
+
}
|
|
791
863
|
/**
|
|
792
864
|
* No description
|
|
793
865
|
* @tags Sales
|
|
@@ -1328,6 +1400,15 @@ export declare class TechApi<SecurityDataType extends unknown> {
|
|
|
1328
1400
|
* @response `200` `GetDashboardResponse`
|
|
1329
1401
|
*/
|
|
1330
1402
|
getDashboard: (params?: RequestParams) => Promise<HttpResponse<GetDashboardResponse, any>>;
|
|
1403
|
+
/**
|
|
1404
|
+
* No description
|
|
1405
|
+
*
|
|
1406
|
+
* @tags App
|
|
1407
|
+
* @name GetScrapers
|
|
1408
|
+
* @request GET:/scrapers
|
|
1409
|
+
* @response `200` `GetScrapersResponse`
|
|
1410
|
+
*/
|
|
1411
|
+
getScrapers: (params?: RequestParams) => Promise<HttpResponse<GetScrapersResponse, any>>;
|
|
1331
1412
|
/**
|
|
1332
1413
|
* No description
|
|
1333
1414
|
*
|
|
@@ -1416,6 +1497,15 @@ export declare class TechApi<SecurityDataType extends unknown> {
|
|
|
1416
1497
|
* @response `200` `GetSalesLeadsResponse`
|
|
1417
1498
|
*/
|
|
1418
1499
|
listLeadsV1: (params?: RequestParams) => Promise<HttpResponse<GetSalesLeadsResponse, any>>;
|
|
1500
|
+
/**
|
|
1501
|
+
* No description
|
|
1502
|
+
*
|
|
1503
|
+
* @tags Sales
|
|
1504
|
+
* @name CreateLeadV1
|
|
1505
|
+
* @request POST:/v1/sales/leads
|
|
1506
|
+
* @response `201` `CreateSalesLeadResponse`
|
|
1507
|
+
*/
|
|
1508
|
+
createLeadV1: (data: CreateSalesLeadBody, params?: RequestParams) => Promise<HttpResponse<CreateSalesLeadResponse, any>>;
|
|
1419
1509
|
/**
|
|
1420
1510
|
* No description
|
|
1421
1511
|
*
|
|
@@ -1443,6 +1533,15 @@ export declare class TechApi<SecurityDataType extends unknown> {
|
|
|
1443
1533
|
* @response `200` `OkResponse`
|
|
1444
1534
|
*/
|
|
1445
1535
|
deleteLeadV1: ({ id, ...query }: DeleteLeadV1Params, params?: RequestParams) => Promise<HttpResponse<OkResponse, any>>;
|
|
1536
|
+
/**
|
|
1537
|
+
* No description
|
|
1538
|
+
*
|
|
1539
|
+
* @tags Sales
|
|
1540
|
+
* @name ReconstructV1
|
|
1541
|
+
* @request POST:/v1/sales/leads/{id}/reconstruct
|
|
1542
|
+
* @response `201` `OkResponse`
|
|
1543
|
+
*/
|
|
1544
|
+
reconstructV1: ({ id, ...query }: ReconstructV1Params, params?: RequestParams) => Promise<HttpResponse<OkResponse, any>>;
|
|
1446
1545
|
/**
|
|
1447
1546
|
* No description
|
|
1448
1547
|
*
|
package/dist/mf/@mf-types.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
export type RemoteKeys = 'REMOTE_ALIAS_IDENTIFIER/amex' | 'REMOTE_ALIAS_IDENTIFIER/bnpp' | 'REMOTE_ALIAS_IDENTIFIER/credmut' | 'REMOTE_ALIAS_IDENTIFIER/dashboard' | 'REMOTE_ALIAS_IDENTIFIER/etat-saisie' | 'REMOTE_ALIAS_IDENTIFIER/finance-jobs' | 'REMOTE_ALIAS_IDENTIFIER/github' | 'REMOTE_ALIAS_IDENTIFIER/payfit' | 'REMOTE_ALIAS_IDENTIFIER/sales' | 'REMOTE_ALIAS_IDENTIFIER/sobank' | 'REMOTE_ALIAS_IDENTIFIER/spendesk' | 'REMOTE_ALIAS_IDENTIFIER/spreadsheet' | 'REMOTE_ALIAS_IDENTIFIER/synchro' | 'REMOTE_ALIAS_IDENTIFIER/wise';
|
|
3
|
-
type PackageType<T> = T extends 'REMOTE_ALIAS_IDENTIFIER/wise' ? typeof import('REMOTE_ALIAS_IDENTIFIER/wise') :T extends 'REMOTE_ALIAS_IDENTIFIER/synchro' ? typeof import('REMOTE_ALIAS_IDENTIFIER/synchro') :T extends 'REMOTE_ALIAS_IDENTIFIER/spreadsheet' ? typeof import('REMOTE_ALIAS_IDENTIFIER/spreadsheet') :T extends 'REMOTE_ALIAS_IDENTIFIER/spendesk' ? typeof import('REMOTE_ALIAS_IDENTIFIER/spendesk') :T extends 'REMOTE_ALIAS_IDENTIFIER/sobank' ? typeof import('REMOTE_ALIAS_IDENTIFIER/sobank') :T extends 'REMOTE_ALIAS_IDENTIFIER/sales' ? typeof import('REMOTE_ALIAS_IDENTIFIER/sales') :T extends 'REMOTE_ALIAS_IDENTIFIER/payfit' ? typeof import('REMOTE_ALIAS_IDENTIFIER/payfit') :T extends 'REMOTE_ALIAS_IDENTIFIER/github' ? typeof import('REMOTE_ALIAS_IDENTIFIER/github') :T extends 'REMOTE_ALIAS_IDENTIFIER/finance-jobs' ? typeof import('REMOTE_ALIAS_IDENTIFIER/finance-jobs') :T extends 'REMOTE_ALIAS_IDENTIFIER/etat-saisie' ? typeof import('REMOTE_ALIAS_IDENTIFIER/etat-saisie') :T extends 'REMOTE_ALIAS_IDENTIFIER/dashboard' ? typeof import('REMOTE_ALIAS_IDENTIFIER/dashboard') :T extends 'REMOTE_ALIAS_IDENTIFIER/credmut' ? typeof import('REMOTE_ALIAS_IDENTIFIER/credmut') :T extends 'REMOTE_ALIAS_IDENTIFIER/bnpp' ? typeof import('REMOTE_ALIAS_IDENTIFIER/bnpp') :T extends 'REMOTE_ALIAS_IDENTIFIER/amex' ? typeof import('REMOTE_ALIAS_IDENTIFIER/amex') :any;
|
|
2
|
+
export type RemoteKeys = 'REMOTE_ALIAS_IDENTIFIER/amex' | 'REMOTE_ALIAS_IDENTIFIER/bnpp' | 'REMOTE_ALIAS_IDENTIFIER/credmut' | 'REMOTE_ALIAS_IDENTIFIER/dashboard' | 'REMOTE_ALIAS_IDENTIFIER/etat-saisie' | 'REMOTE_ALIAS_IDENTIFIER/finance-jobs' | 'REMOTE_ALIAS_IDENTIFIER/github' | 'REMOTE_ALIAS_IDENTIFIER/payfit' | 'REMOTE_ALIAS_IDENTIFIER/sales' | 'REMOTE_ALIAS_IDENTIFIER/scrapers' | 'REMOTE_ALIAS_IDENTIFIER/sobank' | 'REMOTE_ALIAS_IDENTIFIER/spendesk' | 'REMOTE_ALIAS_IDENTIFIER/spreadsheet' | 'REMOTE_ALIAS_IDENTIFIER/synchro' | 'REMOTE_ALIAS_IDENTIFIER/wise';
|
|
3
|
+
type PackageType<T> = T extends 'REMOTE_ALIAS_IDENTIFIER/wise' ? typeof import('REMOTE_ALIAS_IDENTIFIER/wise') :T extends 'REMOTE_ALIAS_IDENTIFIER/synchro' ? typeof import('REMOTE_ALIAS_IDENTIFIER/synchro') :T extends 'REMOTE_ALIAS_IDENTIFIER/spreadsheet' ? typeof import('REMOTE_ALIAS_IDENTIFIER/spreadsheet') :T extends 'REMOTE_ALIAS_IDENTIFIER/spendesk' ? typeof import('REMOTE_ALIAS_IDENTIFIER/spendesk') :T extends 'REMOTE_ALIAS_IDENTIFIER/sobank' ? typeof import('REMOTE_ALIAS_IDENTIFIER/sobank') :T extends 'REMOTE_ALIAS_IDENTIFIER/scrapers' ? typeof import('REMOTE_ALIAS_IDENTIFIER/scrapers') :T extends 'REMOTE_ALIAS_IDENTIFIER/sales' ? typeof import('REMOTE_ALIAS_IDENTIFIER/sales') :T extends 'REMOTE_ALIAS_IDENTIFIER/payfit' ? typeof import('REMOTE_ALIAS_IDENTIFIER/payfit') :T extends 'REMOTE_ALIAS_IDENTIFIER/github' ? typeof import('REMOTE_ALIAS_IDENTIFIER/github') :T extends 'REMOTE_ALIAS_IDENTIFIER/finance-jobs' ? typeof import('REMOTE_ALIAS_IDENTIFIER/finance-jobs') :T extends 'REMOTE_ALIAS_IDENTIFIER/etat-saisie' ? typeof import('REMOTE_ALIAS_IDENTIFIER/etat-saisie') :T extends 'REMOTE_ALIAS_IDENTIFIER/dashboard' ? typeof import('REMOTE_ALIAS_IDENTIFIER/dashboard') :T extends 'REMOTE_ALIAS_IDENTIFIER/credmut' ? typeof import('REMOTE_ALIAS_IDENTIFIER/credmut') :T extends 'REMOTE_ALIAS_IDENTIFIER/bnpp' ? typeof import('REMOTE_ALIAS_IDENTIFIER/bnpp') :T extends 'REMOTE_ALIAS_IDENTIFIER/amex' ? typeof import('REMOTE_ALIAS_IDENTIFIER/amex') :any;
|
package/dist/mf/@mf-types.zip
CHANGED
|
Binary file
|