@airporting/integrations-app 0.4.178 → 0.4.179
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/2070.css +73 -73
- package/dist/mf/{5464.js → 3835.js} +1 -1
- package/dist/mf/5731.js +1 -1
- package/dist/mf/5741.js +1 -1
- package/dist/mf/8305.js +1 -1
- package/dist/mf/@mf-types/compiled-types/api/puzzle/puzzleOauthStartMutation.d.ts +4 -0
- package/dist/mf/@mf-types/compiled-types/api/puzzle/puzzleOauthStatusQuery.d.ts +3 -0
- package/dist/mf/@mf-types/compiled-types/components/puzzle/PuzzleOauthPanel.d.ts +1 -0
- package/dist/mf/@mf-types/compiled-types/components/puzzle/usePuzzleOauthPopup.d.ts +15 -0
- package/dist/mf/@mf-types/compiled-types/gen/IntegrationsApi.d.ts +148 -0
- package/dist/mf/__federation_expose_single_connector.js +1 -1
- package/dist/mf/index.js +3 -3
- package/dist/mf/integrations_app.js +3 -3
- package/dist/mf/mf-manifest.json +3 -3
- package/dist/mf/mf-stats.json +11 -11
- package/package.json +1 -1
package/dist/mf/8305.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis["chunk_integrations_app"]=globalThis["chunk_integrations_app"]||[]).push([["8305"],{4184:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{q:()=>ConnectorBubble});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4848);var _mantine_core__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(2773);var _tabler_icons_react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(5200);var _src_utils_connectorLogoUrl_ts__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(1034);var react_i18next__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(6155);function ConnectorBubble({connector,rename}){const{t}=(0,react_i18next__WEBPACK_IMPORTED_MODULE_4__.useTranslation)();const{colorScheme}=(0,_mantine_core__WEBPACK_IMPORTED_MODULE_1__.useMantineColorScheme)();const bg="dark"===colorScheme?"white":"dark";const logoUrl=(0,_src_utils_connectorLogoUrl_ts__WEBPACK_IMPORTED_MODULE_3__.U)(connector.main_connectorlist);return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Card,{children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Stack,{children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Avatar,{src:logoUrl,size:64,radius:"md",bg:bg,color:"dark"===colorScheme?"black":"white",p:18}),rename?rename.editing?/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{gap:"xs",wrap:"nowrap",children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.TextInput,{value:rename.draft,onChange:e=>rename.onDraftChange(e.currentTarget.value),autoFocus:true,onKeyDown:e=>{if("Enter"===e.key)rename.onSave();if("Escape"===e.key)rename.onCancel()},style:{flex:1}}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.ActionIcon,{onClick:rename.onSave,"aria-label":t("Sauvegarder"),loading:rename.isPending,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tabler_icons_react__WEBPACK_IMPORTED_MODULE_2__.IconCheck,{size:16})}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.ActionIcon,{onClick:rename.onCancel,"aria-label":t("Annuler"),variant:"subtle",children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tabler_icons_react__WEBPACK_IMPORTED_MODULE_2__.IconX,{size:16})})]}):/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{gap:"xs",wrap:"nowrap",children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Title,{w:"fit-content",order:3,children:connector.name}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.ActionIcon,{onClick:rename.onStartEditing,"aria-label":t("Renommer"),variant:"subtle",children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tabler_icons_react__WEBPACK_IMPORTED_MODULE_2__.IconPencil,{size:16})})]}):/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Title,{w:"fit-content",order:3,children:connector.name}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Text,{c:"dimmed",size:"lg",lineClamp:3,children:connector.main_connectorlist.description_fr})]})})}},6699:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{Qq:()=>HttpClient,cM:()=>ContentType,qx:()=>IntegrationsApi});var ContentType=/*#__PURE__*/function(ContentType){ContentType["Json"]="application/json";ContentType["JsonApi"]="application/vnd.api+json";ContentType["FormData"]="multipart/form-data";ContentType["UrlEncoded"]="application/x-www-form-urlencoded";ContentType["Text"]="text/plain";return ContentType}({});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 IntegrationsApi{http;constructor(http){this.http=http}status=(params={})=>this.http.request({path:"/status",method:"GET",...params});connectors={getStatsConnectorsV1:({cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/stats`,method:"GET",secure:true,format:"json",...params}),getConnectorsV1:({cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/ok`,method:"GET",secure:true,format:"json",...params}),getIllConnectorsV1:({cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/ill`,method:"GET",secure:true,format:"json",...params}),getCatalogConnectorsV1:({cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/catalog`,method:"GET",secure:true,format:"json",...params}),addConnectorV1:({cid,...query},data,params={})=>this.http.request({path:`/v1/connectors/${cid}/add`,method:"POST",body:data,secure:true,type:"application/json",format:"json",...params}),getConnectorConfigV1:({connector,cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/config/${connector}`,method:"GET",secure:true,format:"json",...params}),getConnectorSingleV1:({connector,cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/single/${connector}`,method:"GET",secure:true,format:"json",...params}),putConnectorDataV1:({connector,cid,...query},data,params={})=>this.http.request({path:`/v1/connectors/${cid}/data/${connector}`,method:"PUT",body:data,secure:true,type:"application/json",format:"json",...params}),refreshConnectorAccountsV1:({connector,cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/${connector}/refresh-accounts`,method:"POST",secure:true,format:"json",...params}),renameConnectorV1:({connector,cid,...query},data,params={})=>this.http.request({path:`/v1/connectors/${cid}/${connector}`,method:"PATCH",body:data,secure:true,type:"application/json",format:"json",...params}),deleteConnectorV1:({connector,cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/${connector}`,method:"DELETE",secure:true,format:"json",...params}),getConnectorHistoryV1:({connector,cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/${connector}/history`,method:"GET",secure:true,format:"json",...params}),getAuthSecretsV1:({connector,cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/${connector}/auth-secrets`,method:"GET",secure:true,format:"json",...params})};google={listGsheetFilesV1:({cid,...query},params={})=>this.http.request({path:`/v1/google/${cid}/gsheet/files`,method:"GET",secure:true,format:"json",...params}),deleteGsheetFileV1:({fileId,cid,...query},params={})=>this.http.request({path:`/v1/google/${cid}/gsheet/files/${fileId}`,method:"DELETE",secure:true,format:"json",...params})};microsoft={startAdminConsentV1:({cid,...query},params={})=>this.http.request({path:`/v1/microsoft/${cid}/admin-consent/start`,method:"GET",query:query,secure:true,format:"json",...params}),handleCallbackV1:(query,params={})=>this.http.request({path:"/v1/microsoft/admin-consent/callback",method:"GET",query:query,...params}),getTenantV1:({cid,...query},params={})=>this.http.request({path:`/v1/microsoft/${cid}/tenant`,method:"GET",secure:true,format:"json",...params}),resolveFileV1:({cid,...query},data,params={})=>this.http.request({path:`/v1/microsoft/${cid}/resolve-file`,method:"POST",body:data,secure:true,type:"application/json",format:"json",...params}),listExcelFilesV1:({cid,...query},params={})=>this.http.request({path:`/v1/microsoft/${cid}/excel/files`,method:"GET",secure:true,format:"json",...params}),addExcelFileV1:({cid,...query},data,params={})=>this.http.request({path:`/v1/microsoft/${cid}/excel/files`,method:"POST",body:data,secure:true,type:"application/json",format:"json",...params}),readExcelV1:({cid,...query},data,params={})=>this.http.request({path:`/v1/microsoft/${cid}/excel/read`,method:"POST",body:data,secure:true,type:"application/json",format:"json",...params}),deleteExcelFileV1:({fileId,cid,...query},params={})=>this.http.request({path:`/v1/microsoft/${cid}/excel/files/${fileId}`,method:"DELETE",secure:true,format:"json",...params})};pennylane={startOauthV1:({cid,...query},params={})=>this.http.request({path:`/v1/pennylane/${cid}/oauth/start`,method:"GET",query:query,secure:true,format:"json",...params}),getStatusV1:({cid,...query},params={})=>this.http.request({path:`/v1/pennylane/${cid}/oauth/status`,method:"GET",secure:true,format:"json",...params}),disconnectV1:({cid,...query},params={})=>this.http.request({path:`/v1/pennylane/${cid}/oauth`,method:"DELETE",secure:true,format:"json",...params}),getTokenV1:({cid,...query},params={})=>this.http.request({path:`/v1/pennylane/${cid}/oauth/token`,method:"GET",format:"json",...params}),handleCallbackV1:(query,params={})=>this.http.request({path:"/v1/pennylane/callback",method:"GET",query:query,...params})}}}}]);
|
|
1
|
+
"use strict";(globalThis["chunk_integrations_app"]=globalThis["chunk_integrations_app"]||[]).push([["8305"],{4184:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{q:()=>ConnectorBubble});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4848);var _mantine_core__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(2773);var _tabler_icons_react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(5200);var _src_utils_connectorLogoUrl_ts__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(1034);var react_i18next__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(6155);function ConnectorBubble({connector,rename}){const{t}=(0,react_i18next__WEBPACK_IMPORTED_MODULE_4__.useTranslation)();const{colorScheme}=(0,_mantine_core__WEBPACK_IMPORTED_MODULE_1__.useMantineColorScheme)();const bg="dark"===colorScheme?"white":"dark";const logoUrl=(0,_src_utils_connectorLogoUrl_ts__WEBPACK_IMPORTED_MODULE_3__.U)(connector.main_connectorlist);return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Card,{children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Stack,{children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Avatar,{src:logoUrl,size:64,radius:"md",bg:bg,color:"dark"===colorScheme?"black":"white",p:18}),rename?rename.editing?/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{gap:"xs",wrap:"nowrap",children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.TextInput,{value:rename.draft,onChange:e=>rename.onDraftChange(e.currentTarget.value),autoFocus:true,onKeyDown:e=>{if("Enter"===e.key)rename.onSave();if("Escape"===e.key)rename.onCancel()},style:{flex:1}}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.ActionIcon,{onClick:rename.onSave,"aria-label":t("Sauvegarder"),loading:rename.isPending,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tabler_icons_react__WEBPACK_IMPORTED_MODULE_2__.IconCheck,{size:16})}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.ActionIcon,{onClick:rename.onCancel,"aria-label":t("Annuler"),variant:"subtle",children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tabler_icons_react__WEBPACK_IMPORTED_MODULE_2__.IconX,{size:16})})]}):/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{gap:"xs",wrap:"nowrap",children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Title,{w:"fit-content",order:3,children:connector.name}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.ActionIcon,{onClick:rename.onStartEditing,"aria-label":t("Renommer"),variant:"subtle",children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tabler_icons_react__WEBPACK_IMPORTED_MODULE_2__.IconPencil,{size:16})})]}):/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Title,{w:"fit-content",order:3,children:connector.name}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Text,{c:"dimmed",size:"lg",lineClamp:3,children:connector.main_connectorlist.description_fr})]})})}},6699:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{Qq:()=>HttpClient,cM:()=>ContentType,qx:()=>IntegrationsApi});var ContentType=/*#__PURE__*/function(ContentType){ContentType["Json"]="application/json";ContentType["JsonApi"]="application/vnd.api+json";ContentType["FormData"]="multipart/form-data";ContentType["UrlEncoded"]="application/x-www-form-urlencoded";ContentType["Text"]="text/plain";return ContentType}({});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 IntegrationsApi{http;constructor(http){this.http=http}status=(params={})=>this.http.request({path:"/status",method:"GET",...params});connectors={getStatsConnectorsV1:({cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/stats`,method:"GET",secure:true,format:"json",...params}),getConnectorsV1:({cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/ok`,method:"GET",secure:true,format:"json",...params}),getIllConnectorsV1:({cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/ill`,method:"GET",secure:true,format:"json",...params}),getCatalogConnectorsV1:({cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/catalog`,method:"GET",secure:true,format:"json",...params}),addConnectorV1:({cid,...query},data,params={})=>this.http.request({path:`/v1/connectors/${cid}/add`,method:"POST",body:data,secure:true,type:"application/json",format:"json",...params}),getConnectorConfigV1:({connector,cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/config/${connector}`,method:"GET",secure:true,format:"json",...params}),getConnectorSingleV1:({connector,cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/single/${connector}`,method:"GET",secure:true,format:"json",...params}),putConnectorDataV1:({connector,cid,...query},data,params={})=>this.http.request({path:`/v1/connectors/${cid}/data/${connector}`,method:"PUT",body:data,secure:true,type:"application/json",format:"json",...params}),refreshConnectorAccountsV1:({connector,cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/${connector}/refresh-accounts`,method:"POST",secure:true,format:"json",...params}),renameConnectorV1:({connector,cid,...query},data,params={})=>this.http.request({path:`/v1/connectors/${cid}/${connector}`,method:"PATCH",body:data,secure:true,type:"application/json",format:"json",...params}),deleteConnectorV1:({connector,cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/${connector}`,method:"DELETE",secure:true,format:"json",...params}),getConnectorHistoryV1:({connector,cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/${connector}/history`,method:"GET",secure:true,format:"json",...params}),getAuthSecretsV1:({connector,cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/${connector}/auth-secrets`,method:"GET",secure:true,format:"json",...params})};google={listGsheetFilesV1:({cid,...query},params={})=>this.http.request({path:`/v1/google/${cid}/gsheet/files`,method:"GET",secure:true,format:"json",...params}),deleteGsheetFileV1:({fileId,cid,...query},params={})=>this.http.request({path:`/v1/google/${cid}/gsheet/files/${fileId}`,method:"DELETE",secure:true,format:"json",...params})};microsoft={startAdminConsentV1:({cid,...query},params={})=>this.http.request({path:`/v1/microsoft/${cid}/admin-consent/start`,method:"GET",query:query,secure:true,format:"json",...params}),handleCallbackV1:(query,params={})=>this.http.request({path:"/v1/microsoft/admin-consent/callback",method:"GET",query:query,...params}),getTenantV1:({cid,...query},params={})=>this.http.request({path:`/v1/microsoft/${cid}/tenant`,method:"GET",secure:true,format:"json",...params}),resolveFileV1:({cid,...query},data,params={})=>this.http.request({path:`/v1/microsoft/${cid}/resolve-file`,method:"POST",body:data,secure:true,type:"application/json",format:"json",...params}),listExcelFilesV1:({cid,...query},params={})=>this.http.request({path:`/v1/microsoft/${cid}/excel/files`,method:"GET",secure:true,format:"json",...params}),addExcelFileV1:({cid,...query},data,params={})=>this.http.request({path:`/v1/microsoft/${cid}/excel/files`,method:"POST",body:data,secure:true,type:"application/json",format:"json",...params}),readExcelV1:({cid,...query},data,params={})=>this.http.request({path:`/v1/microsoft/${cid}/excel/read`,method:"POST",body:data,secure:true,type:"application/json",format:"json",...params}),deleteExcelFileV1:({fileId,cid,...query},params={})=>this.http.request({path:`/v1/microsoft/${cid}/excel/files/${fileId}`,method:"DELETE",secure:true,format:"json",...params})};pennylane={startOauthV1:({cid,...query},params={})=>this.http.request({path:`/v1/pennylane/${cid}/oauth/start`,method:"GET",query:query,secure:true,format:"json",...params}),getStatusV1:({cid,...query},params={})=>this.http.request({path:`/v1/pennylane/${cid}/oauth/status`,method:"GET",secure:true,format:"json",...params}),disconnectV1:({cid,...query},params={})=>this.http.request({path:`/v1/pennylane/${cid}/oauth`,method:"DELETE",secure:true,format:"json",...params}),getTokenV1:({cid,...query},params={})=>this.http.request({path:`/v1/pennylane/${cid}/oauth/token`,method:"GET",format:"json",...params}),handleCallbackV1:(query,params={})=>this.http.request({path:"/v1/pennylane/callback",method:"GET",query:query,...params})};puzzle={startOauthV1:({cid,...query},params={})=>this.http.request({path:`/v1/puzzle/${cid}/oauth/start`,method:"GET",query:query,secure:true,format:"json",...params}),getStatusV1:({cid,...query},params={})=>this.http.request({path:`/v1/puzzle/${cid}/oauth/status`,method:"GET",secure:true,format:"json",...params}),getTokenV1:({cid,...query},params={})=>this.http.request({path:`/v1/puzzle/${cid}/oauth/token`,method:"GET",format:"json",...params}),handleCallbackV1:(query,params={})=>this.http.request({path:"/v1/puzzle/oauth/callback",method:"GET",query:query,...params})}}}}]);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { PuzzleOauthStatusResponse } from '@/src/gen/IntegrationsApi.ts';
|
|
2
|
+
export declare function puzzleOauthStatusQueryKey(company: string): string[];
|
|
3
|
+
export declare function usePuzzleOauthStatusQuery(): import("@tanstack/react-query").UseQueryResult<PuzzleOauthStatusResponse, Error>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function PuzzleOauthPanel(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type PuzzleOauthMessage = {
|
|
2
|
+
type: 'airporting-puzzle-oauth';
|
|
3
|
+
success: boolean;
|
|
4
|
+
puzzleCompanyName: string | null;
|
|
5
|
+
error: string | null;
|
|
6
|
+
errorDescription: string | null;
|
|
7
|
+
};
|
|
8
|
+
export declare function isTrustedPuzzleOauthEvent(event: MessageEvent): event is MessageEvent<PuzzleOauthMessage>;
|
|
9
|
+
export declare function usePuzzleOauthPopup({ onResult, }: {
|
|
10
|
+
onResult: (message: PuzzleOauthMessage) => void;
|
|
11
|
+
}): {
|
|
12
|
+
openPopup: (url: string) => Window;
|
|
13
|
+
closePopup: () => void;
|
|
14
|
+
isOpen: boolean;
|
|
15
|
+
};
|
|
@@ -225,12 +225,18 @@ export interface GetStatsConnectorsV1Params {
|
|
|
225
225
|
export interface GetStatusV1Params {
|
|
226
226
|
cid: string;
|
|
227
227
|
}
|
|
228
|
+
export interface GetStatusV1Params2 {
|
|
229
|
+
cid: string;
|
|
230
|
+
}
|
|
228
231
|
export interface GetTenantV1Params {
|
|
229
232
|
cid: string;
|
|
230
233
|
}
|
|
231
234
|
export interface GetTokenV1Params {
|
|
232
235
|
cid: string;
|
|
233
236
|
}
|
|
237
|
+
export interface GetTokenV1Params2 {
|
|
238
|
+
cid: string;
|
|
239
|
+
}
|
|
234
240
|
export interface GsheetFileItem {
|
|
235
241
|
/** @format date-time */
|
|
236
242
|
created: string;
|
|
@@ -255,6 +261,12 @@ export interface HandleCallbackV1Params2 {
|
|
|
255
261
|
error_description?: string;
|
|
256
262
|
state: string;
|
|
257
263
|
}
|
|
264
|
+
export interface HandleCallbackV1Params4 {
|
|
265
|
+
code?: string;
|
|
266
|
+
error?: string;
|
|
267
|
+
error_description?: string;
|
|
268
|
+
state: string;
|
|
269
|
+
}
|
|
258
270
|
export interface ListExcelFilesV1Params {
|
|
259
271
|
cid: string;
|
|
260
272
|
}
|
|
@@ -289,6 +301,23 @@ export interface PutConnectorDataV1Params {
|
|
|
289
301
|
cid: string;
|
|
290
302
|
connector: number;
|
|
291
303
|
}
|
|
304
|
+
export interface PuzzleOauthStartResponse {
|
|
305
|
+
url: string;
|
|
306
|
+
}
|
|
307
|
+
export interface PuzzleOauthStatusResponse {
|
|
308
|
+
accessTokenExpiresAt?: string;
|
|
309
|
+
connected: boolean;
|
|
310
|
+
puzzleCompanyId?: string;
|
|
311
|
+
puzzleCompanyName?: string;
|
|
312
|
+
puzzleCompanyStatus?: string;
|
|
313
|
+
scopes?: string[];
|
|
314
|
+
}
|
|
315
|
+
export interface PuzzleOauthTokenResponse {
|
|
316
|
+
accessToken: string;
|
|
317
|
+
baseUrl: string;
|
|
318
|
+
expiresAt: string;
|
|
319
|
+
puzzleCompanyId: string;
|
|
320
|
+
}
|
|
292
321
|
export interface ReadExcelRequest {
|
|
293
322
|
fileId: number;
|
|
294
323
|
range?: string;
|
|
@@ -334,6 +363,11 @@ export interface StartOauthV1Params {
|
|
|
334
363
|
/** @format uri */
|
|
335
364
|
returnTo: string;
|
|
336
365
|
}
|
|
366
|
+
export interface StartOauthV1Params2 {
|
|
367
|
+
cid: string;
|
|
368
|
+
/** @format uri */
|
|
369
|
+
returnTo: string;
|
|
370
|
+
}
|
|
337
371
|
export declare namespace Connectors {
|
|
338
372
|
/**
|
|
339
373
|
* No description
|
|
@@ -870,6 +904,80 @@ export declare namespace Pennylane {
|
|
|
870
904
|
type ResponseBody = void;
|
|
871
905
|
}
|
|
872
906
|
}
|
|
907
|
+
export declare namespace Puzzle {
|
|
908
|
+
/**
|
|
909
|
+
* No description
|
|
910
|
+
* @tags Puzzle
|
|
911
|
+
* @name StartOauthV1
|
|
912
|
+
* @request GET:/v1/puzzle/{cid}/oauth/start
|
|
913
|
+
* @secure
|
|
914
|
+
* @response `200` `PuzzleOauthStartResponse`
|
|
915
|
+
*/
|
|
916
|
+
namespace StartOauthV1 {
|
|
917
|
+
type RequestParams = {
|
|
918
|
+
cid: string;
|
|
919
|
+
};
|
|
920
|
+
type RequestQuery = {
|
|
921
|
+
/** @format uri */
|
|
922
|
+
returnTo: string;
|
|
923
|
+
};
|
|
924
|
+
type RequestBody = never;
|
|
925
|
+
type RequestHeaders = {};
|
|
926
|
+
type ResponseBody = PuzzleOauthStartResponse;
|
|
927
|
+
}
|
|
928
|
+
/**
|
|
929
|
+
* No description
|
|
930
|
+
* @tags Puzzle
|
|
931
|
+
* @name GetStatusV1
|
|
932
|
+
* @request GET:/v1/puzzle/{cid}/oauth/status
|
|
933
|
+
* @secure
|
|
934
|
+
* @response `200` `PuzzleOauthStatusResponse`
|
|
935
|
+
*/
|
|
936
|
+
namespace GetStatusV1 {
|
|
937
|
+
type RequestParams = {
|
|
938
|
+
cid: string;
|
|
939
|
+
};
|
|
940
|
+
type RequestQuery = {};
|
|
941
|
+
type RequestBody = never;
|
|
942
|
+
type RequestHeaders = {};
|
|
943
|
+
type ResponseBody = PuzzleOauthStatusResponse;
|
|
944
|
+
}
|
|
945
|
+
/**
|
|
946
|
+
* No description
|
|
947
|
+
* @tags Puzzle
|
|
948
|
+
* @name GetTokenV1
|
|
949
|
+
* @request GET:/v1/puzzle/{cid}/oauth/token
|
|
950
|
+
* @response `200` `PuzzleOauthTokenResponse`
|
|
951
|
+
*/
|
|
952
|
+
namespace GetTokenV1 {
|
|
953
|
+
type RequestParams = {
|
|
954
|
+
cid: string;
|
|
955
|
+
};
|
|
956
|
+
type RequestQuery = {};
|
|
957
|
+
type RequestBody = never;
|
|
958
|
+
type RequestHeaders = {};
|
|
959
|
+
type ResponseBody = PuzzleOauthTokenResponse;
|
|
960
|
+
}
|
|
961
|
+
/**
|
|
962
|
+
* No description
|
|
963
|
+
* @tags Puzzle
|
|
964
|
+
* @name HandleCallbackV1
|
|
965
|
+
* @request GET:/v1/puzzle/oauth/callback
|
|
966
|
+
* @response `200` `void`
|
|
967
|
+
*/
|
|
968
|
+
namespace HandleCallbackV1 {
|
|
969
|
+
type RequestParams = {};
|
|
970
|
+
type RequestQuery = {
|
|
971
|
+
code?: string;
|
|
972
|
+
error?: string;
|
|
973
|
+
error_description?: string;
|
|
974
|
+
state: string;
|
|
975
|
+
};
|
|
976
|
+
type RequestBody = never;
|
|
977
|
+
type RequestHeaders = {};
|
|
978
|
+
type ResponseBody = void;
|
|
979
|
+
}
|
|
980
|
+
}
|
|
873
981
|
export type QueryParamsType = Record<string | number, any>;
|
|
874
982
|
export type ResponseFormat = keyof Omit<Body, 'body' | 'bodyUsed'>;
|
|
875
983
|
export interface FullRequestParams extends Omit<RequestInit, 'body'> {
|
|
@@ -1264,5 +1372,45 @@ export declare class IntegrationsApi<SecurityDataType extends unknown> {
|
|
|
1264
1372
|
*/
|
|
1265
1373
|
handleCallbackV1: (query: HandleCallbackV1Params2, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
1266
1374
|
};
|
|
1375
|
+
puzzle: {
|
|
1376
|
+
/**
|
|
1377
|
+
* No description
|
|
1378
|
+
*
|
|
1379
|
+
* @tags Puzzle
|
|
1380
|
+
* @name StartOauthV1
|
|
1381
|
+
* @request GET:/v1/puzzle/{cid}/oauth/start
|
|
1382
|
+
* @secure
|
|
1383
|
+
* @response `200` `PuzzleOauthStartResponse`
|
|
1384
|
+
*/
|
|
1385
|
+
startOauthV1: ({ cid, ...query }: StartOauthV1Params2, params?: RequestParams) => Promise<HttpResponse<PuzzleOauthStartResponse, any>>;
|
|
1386
|
+
/**
|
|
1387
|
+
* No description
|
|
1388
|
+
*
|
|
1389
|
+
* @tags Puzzle
|
|
1390
|
+
* @name GetStatusV1
|
|
1391
|
+
* @request GET:/v1/puzzle/{cid}/oauth/status
|
|
1392
|
+
* @secure
|
|
1393
|
+
* @response `200` `PuzzleOauthStatusResponse`
|
|
1394
|
+
*/
|
|
1395
|
+
getStatusV1: ({ cid, ...query }: GetStatusV1Params2, params?: RequestParams) => Promise<HttpResponse<PuzzleOauthStatusResponse, any>>;
|
|
1396
|
+
/**
|
|
1397
|
+
* No description
|
|
1398
|
+
*
|
|
1399
|
+
* @tags Puzzle
|
|
1400
|
+
* @name GetTokenV1
|
|
1401
|
+
* @request GET:/v1/puzzle/{cid}/oauth/token
|
|
1402
|
+
* @response `200` `PuzzleOauthTokenResponse`
|
|
1403
|
+
*/
|
|
1404
|
+
getTokenV1: ({ cid, ...query }: GetTokenV1Params2, params?: RequestParams) => Promise<HttpResponse<PuzzleOauthTokenResponse, any>>;
|
|
1405
|
+
/**
|
|
1406
|
+
* No description
|
|
1407
|
+
*
|
|
1408
|
+
* @tags Puzzle
|
|
1409
|
+
* @name HandleCallbackV1
|
|
1410
|
+
* @request GET:/v1/puzzle/oauth/callback
|
|
1411
|
+
* @response `200` `void`
|
|
1412
|
+
*/
|
|
1413
|
+
handleCallbackV1: (query: HandleCallbackV1Params4, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
1414
|
+
};
|
|
1267
1415
|
}
|
|
1268
1416
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis["chunk_integrations_app"]=globalThis["chunk_integrations_app"]||[]).push([["4821"],{466:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{default:()=>SingleConnector});var jsx_runtime=__webpack_require__(4848);var index_js_=__webpack_require__(8556);var single_connector_app=__webpack_require__(
|
|
1
|
+
"use strict";(globalThis["chunk_integrations_app"]=globalThis["chunk_integrations_app"]||[]).push([["4821"],{466:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{default:()=>SingleConnector});var jsx_runtime=__webpack_require__(4848);var index_js_=__webpack_require__(8556);var single_connector_app=__webpack_require__(7638);var dist_index_js_=__webpack_require__(4259);var index_mjs_=__webpack_require__(2773);var esm_index_mjs_=__webpack_require__(4931);var modern_index_js_=__webpack_require__(7714);var dist_esm_index_mjs_=__webpack_require__(4449);var useAppConfigConnectorSingle=__webpack_require__(4613);const theme=(0,index_mjs_.createTheme)((0,dist_esm_index_mjs_.assign)(dist_index_js_.theme,{components:{}}));const cssVarResolver=x=>(0,dist_esm_index_mjs_.assign)(dist_index_js_.cssVarResolver(x),{dark:{},light:{},variables:{}});function ProvidersSingleConnector(props){const[queryClient]=(0,index_js_.useState)(()=>props.tanstack?.queryClient??new modern_index_js_.QueryClient);const{children,config,mantine,tanstack}=props;return/*#__PURE__*/(0,jsx_runtime.jsx)(useAppConfigConnectorSingle.a,{value:config,children:/*#__PURE__*/(0,jsx_runtime.jsx)(modern_index_js_.QueryClientProvider,{client:queryClient,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.MantineProvider,{theme:theme,cssVariablesResolver:cssVarResolver,defaultColorScheme:mantine?.defaultColorScheme,forceColorScheme:mantine?.forceColorScheme,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(esm_index_mjs_.Notifications,{}),/*#__PURE__*/(0,jsx_runtime.jsx)(dist_index_js_.RevealTokenProvider,{children:children})]})})})}var locales=__webpack_require__(108);(0,locales.o)();function SingleConnector(props){return/*#__PURE__*/(0,jsx_runtime.jsx)(index_js_.StrictMode,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(ProvidersSingleConnector,{...props,children:/*#__PURE__*/(0,jsx_runtime.jsx)(single_connector_app.d,{})})})}},4613:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{C:()=>useAppConfigConnectorSingle,a:()=>AppConfigConnectorSingleProvider});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(8556);const AppConfigCtx=/*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);const AppConfigConnectorSingleProvider=AppConfigCtx.Provider;function useAppConfigConnectorSingle(){const config=(0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(AppConfigCtx);if(!config)throw new Error("Called `useAppConfig` outside a `<AppConfigConnectorSingleProvider />`");return config}}}]);
|