@kizenapps/engine 1.0.0 → 1.2.0-70fc7c2
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/{ThirdPartyScript-DdrF7zh7.d.ts → ThirdPartyScript-SJ9auPZm.d.ts} +17 -2
- package/dist/{automation-C8hsM_Rc.d.ts → automation-V0iUhnR7.d.ts} +1 -1
- package/dist/{chunk-OHXEFX4X.js → chunk-6AELDX3G.js} +3 -3
- package/dist/{chunk-OHXEFX4X.js.map → chunk-6AELDX3G.js.map} +1 -1
- package/dist/{chunk-MP76PCSP.js → chunk-CL6AC3ZL.js} +3 -3
- package/dist/{chunk-MP76PCSP.js.map → chunk-CL6AC3ZL.js.map} +1 -1
- package/dist/{chunk-FMIHGD5U.js → chunk-DTAWTWVH.js} +5 -5
- package/dist/{chunk-FMIHGD5U.js.map → chunk-DTAWTWVH.js.map} +1 -1
- package/dist/{chunk-DB4LBOX2.js → chunk-GLMIG5QG.js} +3 -3
- package/dist/{chunk-DB4LBOX2.js.map → chunk-GLMIG5QG.js.map} +1 -1
- package/dist/{chunk-BCS2CR34.js → chunk-LGZ5VFMW.js} +4 -4
- package/dist/{chunk-BCS2CR34.js.map → chunk-LGZ5VFMW.js.map} +1 -1
- package/dist/{chunk-GE3CK7XD.js → chunk-PV247HYV.js} +3 -3
- package/dist/{chunk-GE3CK7XD.js.map → chunk-PV247HYV.js.map} +1 -1
- package/dist/{chunk-BCHHF3WE.js → chunk-PYBTDLGY.js} +3 -3
- package/dist/{chunk-BCHHF3WE.js.map → chunk-PYBTDLGY.js.map} +1 -1
- package/dist/{chunk-7SFYIX7E.js → chunk-VKMZQHVH.js} +5 -5
- package/dist/{chunk-7SFYIX7E.js.map → chunk-VKMZQHVH.js.map} +1 -1
- package/dist/{chunk-G35YBDYD.js → chunk-WWFCBKFR.js} +3 -3
- package/dist/{chunk-G35YBDYD.js.map → chunk-WWFCBKFR.js.map} +1 -1
- package/dist/communication.d.ts +2 -2
- package/dist/communication.js +2 -2
- package/dist/contexts/base.d.ts +1 -1
- package/dist/contexts/base.js +4 -4
- package/dist/contexts/floatingFrame.d.ts +1 -1
- package/dist/contexts/floatingFrame.js +5 -5
- package/dist/contexts/recordDetail.d.ts +1 -1
- package/dist/contexts/recordDetail.js +5 -5
- package/dist/{generic-RiEgdDAq.d.ts → generic-StPcwyG1.d.ts} +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.js +3 -3
- package/dist/react.d.ts +3 -3
- package/dist/react.js +5 -5
- package/dist/{routeScript-kttY2YZh.d.ts → routeScript-BsZNrggO.d.ts} +2 -2
- package/dist/types.d.ts +6 -6
- package/dist/util.d.ts +13 -4
- package/dist/util.js +56 -7
- package/dist/util.js.map +1 -1
- package/dist/workers/calendarSource.worker.js +6 -6
- package/dist/workers/floatingFrame.worker.js +7 -7
- package/dist/workers/generic.worker.js +6 -6
- package/dist/workers/recordDetail.worker.js +7 -7
- package/package.json +1 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ROUTE_CHANGE_INTERNAL_EVENT } from './chunk-
|
|
1
|
+
import { ROUTE_CHANGE_INTERNAL_EVENT } from './chunk-GLMIG5QG.js';
|
|
2
2
|
|
|
3
3
|
// src/util/run.ts
|
|
4
4
|
var getPartialLocation = () => {
|
|
@@ -117,5 +117,5 @@ var findMatchingAction = (availableActions, apiName) => {
|
|
|
117
117
|
};
|
|
118
118
|
|
|
119
119
|
export { emitRouteChange, findMatchingAction, generateExecutionKey, generateUUIDV4, getFn, getFnWithReturn, getPartialLocation };
|
|
120
|
-
//# sourceMappingURL=chunk-
|
|
121
|
-
//# sourceMappingURL=chunk-
|
|
120
|
+
//# sourceMappingURL=chunk-WWFCBKFR.js.map
|
|
121
|
+
//# sourceMappingURL=chunk-WWFCBKFR.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/util/run.ts"],"names":["action"],"mappings":";;;AAKO,IAAM,qBAAqB,MAAuB;AAC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AA;AAAmB;AAC/B,GACD,CAAA;AAED,EAAA,MAAA,CAAO,cAAc,KAAK,CAAA;AAC5B;AAEA,IAAM,kBAAA,GAAqB,CACzB,aAAA,KAC6E;AAC7E,EAAA,MAAM,CAAC,aAAA,EAAe,aAAa,CAAA,GAAI,aAAA,CAAc,MAAM,GAAG,CAAA;AAE9D,EAAA,OAAO;AAAA,IACL,aAAA;AAAA,IACA;AAAA,GACF;AACF,CAAA;AAEO,IAAM,kBAAA,GAAqB,CAChC,gBAAA,EAMA,OAAA,KACY;AACZ,EAAA,IAAI,CAAC,OAAA,EAAS;AACZ,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,MAAM,EAAE,aAAA,EAAe,aAAA,EAAc,GAAI,mBAAmB,OAAO,CAAA;AAEnE,EAAA,IAAI,CAAC,aAAA,EAAe;AAClB,IAAA,MAAMA,OAAAA,GAAS,gBAAA,CAAiB,IAAA,CAAK,CAAC,GAAA,KAAQ,CAAC,GAAA,CAAI,SAAA,IAAa,GAAA,CAAI,OAAA,KAAY,aAAa,CAAA;AAE7F,IAAA,OAAOA,OAAAA;AAAA,EACT;AAEA,EAAA,MAAM,SAAS,gBAAA,CAAiB,IAAA;AAAA,IAC9B,CAAC,GAAA,KAAQ,GAAA,CAAI,YAAY,aAAA,IAAiB,GAAA,CAAI,WAAW,OAAA,KAAY;AAAA,GACvE;AAEA,EAAA,OAAO,MAAA;AACT","file":"chunk-WWFCBKFR.js","sourcesContent":["import { ROUTE_CHANGE_INTERNAL_EVENT } from '../communication/constants.js';\nimport type { PartialLocation } from '../types/common.js';\nimport type { CommonExecutionPlugin, CommonPluginDefinition } from '../types/run.js';\nimport type { AsyncFunctionConstructor, BuiltAsyncFn } from '../types/workers.js';\n\nexport const getPartialLocation = (): PartialLocation => {\n return {\n host: window.location.host,\n hash: window.location.hash,\n href: window.location.href,\n origin: window.location.origin,\n pathname: window.location.pathname,\n search: window.location.search,\n port: window.location.port,\n protocol: window.location.protocol,\n };\n};\n\nexport const generateUUIDV4 = (): string => {\n let d = new Date().getTime();\n\n if (typeof performance !== 'undefined' && typeof performance.now === 'function') {\n d += performance.now();\n }\n\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n const r = ((d + Math.random() * 16) % 16) | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x3) | 0x8).toString(16);\n });\n};\n\nconst AsyncFunction = (\n Object.getPrototypeOf(async function () {\n /* empty */\n }) as { constructor: AsyncFunctionConstructor }\n).constructor;\n\nexport const getFnWithReturn = (script: string): BuiltAsyncFn => {\n const functionBody = `\n const __cleanup = this.__cleanup.bind(this);\n const __error = this.onError.bind(this);\n let __kizen_internal_result;\n {\n this.__setup();\n }\n try {\n __kizen_internal_result = await (async () => { ${script} })();\n } catch (ex) {\n __error(ex);\n } finally {\n __cleanup(__kizen_internal_result);\n }\n `;\n\n try {\n const fn = new AsyncFunction(functionBody);\n\n return { fn, functionBody };\n } catch {\n const errorFnBody = `\n this.__setup();\n this.onError({ message: \"The script has a syntax error and could not be parsed\" });\n this.__cleanup();\n `;\n\n const fn = new AsyncFunction(errorFnBody);\n\n return { fn, functionBody: errorFnBody };\n }\n};\n\nexport const getFn = (script: string): BuiltAsyncFn => {\n const functionBody = `\n const __cleanup = this.__cleanup.bind(this);\n const __error = this.onError.bind(this);\n {\n this.__setup();\n }\n try {\n ${script}\n } catch (ex) {\n __error(ex);\n } finally {\n __cleanup();\n }\n `;\n\n try {\n const fn = new AsyncFunction(functionBody);\n\n return { fn, functionBody };\n } catch {\n const errorFnBody = `\n this.__setup();\n this.onError({ message: \"The script has a syntax error and could not be parsed\" });\n this.__cleanup();\n `;\n\n const fn = new AsyncFunction(errorFnBody);\n\n return { fn, functionBody: errorFnBody };\n }\n};\n\nexport const generateExecutionKey = (\n pluginConfig?: CommonPluginDefinition | CommonExecutionPlugin,\n): string => {\n return `${pluginConfig?.plugin_api_name ?? ''}-${pluginConfig?.id ?? ''}-${pluginConfig?.api_name ?? ''}-${pluginConfig?.script_id ?? ''}`;\n};\n\nexport const emitRouteChange = (): void => {\n const event = new CustomEvent(ROUTE_CHANGE_INTERNAL_EVENT, {\n detail: {\n location: getPartialLocation(),\n },\n });\n\n window.dispatchEvent(event);\n};\n\nconst splitScriptApiName = (\n scriptApiName: string,\n): { pluginApiName: string | undefined; actionApiName: string | undefined } => {\n const [pluginApiName, actionApiName] = scriptApiName.split('.');\n\n return {\n pluginApiName,\n actionApiName,\n };\n};\n\nexport const findMatchingAction = (\n availableActions: {\n pluginApp?: {\n apiName: string;\n };\n apiName: string;\n }[],\n apiName?: string,\n): unknown => {\n if (!apiName) {\n return null;\n }\n\n const { pluginApiName, actionApiName } = splitScriptApiName(apiName);\n\n if (!pluginApiName) {\n const action = availableActions.find((act) => !act.pluginApp && act.apiName === actionApiName);\n\n return action;\n }\n\n const action = availableActions.find(\n (act) => act.apiName === actionApiName && act.pluginApp?.apiName === pluginApiName,\n );\n\n return action;\n};\n"]}
|
package/dist/communication.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as Instance } from './ThirdPartyScript-
|
|
2
|
-
export {
|
|
1
|
+
import { I as Instance } from './ThirdPartyScript-SJ9auPZm.js';
|
|
2
|
+
export { aU as IFRAME_PREFIX, aV as INDICATOR_TYPE, T as ThirdPartyScript } from './ThirdPartyScript-SJ9auPZm.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
|
|
5
5
|
declare const runFrameScriptEventName: string;
|
package/dist/communication.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './chunk-LGJYUPYZ.js';
|
|
2
|
-
export { Communicate, runFrameScriptEventName } from './chunk-
|
|
3
|
-
export { IFRAME_PREFIX, INDICATOR_TYPE, ThirdPartyScript } from './chunk-
|
|
2
|
+
export { Communicate, runFrameScriptEventName } from './chunk-PYBTDLGY.js';
|
|
3
|
+
export { IFRAME_PREFIX, INDICATOR_TYPE, ThirdPartyScript } from './chunk-GLMIG5QG.js';
|
|
4
4
|
import './chunk-5WRI5ZAA.js';
|
|
5
5
|
//# sourceMappingURL=communication.js.map
|
|
6
6
|
//# sourceMappingURL=communication.js.map
|
package/dist/contexts/base.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Communicate } from '../communication.js';
|
|
2
|
-
import { b as PartialUser, c as PartialTeamMember, d as PartialBusiness, e as PartialClientObject, D as DataCache, f as PostFormDataFn, S as StateChangePayload, I as Instance, A as Args, g as PromptState, W as WorkerContextArgs, U as UnknownJSON, C as CurrentUser, h as InternalSessionData, i as PartialLocation, G as GetOptions, R as RequestWithErrorsResponse, j as RequestOptions, k as ShowToastOptions, M as ModalConfig, l as DynamicPromptConfig, T as ThirdPartyScript } from '../ThirdPartyScript-
|
|
2
|
+
import { b as PartialUser, c as PartialTeamMember, d as PartialBusiness, e as PartialClientObject, D as DataCache, f as PostFormDataFn, S as StateChangePayload, I as Instance, A as Args, g as PromptState, W as WorkerContextArgs, U as UnknownJSON, C as CurrentUser, h as InternalSessionData, i as PartialLocation, G as GetOptions, R as RequestWithErrorsResponse, j as RequestOptions, k as ShowToastOptions, M as ModalConfig, l as DynamicPromptConfig, T as ThirdPartyScript } from '../ThirdPartyScript-SJ9auPZm.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
|
|
5
5
|
declare class BaseWorkerContext {
|
package/dist/contexts/base.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { BaseWorkerContext } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
1
|
+
export { BaseWorkerContext } from '../chunk-DTAWTWVH.js';
|
|
2
|
+
import '../chunk-CL6AC3ZL.js';
|
|
3
|
+
import '../chunk-PYBTDLGY.js';
|
|
4
|
+
import '../chunk-GLMIG5QG.js';
|
|
5
5
|
import '../chunk-5WRI5ZAA.js';
|
|
6
6
|
//# sourceMappingURL=base.js.map
|
|
7
7
|
//# sourceMappingURL=base.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { W as WorkerContextArgs } from '../ThirdPartyScript-
|
|
1
|
+
import { W as WorkerContextArgs } from '../ThirdPartyScript-SJ9auPZm.js';
|
|
2
2
|
import { H as HideConfig, S as ShowConfig } from '../floatingFrames-BzaoL7cq.js';
|
|
3
3
|
import { BaseWorkerContext } from './base.js';
|
|
4
4
|
import 'react';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { FloatingFrameWorkerContext } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
1
|
+
export { FloatingFrameWorkerContext } from '../chunk-LGZ5VFMW.js';
|
|
2
|
+
import '../chunk-DTAWTWVH.js';
|
|
3
|
+
import '../chunk-CL6AC3ZL.js';
|
|
4
|
+
import '../chunk-PYBTDLGY.js';
|
|
5
|
+
import '../chunk-GLMIG5QG.js';
|
|
6
6
|
import '../chunk-5WRI5ZAA.js';
|
|
7
7
|
//# sourceMappingURL=floatingFrame.js.map
|
|
8
8
|
//# sourceMappingURL=floatingFrame.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { W as WorkerContextArgs, P as PartialEntity, a as PartialCustomObject } from '../ThirdPartyScript-
|
|
1
|
+
import { W as WorkerContextArgs, P as PartialEntity, a as PartialCustomObject } from '../ThirdPartyScript-SJ9auPZm.js';
|
|
2
2
|
import { BaseWorkerContext } from './base.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '../communication.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { RecordDetailWorkerContext } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
1
|
+
export { RecordDetailWorkerContext } from '../chunk-6AELDX3G.js';
|
|
2
|
+
import '../chunk-DTAWTWVH.js';
|
|
3
|
+
import '../chunk-CL6AC3ZL.js';
|
|
4
|
+
import '../chunk-PYBTDLGY.js';
|
|
5
|
+
import '../chunk-GLMIG5QG.js';
|
|
6
6
|
import '../chunk-5WRI5ZAA.js';
|
|
7
7
|
//# sourceMappingURL=recordDetail.js.map
|
|
8
8
|
//# sourceMappingURL=recordDetail.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CommonExecutionPlugin, a as CommonPluginDefinition } from './routeScript-
|
|
1
|
+
import { C as CommonExecutionPlugin, a as CommonPluginDefinition } from './routeScript-BsZNrggO.js';
|
|
2
2
|
|
|
3
3
|
interface GenericPluginConfig extends CommonPluginDefinition {
|
|
4
4
|
api_name: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { U as UnknownJSON, m as SelectOption } from './ThirdPartyScript-
|
|
2
|
-
export { n as AppPlugin, o as AppPlugins, A as Args, p as AssistantConfigAction, q as AssistantField, B as BaseAPI, r as BooleanCleanValue, s as BooleanValueStore, t as ButtonConfig, u as CleanValueStore, v as CleanValueStoreType, w as ConfigService, x as CreateRecordModalQueue, y as CreateRelatedRecordModalQueue, C as CurrentUser, z as CurriedDynamicPromptFn, E as CurriedInstallThirdPartyScriptFn, F as CurriedKizenRequestFn, H as CurriedOpenCreateRecordFn, J as CurriedOpenCreateRelatedRecordFn, K as CurriedPostFormDataFn, L as CurriedPromptFn, N as CurriedRefreshEntityFn, O as CurriedUploadFileFn, Q as CustomObjectCleanValue, V as CustomObjectValueStore, D as DataCache, X as DataCacheEntry, Y as DeleteReturnValue, l as DynamicPromptConfig, Z as DynamicPromptFn, _ as EmployeeConfig, $ as ErrorHandler, a0 as ErrorResponse, a1 as FieldCleanValue, a2 as FieldValueStore, G as GetOptions, a3 as GetReturnValue, a4 as InstallThirdPartyScriptFn, I as Instance, h as InternalSessionData, a5 as JSONArray, a6 as JSONObject, a7 as JSONPrimitive, a8 as JSONValue, a9 as KizenConfig, aa as
|
|
3
|
-
import { R as RunScriptOptions } from './routeScript-
|
|
4
|
-
export { A as AuthorizeEvent, B as BaseEvent, b as CalendarDefinition, c as CalendarScriptReturnData, d as CalendarSourceConfig, e as CalendarSourceMap, f as CalendarSources, C as CommonExecutionPlugin, a as CommonPluginDefinition, g as CommunicateEvent, h as CopyToClipboardEvent, i as CreateFileIdFn, D as DoneEvent, j as DynamicPromptRequestEvent, E as ErrorEvent, k as ExecuteCalendarSourceScript, l as ExecuteFloatingFrameScript, F as FloatingFrameConfig, m as FloatingFrameEmployeeConfig, n as FrameQuadrant, G as GetPendingCacheCountFn, H as HideEvent, I as IframeOutputEvent, o as InstallThirdPartyScriptRequestEvent, p as InvalidateCacheFn, K as KizenFile, M as MessageEventData, q as MinimizedConfig, O as OnClearToastsFn, r as OnNetworkRequestFn, s as OnShowToastFn, t as OpenCreateRecordModalRequestEvent, u as OpenCreateRelatedRecordModalRequestEvent, v as OpenWindowEvent, P as PerformKizenFileUploadFn, w as PostFormDataRequestEvent, x as PromptRequestEvent, Q as QueryRequestEvent, y as RecipientConfig, z as RefreshEntityEvent, J as RefreshTimelineEvent, L as RequestableQueryMethods, N as RoutablePageConfig, S as RouteScriptConfig, T as SchemaValidation, U as SetStateEvent, V as ShowEvent, W as ShowToastEvent, X as TerminatorContent, Y as Terminators, Z as UIOutputEvent, _ as UpdateSessionDataEvent, $ as UploadFilePayload, a0 as UploadFileRequestEvent, a1 as WindowPosition } from './routeScript-
|
|
1
|
+
import { U as UnknownJSON, m as SelectOption } from './ThirdPartyScript-SJ9auPZm.js';
|
|
2
|
+
export { n as AppPlugin, o as AppPlugins, A as Args, p as AssistantConfigAction, q as AssistantField, B as BaseAPI, r as BooleanCleanValue, s as BooleanValueStore, t as ButtonConfig, u as CleanValueStore, v as CleanValueStoreType, w as ConfigService, x as CreateRecordModalQueue, y as CreateRelatedRecordModalQueue, C as CurrentUser, z as CurriedDynamicPromptFn, E as CurriedInstallThirdPartyScriptFn, F as CurriedKizenRequestFn, H as CurriedOpenCreateRecordFn, J as CurriedOpenCreateRelatedRecordFn, K as CurriedPostFormDataFn, L as CurriedPromptFn, N as CurriedRefreshEntityFn, O as CurriedUploadFileFn, Q as CustomObjectCleanValue, V as CustomObjectValueStore, D as DataCache, X as DataCacheEntry, Y as DeleteReturnValue, l as DynamicPromptConfig, Z as DynamicPromptFn, _ as EmployeeConfig, $ as ErrorHandler, a0 as ErrorResponse, a1 as FieldCleanValue, a2 as FieldValueStore, G as GetOptions, a3 as GetReturnValue, a4 as InstallThirdPartyScriptFn, I as Instance, h as InternalSessionData, a5 as JSONArray, a6 as JSONObject, a7 as JSONPrimitive, a8 as JSONValue, a9 as KizenConfig, aa as KizenNetworkResponse, ab as KizenProxySuccessResponse, ac as KizenRequestFn, ad as KizenRequestFnHandler, ae as KnownArgs, af as MatchSetupAssistantField, ag as MaybeMessageError, ah as ModalBlock, ai as ModalCancelEventSource, M as ModalConfig, aj as ModalContainer, ak as ModalQueue, al as NumberCleanValue, am as NumberValueStore, an as OnNetworkErrorFn, ao as OnShowCreateRecordModalFn, ap as OnShowCreateRelatedRecordModalFn, aq as OnShowModalFn, ar as OpenCreateRecordFn, as as OpenCreateRelatedRecordFn, d as PartialBusiness, e as PartialClientObject, a as PartialCustomObject, P as PartialEntity, i as PartialLocation, at as PartialRelatedObject, c as PartialTeamMember, b as PartialUser, au as PatchReturnValue, f as PostFormDataFn, av as PostFormDataPayload, aw as PostReturnValue, ax as Profile, ay as PromiseMap, az as PromiseReject, aA as PromiseResolve, aB as PromiseState, aC as PromptFn, g as PromptState, aD as PutReturnValue, aE as RefreshEntityFn, aF as ReleaseBlockingScriptHandler, j as RequestOptions, R as RequestWithErrorsResponse, aG as SelectCleanValue, aH as SelectValueStore, aI as SetInternalSessionDataFn, aJ as SetupAssistantConfig, aK as SetupAssistantField, k as ShowToastOptions, S as StateChangePayload, aL as TextValueStore, aM as UnknownFunction, aN as UploadFileData, aO as UploadFileFn, aP as UserConfig, aQ as ValueStore, W as WorkerContextArgs } from './ThirdPartyScript-SJ9auPZm.js';
|
|
3
|
+
import { R as RunScriptOptions } from './routeScript-BsZNrggO.js';
|
|
4
|
+
export { A as AuthorizeEvent, B as BaseEvent, b as CalendarDefinition, c as CalendarScriptReturnData, d as CalendarSourceConfig, e as CalendarSourceMap, f as CalendarSources, C as CommonExecutionPlugin, a as CommonPluginDefinition, g as CommunicateEvent, h as CopyToClipboardEvent, i as CreateFileIdFn, D as DoneEvent, j as DynamicPromptRequestEvent, E as ErrorEvent, k as ExecuteCalendarSourceScript, l as ExecuteFloatingFrameScript, F as FloatingFrameConfig, m as FloatingFrameEmployeeConfig, n as FrameQuadrant, G as GetPendingCacheCountFn, H as HideEvent, I as IframeOutputEvent, o as InstallThirdPartyScriptRequestEvent, p as InvalidateCacheFn, K as KizenFile, M as MessageEventData, q as MinimizedConfig, O as OnClearToastsFn, r as OnNetworkRequestFn, s as OnShowToastFn, t as OpenCreateRecordModalRequestEvent, u as OpenCreateRelatedRecordModalRequestEvent, v as OpenWindowEvent, P as PerformKizenFileUploadFn, w as PostFormDataRequestEvent, x as PromptRequestEvent, Q as QueryRequestEvent, y as RecipientConfig, z as RefreshEntityEvent, J as RefreshTimelineEvent, L as RequestableQueryMethods, N as RoutablePageConfig, S as RouteScriptConfig, T as SchemaValidation, U as SetStateEvent, V as ShowEvent, W as ShowToastEvent, X as TerminatorContent, Y as Terminators, Z as UIOutputEvent, _ as UpdateSessionDataEvent, $ as UploadFilePayload, a0 as UploadFileRequestEvent, a1 as WindowPosition } from './routeScript-BsZNrggO.js';
|
|
5
5
|
export { AsyncFunctionConstructor, BuiltAsyncFn, CreateRecordResponsePayload, CreateRelatedRecordResponsePayload, ExpressionPayload, FunctionWithReturn, InstallThirdPartyScriptResponsePayload, ObjectSettingsMenuItemConfig, PostFormDataResponsePayload, PromptResponsePayload, QueryResponsePayload, RefreshEntityResponsePayload, UploadFileResponsePayload, WorkerEvent, WorkerSetup } from './types.js';
|
|
6
6
|
export { H as HideConfig, S as ShowConfig } from './floatingFrames-BzaoL7cq.js';
|
|
7
|
-
export { E as ExecuteGenericScript, G as GenericPluginConfig } from './generic-
|
|
8
|
-
export { A as AutomationStepConfig, D as DataAdornmentConfig, T as ToolbarItemConfig } from './automation-
|
|
7
|
+
export { E as ExecuteGenericScript, G as GenericPluginConfig } from './generic-StPcwyG1.js';
|
|
8
|
+
export { A as AutomationStepConfig, D as DataAdornmentConfig, T as ToolbarItemConfig } from './automation-V0iUhnR7.js';
|
|
9
9
|
import 'react';
|
|
10
10
|
|
|
11
11
|
declare const runScript: ({ scriptBody, user, teamMember, business, onError, onReleaseBlockingScript, setLoadingState, clientObject, scriptUIRef, onStateChange, workerName, context, args, plugin, onShowToast, onClearToasts, terminators, executionPlugin, sessionData, setSessionData, onShowModal, onShowCreateRecordModal, onShowCreateRelatedRecordModal, onNetworkError, onNetworkRequest, appPath, pushHistory, createFileId, performFileUpload, getPendingCacheCount, invalidateCache, }: RunScriptOptions) => Promise<unknown>;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { runExpression, runObjectExpression, runOptionExpression, runScript, runStringExpression, version } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
export { runExpression, runObjectExpression, runOptionExpression, runScript, runStringExpression, version } from './chunk-VKMZQHVH.js';
|
|
2
|
+
import './chunk-WWFCBKFR.js';
|
|
3
|
+
import './chunk-GLMIG5QG.js';
|
|
4
4
|
import './chunk-5WRI5ZAA.js';
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
package/dist/react.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { b as CalendarDefinition, d as CalendarSourceConfig, e as CalendarSourceMap, f as CalendarSources, s as OnShowToastFn, k as ExecuteCalendarSourceScript, F as FloatingFrameConfig, l as ExecuteFloatingFrameScript, N as RoutablePageConfig, a1 as WindowPosition, m as FloatingFrameEmployeeConfig, r as OnNetworkRequestFn, i as CreateFileIdFn, P as PerformKizenFileUploadFn, G as GetPendingCacheCountFn, p as InvalidateCacheFn, S as RouteScriptConfig } from './routeScript-
|
|
2
|
-
import { o as AppPlugins, W as WorkerContextArgs, U as UnknownJSON, b as PartialUser, c as PartialTeamMember, d as PartialBusiness, e as PartialClientObject,
|
|
3
|
-
import { G as GenericPluginConfig, E as ExecuteGenericScript } from './generic-
|
|
1
|
+
import { b as CalendarDefinition, d as CalendarSourceConfig, e as CalendarSourceMap, f as CalendarSources, s as OnShowToastFn, k as ExecuteCalendarSourceScript, F as FloatingFrameConfig, l as ExecuteFloatingFrameScript, N as RoutablePageConfig, a1 as WindowPosition, m as FloatingFrameEmployeeConfig, r as OnNetworkRequestFn, i as CreateFileIdFn, P as PerformKizenFileUploadFn, G as GetPendingCacheCountFn, p as InvalidateCacheFn, S as RouteScriptConfig } from './routeScript-BsZNrggO.js';
|
|
2
|
+
import { o as AppPlugins, W as WorkerContextArgs, U as UnknownJSON, b as PartialUser, c as PartialTeamMember, d as PartialBusiness, e as PartialClientObject, ai as ModalCancelEventSource, M as ModalConfig, aJ as SetupAssistantConfig, p as AssistantConfigAction, q as AssistantField } from './ThirdPartyScript-SJ9auPZm.js';
|
|
3
|
+
import { G as GenericPluginConfig, E as ExecuteGenericScript } from './generic-StPcwyG1.js';
|
|
4
4
|
import { RefObject, JSX, ReactNode, FC, SetStateAction } from 'react';
|
|
5
5
|
import './floatingFrames-BzaoL7cq.js';
|
|
6
6
|
|
package/dist/react.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { runScript, runExpression, getStableHash, isFlagEnabled } from './chunk-
|
|
1
|
+
import { runScript, runExpression, getStableHash, isFlagEnabled } from './chunk-VKMZQHVH.js';
|
|
2
2
|
import './chunk-LGJYUPYZ.js';
|
|
3
|
-
import { generateExecutionKey } from './chunk-
|
|
4
|
-
import { getAllNestedInputsFromConfig, getFieldFromAction } from './chunk-
|
|
5
|
-
import { runFrameScriptEventName } from './chunk-
|
|
6
|
-
import { QUERY_KEYS, ROUTE_CHANGE_INTERNAL_EVENT, IFRAME_PREFIX, ROUTE_CHANGE_IFRAME_EVENT } from './chunk-
|
|
3
|
+
import { generateExecutionKey } from './chunk-WWFCBKFR.js';
|
|
4
|
+
import { getAllNestedInputsFromConfig, getFieldFromAction } from './chunk-CL6AC3ZL.js';
|
|
5
|
+
import { runFrameScriptEventName } from './chunk-PYBTDLGY.js';
|
|
6
|
+
import { QUERY_KEYS, ROUTE_CHANGE_INTERNAL_EVENT, IFRAME_PREFIX, ROUTE_CHANGE_IFRAME_EVENT } from './chunk-GLMIG5QG.js';
|
|
7
7
|
import './chunk-5WRI5ZAA.js';
|
|
8
8
|
import { QueryClient, useQueries, useQueryClient, QueryClientContext, QueryClientProvider } from '@tanstack/react-query';
|
|
9
9
|
import { createContext, useContext, useState, useCallback, useMemo, useRef, useEffect } from 'react';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aR as ACTIONS, aS as ALLOWED_INTEGRATIONS, M as ModalConfig, U as UnknownJSON, S as StateChangePayload, k as ShowToastOptions, h as InternalSessionData, aI as SetInternalSessionDataFn, aq as OnShowModalFn, ao as OnShowCreateRecordModalFn, ap as OnShowCreateRelatedRecordModalFn, an as OnNetworkErrorFn, W as WorkerContextArgs, _ as EmployeeConfig } from './ThirdPartyScript-SJ9auPZm.js';
|
|
2
2
|
import { H as HideConfig, S as ShowConfig } from './floatingFrames-BzaoL7cq.js';
|
|
3
3
|
|
|
4
4
|
interface CommonPluginDefinition {
|
|
@@ -59,7 +59,7 @@ interface RunScriptOptions {
|
|
|
59
59
|
type RequestableQueryMethods = 'get' | 'post' | 'patch' | 'delete';
|
|
60
60
|
type OnNetworkRequestFn = (method: RequestableQueryMethods, url: string, payload?: UnknownJSON, options?: UnknownJSON) => Promise<{
|
|
61
61
|
data: UnknownJSON;
|
|
62
|
-
}>;
|
|
62
|
+
} | undefined>;
|
|
63
63
|
interface BaseEvent {
|
|
64
64
|
action: (typeof ACTIONS)[keyof typeof ACTIONS];
|
|
65
65
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { U as UnknownJSON, b as PartialUser, c as PartialTeamMember, d as PartialBusiness, e as PartialClientObject, i as PartialLocation } from './ThirdPartyScript-
|
|
2
|
-
export { n as AppPlugin, o as AppPlugins, A as Args, p as AssistantConfigAction, q as AssistantField, B as BaseAPI, r as BooleanCleanValue, s as BooleanValueStore, t as ButtonConfig, u as CleanValueStore, v as CleanValueStoreType, w as ConfigService, x as CreateRecordModalQueue, y as CreateRelatedRecordModalQueue, C as CurrentUser, z as CurriedDynamicPromptFn, E as CurriedInstallThirdPartyScriptFn, F as CurriedKizenRequestFn, H as CurriedOpenCreateRecordFn, J as CurriedOpenCreateRelatedRecordFn, K as CurriedPostFormDataFn, L as CurriedPromptFn, N as CurriedRefreshEntityFn, O as CurriedUploadFileFn, Q as CustomObjectCleanValue, V as CustomObjectValueStore, D as DataCache, X as DataCacheEntry, Y as DeleteReturnValue, l as DynamicPromptConfig, Z as DynamicPromptFn, _ as EmployeeConfig, $ as ErrorHandler, a0 as ErrorResponse, a1 as FieldCleanValue, a2 as FieldValueStore, G as GetOptions, a3 as GetReturnValue, a4 as InstallThirdPartyScriptFn, I as Instance, h as InternalSessionData, a5 as JSONArray, a6 as JSONObject, a7 as JSONPrimitive, a8 as JSONValue, a9 as KizenConfig, aa as
|
|
3
|
-
import { a as CommonPluginDefinition } from './routeScript-
|
|
4
|
-
export { A as AuthorizeEvent, B as BaseEvent, b as CalendarDefinition, c as CalendarScriptReturnData, d as CalendarSourceConfig, e as CalendarSourceMap, f as CalendarSources, C as CommonExecutionPlugin, g as CommunicateEvent, h as CopyToClipboardEvent, i as CreateFileIdFn, D as DoneEvent, j as DynamicPromptRequestEvent, E as ErrorEvent, k as ExecuteCalendarSourceScript, l as ExecuteFloatingFrameScript, F as FloatingFrameConfig, m as FloatingFrameEmployeeConfig, n as FrameQuadrant, G as GetPendingCacheCountFn, H as HideEvent, I as IframeOutputEvent, o as InstallThirdPartyScriptRequestEvent, p as InvalidateCacheFn, K as KizenFile, M as MessageEventData, q as MinimizedConfig, O as OnClearToastsFn, r as OnNetworkRequestFn, s as OnShowToastFn, t as OpenCreateRecordModalRequestEvent, u as OpenCreateRelatedRecordModalRequestEvent, v as OpenWindowEvent, P as PerformKizenFileUploadFn, w as PostFormDataRequestEvent, x as PromptRequestEvent, Q as QueryRequestEvent, y as RecipientConfig, z as RefreshEntityEvent, J as RefreshTimelineEvent, L as RequestableQueryMethods, N as RoutablePageConfig, S as RouteScriptConfig, R as RunScriptOptions, T as SchemaValidation, U as SetStateEvent, V as ShowEvent, W as ShowToastEvent, X as TerminatorContent, Y as Terminators, Z as UIOutputEvent, _ as UpdateSessionDataEvent, $ as UploadFilePayload, a0 as UploadFileRequestEvent, a1 as WindowPosition } from './routeScript-
|
|
1
|
+
import { U as UnknownJSON, b as PartialUser, c as PartialTeamMember, d as PartialBusiness, e as PartialClientObject, i as PartialLocation } from './ThirdPartyScript-SJ9auPZm.js';
|
|
2
|
+
export { n as AppPlugin, o as AppPlugins, A as Args, p as AssistantConfigAction, q as AssistantField, B as BaseAPI, r as BooleanCleanValue, s as BooleanValueStore, t as ButtonConfig, u as CleanValueStore, v as CleanValueStoreType, w as ConfigService, x as CreateRecordModalQueue, y as CreateRelatedRecordModalQueue, C as CurrentUser, z as CurriedDynamicPromptFn, E as CurriedInstallThirdPartyScriptFn, F as CurriedKizenRequestFn, H as CurriedOpenCreateRecordFn, J as CurriedOpenCreateRelatedRecordFn, K as CurriedPostFormDataFn, L as CurriedPromptFn, N as CurriedRefreshEntityFn, O as CurriedUploadFileFn, Q as CustomObjectCleanValue, V as CustomObjectValueStore, D as DataCache, X as DataCacheEntry, Y as DeleteReturnValue, l as DynamicPromptConfig, Z as DynamicPromptFn, _ as EmployeeConfig, $ as ErrorHandler, a0 as ErrorResponse, a1 as FieldCleanValue, a2 as FieldValueStore, G as GetOptions, a3 as GetReturnValue, a4 as InstallThirdPartyScriptFn, I as Instance, h as InternalSessionData, a5 as JSONArray, a6 as JSONObject, a7 as JSONPrimitive, a8 as JSONValue, a9 as KizenConfig, aa as KizenNetworkResponse, ab as KizenProxySuccessResponse, ac as KizenRequestFn, ad as KizenRequestFnHandler, ae as KnownArgs, af as MatchSetupAssistantField, ag as MaybeMessageError, ah as ModalBlock, ai as ModalCancelEventSource, M as ModalConfig, aj as ModalContainer, ak as ModalQueue, al as NumberCleanValue, am as NumberValueStore, an as OnNetworkErrorFn, ao as OnShowCreateRecordModalFn, ap as OnShowCreateRelatedRecordModalFn, aq as OnShowModalFn, ar as OpenCreateRecordFn, as as OpenCreateRelatedRecordFn, a as PartialCustomObject, P as PartialEntity, at as PartialRelatedObject, au as PatchReturnValue, f as PostFormDataFn, av as PostFormDataPayload, aw as PostReturnValue, ax as Profile, ay as PromiseMap, az as PromiseReject, aA as PromiseResolve, aB as PromiseState, aC as PromptFn, g as PromptState, aD as PutReturnValue, aE as RefreshEntityFn, aF as ReleaseBlockingScriptHandler, j as RequestOptions, R as RequestWithErrorsResponse, aG as SelectCleanValue, m as SelectOption, aH as SelectValueStore, aI as SetInternalSessionDataFn, aJ as SetupAssistantConfig, aK as SetupAssistantField, k as ShowToastOptions, S as StateChangePayload, aL as TextValueStore, aM as UnknownFunction, aN as UploadFileData, aO as UploadFileFn, aP as UserConfig, aQ as ValueStore, W as WorkerContextArgs } from './ThirdPartyScript-SJ9auPZm.js';
|
|
3
|
+
import { a as CommonPluginDefinition } from './routeScript-BsZNrggO.js';
|
|
4
|
+
export { A as AuthorizeEvent, B as BaseEvent, b as CalendarDefinition, c as CalendarScriptReturnData, d as CalendarSourceConfig, e as CalendarSourceMap, f as CalendarSources, C as CommonExecutionPlugin, g as CommunicateEvent, h as CopyToClipboardEvent, i as CreateFileIdFn, D as DoneEvent, j as DynamicPromptRequestEvent, E as ErrorEvent, k as ExecuteCalendarSourceScript, l as ExecuteFloatingFrameScript, F as FloatingFrameConfig, m as FloatingFrameEmployeeConfig, n as FrameQuadrant, G as GetPendingCacheCountFn, H as HideEvent, I as IframeOutputEvent, o as InstallThirdPartyScriptRequestEvent, p as InvalidateCacheFn, K as KizenFile, M as MessageEventData, q as MinimizedConfig, O as OnClearToastsFn, r as OnNetworkRequestFn, s as OnShowToastFn, t as OpenCreateRecordModalRequestEvent, u as OpenCreateRelatedRecordModalRequestEvent, v as OpenWindowEvent, P as PerformKizenFileUploadFn, w as PostFormDataRequestEvent, x as PromptRequestEvent, Q as QueryRequestEvent, y as RecipientConfig, z as RefreshEntityEvent, J as RefreshTimelineEvent, L as RequestableQueryMethods, N as RoutablePageConfig, S as RouteScriptConfig, R as RunScriptOptions, T as SchemaValidation, U as SetStateEvent, V as ShowEvent, W as ShowToastEvent, X as TerminatorContent, Y as Terminators, Z as UIOutputEvent, _ as UpdateSessionDataEvent, $ as UploadFilePayload, a0 as UploadFileRequestEvent, a1 as WindowPosition } from './routeScript-BsZNrggO.js';
|
|
5
5
|
export { H as HideConfig, S as ShowConfig } from './floatingFrames-BzaoL7cq.js';
|
|
6
|
-
export { E as ExecuteGenericScript, G as GenericPluginConfig } from './generic-
|
|
7
|
-
export { A as AutomationStepConfig, D as DataAdornmentConfig, T as ToolbarItemConfig } from './automation-
|
|
6
|
+
export { E as ExecuteGenericScript, G as GenericPluginConfig } from './generic-StPcwyG1.js';
|
|
7
|
+
export { A as AutomationStepConfig, D as DataAdornmentConfig, T as ToolbarItemConfig } from './automation-V0iUhnR7.js';
|
|
8
8
|
import 'react';
|
|
9
9
|
|
|
10
10
|
interface ExpressionPayload {
|
package/dist/util.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as PartialLocation, U as UnknownJSON,
|
|
2
|
-
import { F as FloatingFrameConfig, N as RoutablePageConfig, S as RouteScriptConfig, d as CalendarSourceConfig } from './routeScript-
|
|
3
|
-
import { D as DataAdornmentConfig, T as ToolbarItemConfig, A as AutomationStepConfig } from './automation-
|
|
1
|
+
import { i as PartialLocation, U as UnknownJSON, aK as SetupAssistantField, n as AppPlugin, aJ as SetupAssistantConfig, aQ as ValueStore, u as CleanValueStore, p as AssistantConfigAction, q as AssistantField, aT as KizenRequestError, aa as KizenNetworkResponse, ab as KizenProxySuccessResponse } from './ThirdPartyScript-SJ9auPZm.js';
|
|
2
|
+
import { F as FloatingFrameConfig, N as RoutablePageConfig, S as RouteScriptConfig, d as CalendarSourceConfig } from './routeScript-BsZNrggO.js';
|
|
3
|
+
import { D as DataAdornmentConfig, T as ToolbarItemConfig, A as AutomationStepConfig } from './automation-V0iUhnR7.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import './floatingFrames-BzaoL7cq.js';
|
|
6
6
|
|
|
@@ -37,4 +37,13 @@ declare const getStableHash: (obj: unknown) => number;
|
|
|
37
37
|
|
|
38
38
|
declare const isFlagEnabled: (identifier: string) => boolean;
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
declare const getModifiedResponse: (response: KizenNetworkResponse<KizenProxySuccessResponse>) => {
|
|
41
|
+
response: KizenNetworkResponse;
|
|
42
|
+
upstreamStatus: number;
|
|
43
|
+
upstreamResponse: unknown;
|
|
44
|
+
};
|
|
45
|
+
declare const createKizenRequestError: (proxyStatus: number, upstreamStatus?: number, upstreamResponse?: UnknownJSON) => KizenRequestError;
|
|
46
|
+
declare const createKizenProxyError: (proxyStatus?: number, proxyError?: string) => KizenRequestError;
|
|
47
|
+
declare const handleKizenNetworkResponse: (originalResponse: KizenNetworkResponse<KizenProxySuccessResponse>) => KizenNetworkResponse<UnknownJSON>;
|
|
48
|
+
|
|
49
|
+
export { cleanConfig, createKizenProxyError, createKizenRequestError, emitRouteChange, findMatchingAction, getDisabledValue, getEnabledState, getFieldFromAction, getHash, getModifiedResponse, getPartialLocation, getStableHash, handleKizenNetworkResponse, isFlagEnabled, mergeConfig, pluginMapper, reduceEnabledResults, replaceConfigValues };
|
package/dist/util.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { runExpression } from './chunk-
|
|
2
|
-
export { getHash, getStableHash, isFlagEnabled } from './chunk-
|
|
3
|
-
export { emitRouteChange, findMatchingAction, getPartialLocation } from './chunk-
|
|
4
|
-
import { getAllNestedInputsFromConfig } from './chunk-
|
|
5
|
-
export { cleanConfig, getFieldFromAction } from './chunk-
|
|
6
|
-
import './chunk-
|
|
1
|
+
import { runExpression } from './chunk-VKMZQHVH.js';
|
|
2
|
+
export { getHash, getStableHash, isFlagEnabled } from './chunk-VKMZQHVH.js';
|
|
3
|
+
export { emitRouteChange, findMatchingAction, getPartialLocation } from './chunk-WWFCBKFR.js';
|
|
4
|
+
import { getAllNestedInputsFromConfig } from './chunk-CL6AC3ZL.js';
|
|
5
|
+
export { cleanConfig, getFieldFromAction } from './chunk-CL6AC3ZL.js';
|
|
6
|
+
import './chunk-GLMIG5QG.js';
|
|
7
7
|
import './chunk-5WRI5ZAA.js';
|
|
8
8
|
|
|
9
9
|
// src/util/values.ts
|
|
@@ -82,6 +82,55 @@ var reduceEnabledResults = (results) => {
|
|
|
82
82
|
}, {});
|
|
83
83
|
};
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
// src/util/errors.ts
|
|
86
|
+
var KizenRequestError = class extends Error {
|
|
87
|
+
proxyStatus;
|
|
88
|
+
upstreamStatus;
|
|
89
|
+
upstreamResponse;
|
|
90
|
+
constructor(proxyStatus, upstreamStatus, upstreamResponse, overrideMessage) {
|
|
91
|
+
super(
|
|
92
|
+
overrideMessage ?? (upstreamStatus ? `Request failed with upstream status code ${String(upstreamStatus)}` : `Request failed with proxy status code ${String(proxyStatus)}`)
|
|
93
|
+
);
|
|
94
|
+
this.name = "KizenRequestError";
|
|
95
|
+
this.proxyStatus = proxyStatus;
|
|
96
|
+
this.upstreamStatus = upstreamStatus;
|
|
97
|
+
this.upstreamResponse = upstreamResponse;
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
// src/util/network.ts
|
|
102
|
+
var getModifiedResponse = (response) => {
|
|
103
|
+
const modifiedResponse = {
|
|
104
|
+
...response,
|
|
105
|
+
data: response.data.body ?? response.data,
|
|
106
|
+
status: response.data.status_code ?? response.status
|
|
107
|
+
};
|
|
108
|
+
return {
|
|
109
|
+
response: modifiedResponse,
|
|
110
|
+
upstreamStatus: modifiedResponse.status,
|
|
111
|
+
upstreamResponse: response.data.body
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
var createKizenRequestError = (proxyStatus, upstreamStatus, upstreamResponse) => {
|
|
115
|
+
return new KizenRequestError(proxyStatus, upstreamStatus, upstreamResponse);
|
|
116
|
+
};
|
|
117
|
+
var createKizenProxyError = (proxyStatus, proxyError) => {
|
|
118
|
+
return new KizenRequestError(
|
|
119
|
+
proxyStatus ?? 500,
|
|
120
|
+
void 0,
|
|
121
|
+
void 0,
|
|
122
|
+
proxyError ?? "An unknown error occurred in the proxy"
|
|
123
|
+
);
|
|
124
|
+
};
|
|
125
|
+
var handleKizenNetworkResponse = (originalResponse) => {
|
|
126
|
+
const { response, upstreamStatus, upstreamResponse } = getModifiedResponse(originalResponse);
|
|
127
|
+
const isErrorCode = upstreamStatus >= 400;
|
|
128
|
+
if (isErrorCode) {
|
|
129
|
+
throw createKizenRequestError(200, upstreamStatus, upstreamResponse);
|
|
130
|
+
}
|
|
131
|
+
return response;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
export { createKizenProxyError, createKizenRequestError, getDisabledValue, getEnabledState, getModifiedResponse, handleKizenNetworkResponse, mergeConfig, pluginMapper, reduceEnabledResults, replaceConfigValues };
|
|
86
135
|
//# sourceMappingURL=util.js.map
|
|
87
136
|
//# sourceMappingURL=util.js.map
|
package/dist/util.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/util/values.ts"],"names":["cleanConfig"],"mappings":";;;;;;;;;AAuBO,IAAM,YA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C,IAAA,CAAK,QAAQ,GAAG,IAAA,CAAK;AAAA,KACxB;AAAA,EACF,CAAA,EAAG,EAAE,CAAA;AACP","file":"util.js","sourcesContent":["import {\n runExpression,\n type AutomationStepConfig,\n type CalendarSourceConfig,\n type FloatingFrameConfig,\n type ToolbarItemConfig,\n} from '../index.js';\nimport type { DataAdornmentConfig } from '../types/artifacts/dataAdornment.js';\nimport type { RoutablePageConfig } from '../types/artifacts/routablePage.js';\nimport type { RouteScriptConfig } from '../types/artifacts/routeScript.js';\nimport type { AppPlugin, UnknownJSON } from '../types/common.js';\nimport type { SetupAssistantField } from '../types/modals.js';\nimport { getAllNestedInputsFromConfig } from '../workers/util.js';\n\ntype AllowedConfig =\n | FloatingFrameConfig\n | RoutablePageConfig\n | DataAdornmentConfig\n | ToolbarItemConfig\n | RouteScriptConfig\n | CalendarSourceConfig\n | AutomationStepConfig;\n\nexport const pluginMapper = <T extends AllowedConfig>(\n config: T,\n apiName: string,\n plugin: AppPlugin,\n): T & {\n plugin_api_name: string;\n plugin_name: string;\n employee_config: unknown;\n args: unknown;\n} => {\n return {\n ...config,\n plugin_api_name: apiName,\n plugin_name: plugin.name,\n employee_config: plugin.employee_config,\n args: plugin.business_config,\n };\n};\n\nexport const getDisabledValue = (type?: string): false | undefined => {\n if (type === 'boolean') {\n return false;\n }\n\n return undefined;\n};\n\nexport const mergeConfig = (\n cleanConfig: Record<string, UnknownJSON>,\n disabledFieldKeys: string[],\n rawConfig: Record<string, UnknownJSON>,\n setupAssistantFields?: SetupAssistantField[],\n): Record<string, UnknownJSON> => {\n const keys = Object.keys(cleanConfig);\n const mergedConfig: Record<string, UnknownJSON> = {};\n\n keys.forEach((key) => {\n if (disabledFieldKeys.includes(key)) {\n mergedConfig[key] = {\n value: getDisabledValue(rawConfig[key]?.type as string),\n type: rawConfig[key]?.type,\n };\n } else {\n mergedConfig[key] = {\n value: cleanConfig[key],\n type: rawConfig[key]?.type,\n };\n }\n });\n\n const flattenedFields = getAllNestedInputsFromConfig({\n fields: setupAssistantFields ?? [],\n });\n\n flattenedFields.forEach((field) => {\n if (typeof mergedConfig[field.key] === 'undefined') {\n if (disabledFieldKeys.includes(field.key)) {\n mergedConfig[field.key] = {\n value: getDisabledValue(field.type),\n type: field.type,\n };\n } else {\n mergedConfig[field.key] = {\n value: field.default,\n type: field.type,\n };\n }\n }\n });\n\n return mergedConfig;\n};\n\nexport const replaceConfigValues = (when?: string): string => {\n if (!when) {\n return '';\n }\n\n const replaced = when\n .replaceAll('{{config.', '{{config__')\n .replaceAll('{{userConfig.', '{{userConfig__');\n\n return replaced;\n};\n\nexport const getEnabledState = async (\n when: string | undefined,\n state: Record<string, UnknownJSON>,\n): Promise<boolean> => {\n const replaced = replaceConfigValues(when);\n\n const enabled = await runExpression(replaced, state);\n\n return enabled;\n};\n\nexport const reduceEnabledResults = (\n results: { api_name?: string; enabled: boolean }[],\n): Record<string, boolean> => {\n return results.reduce((acc, curr) => {\n if (!curr.api_name) {\n return acc;\n }\n\n return {\n ...acc,\n [curr.api_name]: curr.enabled,\n };\n }, {});\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/util/values.ts","../src/util/errors.ts","../src/util/network.ts"],"names":["cleanConfig"],"mappings":";;;;;;;;;AAuBO,IAAM,YAAA,GAAe,CAC1B,MAAA,EACA,OAAA,EACA,MAAA,KAMG;AACH,EAAA,OAAO;AAAA,IACL,GAAG,MAAA;AAAA,IACH,eAAA,EAAiB,OAAA;AAAA,IACjB,aAAa,MAAA,CAAO,IAAA;AAAA,IACpB,iBAAiB,MAAA,CAAO,eAAA;AAAA,IACxB,MAAM,MAAA,CAAO;AAAA,GACf;AACF;AAEO,IAAM,gBAAA,GAAmB,CAAC,IAAA,KAAqC;AACpE,EAAA,IAAI,SAAS,SAAA,EAAW;AACtB,IAAA,OAAO,KAAA;AAAA,EACT;AAEA,EAAA,OAAO,MAAA;AACT;AAEO,IAAM,WAAA,GAAc,CACzBA,YAAAA,EACA,iBAAA,EACA,WACA,o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;AAAA,EACpF;AAEA,EAAA,OAAO,QAAA;AACT","file":"util.js","sourcesContent":["import {\n runExpression,\n type AutomationStepConfig,\n type CalendarSourceConfig,\n type FloatingFrameConfig,\n type ToolbarItemConfig,\n} from '../index.js';\nimport type { DataAdornmentConfig } from '../types/artifacts/dataAdornment.js';\nimport type { RoutablePageConfig } from '../types/artifacts/routablePage.js';\nimport type { RouteScriptConfig } from '../types/artifacts/routeScript.js';\nimport type { AppPlugin, UnknownJSON } from '../types/common.js';\nimport type { SetupAssistantField } from '../types/modals.js';\nimport { getAllNestedInputsFromConfig } from '../workers/util.js';\n\ntype AllowedConfig =\n | FloatingFrameConfig\n | RoutablePageConfig\n | DataAdornmentConfig\n | ToolbarItemConfig\n | RouteScriptConfig\n | CalendarSourceConfig\n | AutomationStepConfig;\n\nexport const pluginMapper = <T extends AllowedConfig>(\n config: T,\n apiName: string,\n plugin: AppPlugin,\n): T & {\n plugin_api_name: string;\n plugin_name: string;\n employee_config: unknown;\n args: unknown;\n} => {\n return {\n ...config,\n plugin_api_name: apiName,\n plugin_name: plugin.name,\n employee_config: plugin.employee_config,\n args: plugin.business_config,\n };\n};\n\nexport const getDisabledValue = (type?: string): false | undefined => {\n if (type === 'boolean') {\n return false;\n }\n\n return undefined;\n};\n\nexport const mergeConfig = (\n cleanConfig: Record<string, UnknownJSON>,\n disabledFieldKeys: string[],\n rawConfig: Record<string, UnknownJSON>,\n setupAssistantFields?: SetupAssistantField[],\n): Record<string, UnknownJSON> => {\n const keys = Object.keys(cleanConfig);\n const mergedConfig: Record<string, UnknownJSON> = {};\n\n keys.forEach((key) => {\n if (disabledFieldKeys.includes(key)) {\n mergedConfig[key] = {\n value: getDisabledValue(rawConfig[key]?.type as string),\n type: rawConfig[key]?.type,\n };\n } else {\n mergedConfig[key] = {\n value: cleanConfig[key],\n type: rawConfig[key]?.type,\n };\n }\n });\n\n const flattenedFields = getAllNestedInputsFromConfig({\n fields: setupAssistantFields ?? [],\n });\n\n flattenedFields.forEach((field) => {\n if (typeof mergedConfig[field.key] === 'undefined') {\n if (disabledFieldKeys.includes(field.key)) {\n mergedConfig[field.key] = {\n value: getDisabledValue(field.type),\n type: field.type,\n };\n } else {\n mergedConfig[field.key] = {\n value: field.default,\n type: field.type,\n };\n }\n }\n });\n\n return mergedConfig;\n};\n\nexport const replaceConfigValues = (when?: string): string => {\n if (!when) {\n return '';\n }\n\n const replaced = when\n .replaceAll('{{config.', '{{config__')\n .replaceAll('{{userConfig.', '{{userConfig__');\n\n return replaced;\n};\n\nexport const getEnabledState = async (\n when: string | undefined,\n state: Record<string, UnknownJSON>,\n): Promise<boolean> => {\n const replaced = replaceConfigValues(when);\n\n const enabled = await runExpression(replaced, state);\n\n return enabled;\n};\n\nexport const reduceEnabledResults = (\n results: { api_name?: string; enabled: boolean }[],\n): Record<string, boolean> => {\n return results.reduce((acc, curr) => {\n if (!curr.api_name) {\n return acc;\n }\n\n return {\n ...acc,\n [curr.api_name]: curr.enabled,\n };\n }, {});\n};\n","import type { UnknownJSON } from '../types/common.js';\n\nexport class KizenRequestError extends Error {\n public proxyStatus: number;\n public upstreamStatus?: number | undefined;\n public upstreamResponse?: UnknownJSON | undefined;\n\n constructor(\n proxyStatus: number,\n upstreamStatus?: number,\n upstreamResponse?: UnknownJSON,\n overrideMessage?: string,\n ) {\n super(\n overrideMessage ??\n (upstreamStatus\n ? `Request failed with upstream status code ${String(upstreamStatus)}`\n : `Request failed with proxy status code ${String(proxyStatus)}`),\n );\n this.name = 'KizenRequestError';\n this.proxyStatus = proxyStatus;\n this.upstreamStatus = upstreamStatus;\n this.upstreamResponse = upstreamResponse;\n }\n}\n","import type { KizenNetworkResponse, KizenProxySuccessResponse } from '../types/request.js';\nimport type { UnknownJSON } from '../types/common.js';\nimport { KizenRequestError } from './errors.js';\n\nexport const getModifiedResponse = (\n response: KizenNetworkResponse<KizenProxySuccessResponse>,\n): {\n response: KizenNetworkResponse;\n upstreamStatus: number;\n upstreamResponse: unknown;\n} => {\n const modifiedResponse = {\n ...response,\n data: response.data.body ?? response.data,\n status: response.data.status_code ?? response.status,\n };\n\n return {\n response: modifiedResponse,\n upstreamStatus: modifiedResponse.status,\n upstreamResponse: response.data.body,\n };\n};\n\nexport const createKizenRequestError = (\n proxyStatus: number,\n upstreamStatus?: number,\n upstreamResponse?: UnknownJSON,\n): KizenRequestError => {\n return new KizenRequestError(proxyStatus, upstreamStatus, upstreamResponse);\n};\n\nexport const createKizenProxyError = (\n proxyStatus?: number,\n proxyError?: string,\n): KizenRequestError => {\n return new KizenRequestError(\n proxyStatus ?? 500,\n undefined,\n undefined,\n proxyError ?? 'An unknown error occurred in the proxy',\n );\n};\n\nexport const handleKizenNetworkResponse = (\n originalResponse: KizenNetworkResponse<KizenProxySuccessResponse>,\n): KizenNetworkResponse<UnknownJSON> => {\n const { response, upstreamStatus, upstreamResponse } = getModifiedResponse(originalResponse);\n\n const isErrorCode = upstreamStatus >= 400;\n\n if (isErrorCode) {\n // If we manually throw an error, it means the proxy request succeeded but the upstream request failed.\n // In this case, always indicate a 200 status for the proxy.\n throw createKizenRequestError(200, upstreamStatus, upstreamResponse as UnknownJSON);\n }\n\n return response as KizenNetworkResponse<UnknownJSON>;\n};\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { WorkerPromise } from '../chunk-
|
|
2
|
-
import { getFnWithReturn } from '../chunk-
|
|
3
|
-
import { BaseWorkerContext } from '../chunk-
|
|
4
|
-
import { dynamicPromptHandler, promptHandler, postFormDataHandler, kizenRequestHandler, handleCommonResponse } from '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import { ACTIONS } from '../chunk-
|
|
1
|
+
import { WorkerPromise } from '../chunk-PV247HYV.js';
|
|
2
|
+
import { getFnWithReturn } from '../chunk-WWFCBKFR.js';
|
|
3
|
+
import { BaseWorkerContext } from '../chunk-DTAWTWVH.js';
|
|
4
|
+
import { dynamicPromptHandler, promptHandler, postFormDataHandler, kizenRequestHandler, handleCommonResponse } from '../chunk-CL6AC3ZL.js';
|
|
5
|
+
import '../chunk-PYBTDLGY.js';
|
|
6
|
+
import { ACTIONS } from '../chunk-GLMIG5QG.js';
|
|
7
7
|
import '../chunk-5WRI5ZAA.js';
|
|
8
8
|
|
|
9
9
|
// src/workers/calendarSource.worker.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { FloatingFrameWorkerContext } from '../chunk-
|
|
2
|
-
import { WorkerPromise } from '../chunk-
|
|
3
|
-
import { getFn } from '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import { openCreateRelatedRecordHandler, openCreateRecordHandler, refreshEntityHandler, dynamicPromptHandler, promptHandler, installThirdPartyScriptHandler, uploadFileHandler, postFormDataHandler, kizenRequestHandler, handleCommonResponse } from '../chunk-
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import { ACTIONS } from '../chunk-
|
|
1
|
+
import { FloatingFrameWorkerContext } from '../chunk-LGZ5VFMW.js';
|
|
2
|
+
import { WorkerPromise } from '../chunk-PV247HYV.js';
|
|
3
|
+
import { getFn } from '../chunk-WWFCBKFR.js';
|
|
4
|
+
import '../chunk-DTAWTWVH.js';
|
|
5
|
+
import { openCreateRelatedRecordHandler, openCreateRecordHandler, refreshEntityHandler, dynamicPromptHandler, promptHandler, installThirdPartyScriptHandler, uploadFileHandler, postFormDataHandler, kizenRequestHandler, handleCommonResponse } from '../chunk-CL6AC3ZL.js';
|
|
6
|
+
import '../chunk-PYBTDLGY.js';
|
|
7
|
+
import { ACTIONS } from '../chunk-GLMIG5QG.js';
|
|
8
8
|
import '../chunk-5WRI5ZAA.js';
|
|
9
9
|
|
|
10
10
|
// src/workers/floatingFrame.worker.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { WorkerPromise } from '../chunk-
|
|
2
|
-
import { getFn } from '../chunk-
|
|
3
|
-
import { BaseWorkerContext } from '../chunk-
|
|
4
|
-
import { openCreateRelatedRecordHandler, openCreateRecordHandler, refreshEntityHandler, dynamicPromptHandler, promptHandler, installThirdPartyScriptHandler, uploadFileHandler, postFormDataHandler, kizenRequestHandler, handleCommonResponse } from '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import { ACTIONS } from '../chunk-
|
|
1
|
+
import { WorkerPromise } from '../chunk-PV247HYV.js';
|
|
2
|
+
import { getFn } from '../chunk-WWFCBKFR.js';
|
|
3
|
+
import { BaseWorkerContext } from '../chunk-DTAWTWVH.js';
|
|
4
|
+
import { openCreateRelatedRecordHandler, openCreateRecordHandler, refreshEntityHandler, dynamicPromptHandler, promptHandler, installThirdPartyScriptHandler, uploadFileHandler, postFormDataHandler, kizenRequestHandler, handleCommonResponse } from '../chunk-CL6AC3ZL.js';
|
|
5
|
+
import '../chunk-PYBTDLGY.js';
|
|
6
|
+
import { ACTIONS } from '../chunk-GLMIG5QG.js';
|
|
7
7
|
import '../chunk-5WRI5ZAA.js';
|
|
8
8
|
|
|
9
9
|
// src/workers/generic.worker.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { RecordDetailWorkerContext } from '../chunk-
|
|
2
|
-
import { WorkerPromise } from '../chunk-
|
|
3
|
-
import { getFn } from '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import { openCreateRelatedRecordHandler, openCreateRecordHandler, refreshEntityHandler, dynamicPromptHandler, promptHandler, installThirdPartyScriptHandler, uploadFileHandler, postFormDataHandler, kizenRequestHandler, handleCommonResponse } from '../chunk-
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import { ACTIONS } from '../chunk-
|
|
1
|
+
import { RecordDetailWorkerContext } from '../chunk-6AELDX3G.js';
|
|
2
|
+
import { WorkerPromise } from '../chunk-PV247HYV.js';
|
|
3
|
+
import { getFn } from '../chunk-WWFCBKFR.js';
|
|
4
|
+
import '../chunk-DTAWTWVH.js';
|
|
5
|
+
import { openCreateRelatedRecordHandler, openCreateRecordHandler, refreshEntityHandler, dynamicPromptHandler, promptHandler, installThirdPartyScriptHandler, uploadFileHandler, postFormDataHandler, kizenRequestHandler, handleCommonResponse } from '../chunk-CL6AC3ZL.js';
|
|
6
|
+
import '../chunk-PYBTDLGY.js';
|
|
7
|
+
import { ACTIONS } from '../chunk-GLMIG5QG.js';
|
|
8
8
|
import '../chunk-5WRI5ZAA.js';
|
|
9
9
|
|
|
10
10
|
// src/workers/recordDetail.worker.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kizenapps/engine",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0-70fc7c2",
|
|
4
4
|
"description": "Run JavaScript plugin apps inside Web Workers with host ↔ worker messaging",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
6
|
"type": "module",
|
|
@@ -47,11 +47,6 @@
|
|
|
47
47
|
"README.md",
|
|
48
48
|
"LICENSE.md"
|
|
49
49
|
],
|
|
50
|
-
"dependencies": {
|
|
51
|
-
"@tanstack/react-query": "^5.0.0",
|
|
52
|
-
"date-fns": "^3.6.0",
|
|
53
|
-
"date-fns-tz": "^3.2.0"
|
|
54
|
-
},
|
|
55
50
|
"peerDependencies": {
|
|
56
51
|
"@tanstack/react-query": ">=5",
|
|
57
52
|
"date-fns": ">=3",
|