woodsportal-client-sdk 4.0.4-dev.13 → 4.0.4-dev.15
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/adapters/angular/index.js +4 -4
- package/dist/adapters/react/index.js +4 -4
- package/dist/adapters/vue/index.js +4 -4
- package/dist/auth-error-codes-D7CXVBEN.js +3 -0
- package/dist/auth-error-codes-D7CXVBEN.js.map +1 -0
- package/dist/auth-interceptor-policy-F7JIJWSQ.js +4 -0
- package/dist/auth-interceptor-policy-F7JIJWSQ.js.map +1 -0
- package/dist/auth-utils-VTD5TFYE.js +3 -0
- package/dist/{auth-utils-MNMC2QGX.js.map → auth-utils-VTD5TFYE.js.map} +1 -1
- package/dist/chunk-COHBSTHF.js +82 -0
- package/dist/chunk-COHBSTHF.js.map +1 -0
- package/dist/{chunk-ZMZPDWQL.js → chunk-FY7OTASP.js} +200 -34
- package/dist/chunk-FY7OTASP.js.map +1 -0
- package/dist/{chunk-Y3KEQ6U4.js → chunk-IQELV4FA.js} +4 -4
- package/dist/{chunk-Y3KEQ6U4.js.map → chunk-IQELV4FA.js.map} +1 -1
- package/dist/{chunk-VWVUW5QN.js → chunk-JQDLK3GN.js} +5 -5
- package/dist/{chunk-VWVUW5QN.js.map → chunk-JQDLK3GN.js.map} +1 -1
- package/dist/chunk-MFIGS74G.js +140 -0
- package/dist/chunk-MFIGS74G.js.map +1 -0
- package/dist/{chunk-PWTYQHOQ.js → chunk-O64WTOPM.js} +22 -6
- package/dist/chunk-O64WTOPM.js.map +1 -0
- package/dist/{chunk-6TWR2S4E.js → chunk-PKDLBVD7.js} +120 -7
- package/dist/chunk-PKDLBVD7.js.map +1 -0
- package/dist/{chunk-QPSCMK4W.js → chunk-TVUBMDXX.js} +74 -13
- package/dist/chunk-TVUBMDXX.js.map +1 -0
- package/dist/{chunk-S5NYXGLE.js → chunk-YLJINMP2.js} +3 -3
- package/dist/{chunk-S5NYXGLE.js.map → chunk-YLJINMP2.js.map} +1 -1
- package/dist/entries/auth.d.ts +11 -3
- package/dist/entries/auth.js +7 -4
- package/dist/entries/auth.js.map +1 -1
- package/dist/entries/crm.js +5 -5
- package/dist/{http-errors-DqdtoJ1y.d.ts → http-errors-D8bdo9vF.d.ts} +169 -7
- package/dist/index.d.ts +16 -3
- package/dist/index.js +11 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/auth-utils-MNMC2QGX.js +0 -3
- package/dist/chunk-6TWR2S4E.js.map +0 -1
- package/dist/chunk-PWTYQHOQ.js.map +0 -1
- package/dist/chunk-QPSCMK4W.js.map +0 -1
- package/dist/chunk-ZMZPDWQL.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/main/features/crm/api/pipeline.ts","../src/main/features/crm/api/stage.ts","../src/main/features/crm/api/object.ts","../src/main/features/crm/api/note.ts","../src/main/features/crm/api/email.ts","../src/main/features/crm/api/uploader.ts","../src/main/features/crm/api/file.ts","../src/main/features/crm/api/cache.ts","../src/main/api/nested-crm-api.ts"],"names":["list","actions","create","update","details"],"mappings":";;;;;AAKO,SAAS,KAAK,OAAA,EAAqC;AACtD,EAAA,MAAM,EAAE,MAAA,EAAQ,SAAA,EAAU,GAAI,cAAA,CAAyB,OAAO,OAAA,KAAiB;AAC3E,IAAA,MAAM,KAAA,GAAQ,uBAAuB,OAAO,CAAA;AAE5C,IAAA,MAAM,WAAgB,MAAM,MAAA,CAAO,QAAA,CAAS,IAAA,CAAK,SAAS,KAAK,CAAA;AAC/D,IAAA,OAAO,QAAA;AAAA,EACX,GAAG,OAAO,CAAA;AAEV,EAAA,OAAO;AAAA,IACH,MAAA;AAAA,IACA,IAAA,EAAM,MAAA;AAAA,IACN,YAAA,EAAc,MAAA;AAAA,IACd;AAAA,GACJ;AACJ;;;ACfO,SAASA,MAAK,OAAA,EAAqC;AACtD,EAAA,MAAM,EAAE,MAAA,EAAQ,SAAA,EAAU,GAAI,cAAA,CAAyB,OAA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AAA,EAAMH,KAAAA;AAAA,IACN,MAAA,EAAQE,OAAAA;AAAA,IACR,MAAA,EAAQC;AAAA,GACZ;AAAA,EACA,KAAA,EAAO;AAAA,IACH,IAAA,EAAMH,KAAAA;AAAA,IACN,UAAA,EAAYI,QAAAA;AAAA,IACZ,QAAA;AAAA,IACA,SAAA;AAAA,IACA;AAAA,GACJ;AAAA,EACA,OAAA,EAAS;AAAA,IACL,WAAA,EAAa,WAAA;AAAA,IACb,gBAAA,EAAkB;AAAA,GACtB;AAAA,EACA,KAAA,EAAO;AAAA,IACH,KAAA;AAAA,IACA,cAAA,EAAgB;AAAA;AAExB","file":"chunk-VWVUW5QN.js","sourcesContent":["import { Client } from '../../../core/http/client-assembler'\nimport type { MutationOptions } from '../../../core/types'\nimport { createMutation } from '../../../core/mutation/createMutation'\nimport { resolveListTableParams } from '../helpers/normalize-table-list-params'\n\nexport function list(options?: MutationOptions<any, any>) {\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n const param = resolveListTableParams(payload)\n\n const response: any = await Client.pipeline.list(payload, param)\n return response\n }, options)\n\n return {\n mutate,\n list: mutate,\n getPipelines: mutate,\n isLoading\n }\n}\n","import { Client } from '../../../core/http/client-assembler'\nimport type { MutationOptions } from '../../../core/types'\nimport { createMutation } from '../../../core/mutation/createMutation'\n\nexport function list(options?: MutationOptions<any, any>) {\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n const response: any = await Client.stage.list(payload)\n return response\n }, options)\n\n return {\n mutate,\n list: mutate,\n getStages: mutate,\n isLoading\n }\n}\n","import { Client } from '../../../core/http/client-assembler'\nimport type { MutationOptions } from '../../../core/types'\nimport { createMutation } from '../../../core/mutation/createMutation'\nimport { resolveListTableParams } from '../helpers/normalize-table-list-params'\nimport { actions as tableActions } from '../../../state/crm/use-table'\nimport { actions as multiObjectActions } from '../../../state/crm/use-multi-object'\nimport { actions as formActions } from '../../../state/crm/use-form'\n\nexport function list(options?: MutationOptions<any, any>) {\n const { setObjectsData, setTableData } = tableActions\n\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n const param = resolveListTableParams(payload)\n\n const response: any = await Client.object.list(payload, param)\n\n await setObjectsData(response, {\n stageId: param.stageId as string | number | undefined\n })\n await setTableData(response, payload)\n\n return response\n }, options)\n\n return {\n mutate,\n list: mutate,\n getObjects: mutate,\n isLoading\n }\n}\n\nexport function sideBarList(options?: MutationOptions<any, any>) {\n const { setMultiObjectData } = multiObjectActions\n\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n const response: any = await Client.object.sideBarList(payload)\n setMultiObjectData(response, payload)\n return response\n }, options)\n\n return {\n mutate,\n listSidebar: mutate,\n getSideBarObjects: mutate,\n isLoading\n }\n}\n\nexport function form(options?: MutationOptions<any, any>) {\n const { setFormData } = formActions\n\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n const response: any = await Client.object.form(payload)\n\n setFormData(response)\n\n return response\n }, options)\n\n return {\n mutate,\n getForm: mutate,\n getObjectsForm: mutate,\n isLoading\n }\n}\n\nexport function objectFormOptions(options?: MutationOptions<any, any>) {\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n const response: any = await Client.object.objectFormOptions(payload)\n\n return response\n }, options)\n\n return {\n mutate,\n getFormOptions: mutate,\n objectFormOptions: mutate,\n isLoading\n }\n}\n\nexport function create(options?: MutationOptions<any, any>) {\n const { setTablePrependData } = tableActions\n const { setMultiObjectPrependData } = multiObjectActions\n\n const { mutate, isLoading } = createMutation<any, any>(async (props: any) => {\n if (props?.componentName === 'sidebarTable') await setMultiObjectPrependData('loading', props)\n if (props?.componentName != 'sidebarTable' && props?.componentName != 'sidebarAssociation') await setTablePrependData('loading', props)\n\n const response: any = await Client.object.create(props)\n\n if (props?.componentName === 'sidebarTable') await setMultiObjectPrependData(response, props)\n if (props?.componentName != 'sidebarTable' && props?.componentName != 'sidebarAssociation') await setTablePrependData(response, props)\n\n return response\n }, options)\n\n return {\n mutate,\n create: mutate,\n createObject: mutate,\n isLoading\n }\n}\n\nexport function createExisting(options?: MutationOptions<any, any>) {\n const { mutate, isLoading } = createMutation<any, any>(async (props: any) => {\n const response: any = await Client.object.createExisting(props)\n\n return response\n }, options)\n\n return {\n mutate,\n createExisting: mutate,\n createExistingObject: mutate,\n isLoading\n }\n}\n\nexport function removeExisting(options?: MutationOptions<any, any>) {\n const { mutate, isLoading } = createMutation<any, any>(async (props: any) => {\n const response: any = await Client.object.removeExisting(props)\n\n return response\n }, options)\n\n return {\n mutate,\n removeExisting: mutate,\n removeExistingObject: mutate,\n isLoading\n }\n}\n\nexport function details(options?: MutationOptions<any, any>) {\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n const response: any = await Client.object.details(payload)\n\n return response\n }, options)\n\n return {\n mutate,\n getDetails: mutate,\n getObjectsDetails: mutate,\n isLoading\n }\n}\n\nexport function update(options?: MutationOptions<any, any>) {\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n const response: any = await Client.object.update(payload)\n\n return response\n }, options)\n\n return {\n mutate,\n updateDetails: mutate,\n updateObjectsDetails: mutate,\n isLoading\n }\n}\n","import { Client } from '../../../core/http/client-assembler'\nimport type { MutationOptions } from '../../../core/types'\nimport { createMutation } from '../../../core/mutation/createMutation'\nimport { actions as noteActions } from '../../../state/crm/use-note'\n\nexport function list(options?: MutationOptions<any, any>) {\n const { setNotes } = noteActions\n\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n const response: any = await Client.note.list(payload)\n\n setNotes(response, payload)\n\n return response\n }, options)\n\n return {\n mutate,\n list: mutate,\n getNotes: mutate,\n isLoading\n }\n}\n\nexport function create(options?: MutationOptions<any, any>) {\n const { setPrependNote } = noteActions\n\n const { mutate, isLoading } = createMutation<any, any>(async (props: any) => {\n await setPrependNote('loading')\n const response: any = await Client.note.create(props)\n await setPrependNote(response)\n return response\n }, options)\n\n return {\n mutate,\n create: mutate,\n createNote: mutate,\n isLoading\n }\n}\n\nexport function update(options?: MutationOptions<any, any>) {\n const { updatePrependNote } = noteActions\n\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n // let params: any = makeParam()\n // let mParams: any = { cache: !!params?.cache, isPrimaryCompany: params?.isPrimaryCompany, limit: params?.limit || 5 }\n\n // if (getAuthSubscriptionType() === 'FREE') {\n // mParams.after = params?.after || \"\";\n // } else {\n // mParams.limit = params?.limit || \"\";\n // mParams.page = params?.page || \"\";\n // }\n\n const response: any = await Client.note.update(payload)\n\n return updatePrependNote(response)\n }, options)\n\n return {\n mutate,\n update: mutate,\n updateNote: mutate,\n isLoading\n }\n}\n\n// const makeParam = () => {\n// let params: any = {};\n// const tab = filterParams(\"tabs.notes\")\n// const baseParams: any = {\n// objectId: objectId,\n// id: id,\n// portalId: portalId,\n// cache: (sync || apiSync) ? false : true,\n// isPrimaryCompany: tab?.isPrimaryCompany ? true : false,\n// };\n\n// if (getAuthSubscriptionType() === \"FREE\") {\n// params = {\n// ...baseParams,\n// ...({ after: isFristTimeLoadData && tab?.page ? tab?.page : page }),\n// };\n// } else {\n// params = {\n// ...baseParams,\n// ...({\n// limit: limit,\n// page: isFristTimeLoadData && tab?.page ? tab?.page : page,\n// }),\n// };\n// }\n// return params\n// }\n","import { Client } from '../../../core/http/client-assembler'\nimport type { MutationOptions } from '../../../core/types'\nimport { createMutation } from '../../../core/mutation/createMutation'\nimport { actions as emailActions } from '../../../state/crm/use-email'\n\nexport function list(options?: MutationOptions<any, any>) {\n const { setEmails } = emailActions\n\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n const response: any = await Client.email.list(payload)\n\n setEmails(response, payload)\n\n return response\n }, options)\n\n return {\n mutate,\n list: mutate,\n getEmails: mutate,\n isLoading\n }\n}\n\nexport function create(options?: MutationOptions<any, any>) {\n const { setPrependEmail } = emailActions\n const { mutate, isLoading } = createMutation<any, any>(async (props: any) => {\n await setPrependEmail('loading')\n const response: any = await Client.email.create(props)\n await setPrependEmail(response)\n return response\n }, options)\n\n return {\n mutate,\n create: mutate,\n createEmail: mutate,\n isLoading\n }\n}\n\nexport function update(options?: MutationOptions<any, any>) {\n const { updatePrependEmail } = emailActions\n\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n const response: any = await Client.email.update(payload)\n\n return updatePrependEmail(response)\n }, options)\n\n return {\n mutate,\n update: mutate,\n updateEmail: mutate,\n isLoading\n }\n}\n\n// const makeParam = () => {\n// let params: any = {};\n// const tab = filterParams(\"tabs.notes\")\n// const baseParams: any = {\n// objectId: objectId,\n// id: id,\n// portalId: portalId,\n// cache: (sync || apiSync) ? false : true,\n// isPrimaryCompany: tab?.isPrimaryCompany ? true : false,\n// };\n\n// if (getAuthSubscriptionType() === \"FREE\") {\n// params = {\n// ...baseParams,\n// ...({ after: isFristTimeLoadData && tab?.page ? tab?.page : page }),\n// };\n// } else {\n// params = {\n// ...baseParams,\n// ...({\n// limit: limit,\n// page: isFristTimeLoadData && tab?.page ? tab?.page : page,\n// }),\n// };\n// }\n// return params\n// }\n","import { Client } from '../../../core/http/client-assembler'\nimport type { MutationOptions } from '../../../core/types'\nimport { createMutation } from '../../../core/mutation/createMutation'\nimport { actions as uploaderActions } from '../../../state/crm/use-uploader'\n\nexport function imageUpload(options?: MutationOptions<any, any>) {\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n const response: any = payload?.type === 'email' ? await Client.email.image(payload) : await Client.note.image(payload)\n\n return response\n }, options)\n\n return {\n mutate,\n uploadImage: mutate,\n imageUpload: mutate,\n isLoading\n }\n}\n\nexport function attachmentUpload(options?: MutationOptions<any, any>) {\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n const response: any = payload?.type === 'email' ? await Client.email.attachment(payload) : await Client.note.attachment(payload)\n\n uploaderActions.setAttachment(response)\n\n return response\n }, options)\n\n return {\n mutate,\n uploadAttachment: mutate,\n attachmentUpload: mutate,\n isLoading\n }\n}\n","import { Client } from '../../../core/http/client-assembler'\nimport type { MutationOptions } from '../../../core/types'\nimport { createMutation } from '../../../core/mutation/createMutation'\nimport { actions as fileActions } from '../../../state/crm/use-file'\n\nexport function list(options?: MutationOptions<any, any>) {\n const { setFiles } = fileActions\n\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n const response: any = await Client.file.list(payload)\n\n setFiles(response, payload)\n\n return response\n }, options)\n\n return {\n mutate,\n list: mutate,\n getFiles: mutate,\n isLoading\n }\n}\n\nexport function details(options?: MutationOptions<any, any>) {\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n const response: any = await Client.file.details(payload)\n\n return response\n }, options)\n\n return {\n mutate,\n getDetails: mutate,\n getFile: mutate,\n isLoading\n }\n}\n\nexport function addFolder(options?: MutationOptions<any, any>) {\n const { updateTreeWithCreate } = fileActions\n\n const { mutate, isLoading } = createMutation<any, any>(async (props: any) => {\n const parentFolderId = props?.queryParams?.parentFolderId\n await updateTreeWithCreate(parentFolderId, 'loading')\n const response: any = await Client.file.addFolder(props)\n await updateTreeWithCreate(parentFolderId, response, 'folder')\n return response\n }, options)\n\n return {\n mutate,\n addFolder: mutate,\n isLoading\n }\n}\n\nexport function addFile(options?: MutationOptions<any, any>) {\n const { updateTreeWithCreate } = fileActions\n\n const { mutate, isLoading } = createMutation<any, any>(async (props: any) => {\n const parentFolderId = props?.queryParams?.parentFolderId\n await updateTreeWithCreate(parentFolderId, 'loading')\n const response: any = await Client.file.addFile(props)\n await updateTreeWithCreate(parentFolderId, response, 'file')\n return response\n }, options)\n\n return {\n mutate,\n addFile: mutate,\n isLoading\n }\n}\n\nexport function download(options?: MutationOptions<any, any>) {\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n const response: any = await Client.file.download(payload)\n return response\n }, options)\n\n return {\n mutate,\n download: mutate,\n downloadFile: mutate,\n isLoading\n }\n}\n","import { Client } from '../../../core/http/client-assembler'\nimport type { MutationOptions } from '../../../core/types'\nimport { createMutation } from '../../../core/mutation/createMutation'\n\n/** Soft refresh CRM list cache (prefer over GET cache=false when purge API is enabled). */\nexport function purge(options?: MutationOptions<unknown, unknown>) {\n const { mutate, isLoading } = createMutation<Record<string, unknown>, unknown>(async (payload?: Record<string, unknown>) => {\n const safePayload = payload ?? {}\n const idempotencyKey = typeof safePayload.idempotencyKey === 'string' ? safePayload.idempotencyKey : undefined\n const headers = idempotencyKey ? { 'Idempotency-Key': idempotencyKey } : undefined\n const { idempotencyKey: _ignored, ...body } = safePayload\n return Client.cache.purge(body, headers)\n }, options)\n\n return { mutate, purge: mutate, purgeCache: mutate, isLoading }\n}\n\nexport function purgeStatus(purgeJobId: string, options?: MutationOptions<unknown, unknown>) {\n const { mutate, isLoading } = createMutation<string, unknown>(async (jobId?: string) => Client.cache.purgeStatus(jobId ?? purgeJobId), options)\n\n return {\n mutate,\n getPurgeStatus: mutate,\n isLoading\n }\n}\n","import { list as pipelinesList } from '../features/crm/api/pipeline'\nimport { list as stagesList } from '../features/crm/api/stage'\nimport {\n list as objectsList,\n sideBarList as objectsListSidebar,\n form as objectsGetForm,\n create as objectsCreate,\n createExisting as objectsCreateExisting,\n removeExisting as objectsRemoveExisting,\n details as objectsGetDetails,\n update as objectsUpdateDetails,\n objectFormOptions as objectsGetFormOptions\n} from '../features/crm/api/object'\nimport { list as notesList, create as notesCreate, update as notesUpdate } from '../features/crm/api/note'\nimport { list as emailsList, create as emailsCreate, update as emailsUpdate } from '../features/crm/api/email'\nimport { imageUpload, attachmentUpload } from '../features/crm/api/uploader'\nimport { list as filesList, addFolder, addFile, details as filesGetDetails, download as filesDownload } from '../features/crm/api/file'\nimport { purge as cachePurge, purgeStatus as cacheGetPurgeStatus } from '../features/crm/api/cache'\n\n/** Canonical nested CRM API (SDK 3.0). */\nexport const crmApi = {\n pipelines: { list: pipelinesList },\n stages: { list: stagesList },\n objects: {\n list: objectsList,\n listSidebar: objectsListSidebar,\n getForm: objectsGetForm,\n getFormOptions: objectsGetFormOptions,\n getDetails: objectsGetDetails,\n updateDetails: objectsUpdateDetails,\n create: objectsCreate,\n createExisting: objectsCreateExisting,\n removeExisting: objectsRemoveExisting\n },\n notes: {\n list: notesList,\n create: notesCreate,\n update: notesUpdate\n },\n emails: {\n list: emailsList,\n create: emailsCreate,\n update: emailsUpdate\n },\n files: {\n list: filesList,\n getDetails: filesGetDetails,\n download: filesDownload,\n addFolder,\n addFile\n },\n uploads: {\n uploadImage: imageUpload,\n uploadAttachment: attachmentUpload\n },\n cache: {\n purge: cachePurge,\n getPurgeStatus: cacheGetPurgeStatus\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/main/features/crm/api/pipeline.ts","../src/main/features/crm/api/stage.ts","../src/main/features/crm/api/object.ts","../src/main/features/crm/api/note.ts","../src/main/features/crm/api/email.ts","../src/main/features/crm/api/uploader.ts","../src/main/features/crm/api/file.ts","../src/main/features/crm/api/cache.ts","../src/main/api/nested-crm-api.ts"],"names":["list","actions","create","update","details"],"mappings":";;;;;AAKO,SAAS,KAAK,OAAA,EAAqC;AACtD,EAAA,MAAM,EAAE,MAAA,EAAQ,SAAA,EAAU,GAAI,cAAA,CAAyB,OAAO,OAAA,KAAiB;AAC3E,IAAA,MAAM,KAAA,GAAQ,uBAAuB,OAAO,CAAA;AAE5C,IAAA,MAAM,WAAgB,MAAM,MAAA,CAAO,QAAA,CAAS,IAAA,CAAK,SAAS,KAAK,CAAA;AAC/D,IAAA,OAAO,QAAA;AAAA,EACX,GAAG,OAAO,CAAA;AAEV,EAAA,OAAO;AAAA,IACH,MAAA;AAAA,IACA,IAAA,EAAM,MAAA;AAAA,IACN,YAAA,EAAc,MAAA;AAAA,IACd;AAAA,GACJ;AACJ;;;ACfO,SAASA,MAAK,OAAA,EAAqC;AACtD,EAAA,MAAM,EAAE,MAAA,EAAQ,SAAA,EAAU,GAAI,cAAA,CAAyB,OAAO,OAAA,KAAiB;AAC3E,IAAA,MAAM,QAAA,GAAgB,MAAM,MAAA,CAAO,KAAA,CAAM,KAAK,OAAO,CAAA;AACrD,IAAA,OAAO,QAAA;AAAA,EAC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AMH,KAAAA;AAAA,IACN,UAAA,EAAYI,QAAAA;AAAA,IACZ,QAAA;AAAA,IACA,SAAA;AAAA,IACA;AAAA,GACJ;AAAA,EACA,OAAA,EAAS;AAAA,IACL,WAAA,EAAa,WAAA;AAAA,IACb,gBAAA,EAAkB;AAAA,GACtB;AAAA,EACA,KAAA,EAAO;AAAA,IACH,KAAA;AAAA,IACA,cAAA,EAAgB;AAAA;AAExB","file":"chunk-JQDLK3GN.js","sourcesContent":["import { Client } from '../../../core/http/client-assembler'\nimport type { MutationOptions } from '../../../core/types'\nimport { createMutation } from '../../../core/mutation/createMutation'\nimport { resolveListTableParams } from '../helpers/normalize-table-list-params'\n\nexport function list(options?: MutationOptions<any, any>) {\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n const param = resolveListTableParams(payload)\n\n const response: any = await Client.pipeline.list(payload, param)\n return response\n }, options)\n\n return {\n mutate,\n list: mutate,\n getPipelines: mutate,\n isLoading\n }\n}\n","import { Client } from '../../../core/http/client-assembler'\nimport type { MutationOptions } from '../../../core/types'\nimport { createMutation } from '../../../core/mutation/createMutation'\n\nexport function list(options?: MutationOptions<any, any>) {\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n const response: any = await Client.stage.list(payload)\n return response\n }, options)\n\n return {\n mutate,\n list: mutate,\n getStages: mutate,\n isLoading\n }\n}\n","import { Client } from '../../../core/http/client-assembler'\nimport type { MutationOptions } from '../../../core/types'\nimport { createMutation } from '../../../core/mutation/createMutation'\nimport { resolveListTableParams } from '../helpers/normalize-table-list-params'\nimport { actions as tableActions } from '../../../state/crm/use-table'\nimport { actions as multiObjectActions } from '../../../state/crm/use-multi-object'\nimport { actions as formActions } from '../../../state/crm/use-form'\n\nexport function list(options?: MutationOptions<any, any>) {\n const { setObjectsData, setTableData } = tableActions\n\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n const param = resolveListTableParams(payload)\n\n const response: any = await Client.object.list(payload, param)\n\n await setObjectsData(response, {\n stageId: param.stageId as string | number | undefined\n })\n await setTableData(response, payload)\n\n return response\n }, options)\n\n return {\n mutate,\n list: mutate,\n getObjects: mutate,\n isLoading\n }\n}\n\nexport function sideBarList(options?: MutationOptions<any, any>) {\n const { setMultiObjectData } = multiObjectActions\n\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n const response: any = await Client.object.sideBarList(payload)\n setMultiObjectData(response, payload)\n return response\n }, options)\n\n return {\n mutate,\n listSidebar: mutate,\n getSideBarObjects: mutate,\n isLoading\n }\n}\n\nexport function form(options?: MutationOptions<any, any>) {\n const { setFormData } = formActions\n\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n const response: any = await Client.object.form(payload)\n\n setFormData(response)\n\n return response\n }, options)\n\n return {\n mutate,\n getForm: mutate,\n getObjectsForm: mutate,\n isLoading\n }\n}\n\nexport function objectFormOptions(options?: MutationOptions<any, any>) {\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n const response: any = await Client.object.objectFormOptions(payload)\n\n return response\n }, options)\n\n return {\n mutate,\n getFormOptions: mutate,\n objectFormOptions: mutate,\n isLoading\n }\n}\n\nexport function create(options?: MutationOptions<any, any>) {\n const { setTablePrependData } = tableActions\n const { setMultiObjectPrependData } = multiObjectActions\n\n const { mutate, isLoading } = createMutation<any, any>(async (props: any) => {\n if (props?.componentName === 'sidebarTable') await setMultiObjectPrependData('loading', props)\n if (props?.componentName != 'sidebarTable' && props?.componentName != 'sidebarAssociation') await setTablePrependData('loading', props)\n\n const response: any = await Client.object.create(props)\n\n if (props?.componentName === 'sidebarTable') await setMultiObjectPrependData(response, props)\n if (props?.componentName != 'sidebarTable' && props?.componentName != 'sidebarAssociation') await setTablePrependData(response, props)\n\n return response\n }, options)\n\n return {\n mutate,\n create: mutate,\n createObject: mutate,\n isLoading\n }\n}\n\nexport function createExisting(options?: MutationOptions<any, any>) {\n const { mutate, isLoading } = createMutation<any, any>(async (props: any) => {\n const response: any = await Client.object.createExisting(props)\n\n return response\n }, options)\n\n return {\n mutate,\n createExisting: mutate,\n createExistingObject: mutate,\n isLoading\n }\n}\n\nexport function removeExisting(options?: MutationOptions<any, any>) {\n const { mutate, isLoading } = createMutation<any, any>(async (props: any) => {\n const response: any = await Client.object.removeExisting(props)\n\n return response\n }, options)\n\n return {\n mutate,\n removeExisting: mutate,\n removeExistingObject: mutate,\n isLoading\n }\n}\n\nexport function details(options?: MutationOptions<any, any>) {\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n const response: any = await Client.object.details(payload)\n\n return response\n }, options)\n\n return {\n mutate,\n getDetails: mutate,\n getObjectsDetails: mutate,\n isLoading\n }\n}\n\nexport function update(options?: MutationOptions<any, any>) {\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n const response: any = await Client.object.update(payload)\n\n return response\n }, options)\n\n return {\n mutate,\n updateDetails: mutate,\n updateObjectsDetails: mutate,\n isLoading\n }\n}\n","import { Client } from '../../../core/http/client-assembler'\nimport type { MutationOptions } from '../../../core/types'\nimport { createMutation } from '../../../core/mutation/createMutation'\nimport { actions as noteActions } from '../../../state/crm/use-note'\n\nexport function list(options?: MutationOptions<any, any>) {\n const { setNotes } = noteActions\n\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n const response: any = await Client.note.list(payload)\n\n setNotes(response, payload)\n\n return response\n }, options)\n\n return {\n mutate,\n list: mutate,\n getNotes: mutate,\n isLoading\n }\n}\n\nexport function create(options?: MutationOptions<any, any>) {\n const { setPrependNote } = noteActions\n\n const { mutate, isLoading } = createMutation<any, any>(async (props: any) => {\n await setPrependNote('loading')\n const response: any = await Client.note.create(props)\n await setPrependNote(response)\n return response\n }, options)\n\n return {\n mutate,\n create: mutate,\n createNote: mutate,\n isLoading\n }\n}\n\nexport function update(options?: MutationOptions<any, any>) {\n const { updatePrependNote } = noteActions\n\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n // let params: any = makeParam()\n // let mParams: any = { cache: !!params?.cache, isPrimaryCompany: params?.isPrimaryCompany, limit: params?.limit || 5 }\n\n // if (getAuthSubscriptionType() === 'FREE') {\n // mParams.after = params?.after || \"\";\n // } else {\n // mParams.limit = params?.limit || \"\";\n // mParams.page = params?.page || \"\";\n // }\n\n const response: any = await Client.note.update(payload)\n\n return updatePrependNote(response)\n }, options)\n\n return {\n mutate,\n update: mutate,\n updateNote: mutate,\n isLoading\n }\n}\n\n// const makeParam = () => {\n// let params: any = {};\n// const tab = filterParams(\"tabs.notes\")\n// const baseParams: any = {\n// objectId: objectId,\n// id: id,\n// portalId: portalId,\n// cache: (sync || apiSync) ? false : true,\n// isPrimaryCompany: tab?.isPrimaryCompany ? true : false,\n// };\n\n// if (getAuthSubscriptionType() === \"FREE\") {\n// params = {\n// ...baseParams,\n// ...({ after: isFristTimeLoadData && tab?.page ? tab?.page : page }),\n// };\n// } else {\n// params = {\n// ...baseParams,\n// ...({\n// limit: limit,\n// page: isFristTimeLoadData && tab?.page ? tab?.page : page,\n// }),\n// };\n// }\n// return params\n// }\n","import { Client } from '../../../core/http/client-assembler'\nimport type { MutationOptions } from '../../../core/types'\nimport { createMutation } from '../../../core/mutation/createMutation'\nimport { actions as emailActions } from '../../../state/crm/use-email'\n\nexport function list(options?: MutationOptions<any, any>) {\n const { setEmails } = emailActions\n\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n const response: any = await Client.email.list(payload)\n\n setEmails(response, payload)\n\n return response\n }, options)\n\n return {\n mutate,\n list: mutate,\n getEmails: mutate,\n isLoading\n }\n}\n\nexport function create(options?: MutationOptions<any, any>) {\n const { setPrependEmail } = emailActions\n const { mutate, isLoading } = createMutation<any, any>(async (props: any) => {\n await setPrependEmail('loading')\n const response: any = await Client.email.create(props)\n await setPrependEmail(response)\n return response\n }, options)\n\n return {\n mutate,\n create: mutate,\n createEmail: mutate,\n isLoading\n }\n}\n\nexport function update(options?: MutationOptions<any, any>) {\n const { updatePrependEmail } = emailActions\n\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n const response: any = await Client.email.update(payload)\n\n return updatePrependEmail(response)\n }, options)\n\n return {\n mutate,\n update: mutate,\n updateEmail: mutate,\n isLoading\n }\n}\n\n// const makeParam = () => {\n// let params: any = {};\n// const tab = filterParams(\"tabs.notes\")\n// const baseParams: any = {\n// objectId: objectId,\n// id: id,\n// portalId: portalId,\n// cache: (sync || apiSync) ? false : true,\n// isPrimaryCompany: tab?.isPrimaryCompany ? true : false,\n// };\n\n// if (getAuthSubscriptionType() === \"FREE\") {\n// params = {\n// ...baseParams,\n// ...({ after: isFristTimeLoadData && tab?.page ? tab?.page : page }),\n// };\n// } else {\n// params = {\n// ...baseParams,\n// ...({\n// limit: limit,\n// page: isFristTimeLoadData && tab?.page ? tab?.page : page,\n// }),\n// };\n// }\n// return params\n// }\n","import { Client } from '../../../core/http/client-assembler'\nimport type { MutationOptions } from '../../../core/types'\nimport { createMutation } from '../../../core/mutation/createMutation'\nimport { actions as uploaderActions } from '../../../state/crm/use-uploader'\n\nexport function imageUpload(options?: MutationOptions<any, any>) {\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n const response: any = payload?.type === 'email' ? await Client.email.image(payload) : await Client.note.image(payload)\n\n return response\n }, options)\n\n return {\n mutate,\n uploadImage: mutate,\n imageUpload: mutate,\n isLoading\n }\n}\n\nexport function attachmentUpload(options?: MutationOptions<any, any>) {\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n const response: any = payload?.type === 'email' ? await Client.email.attachment(payload) : await Client.note.attachment(payload)\n\n uploaderActions.setAttachment(response)\n\n return response\n }, options)\n\n return {\n mutate,\n uploadAttachment: mutate,\n attachmentUpload: mutate,\n isLoading\n }\n}\n","import { Client } from '../../../core/http/client-assembler'\nimport type { MutationOptions } from '../../../core/types'\nimport { createMutation } from '../../../core/mutation/createMutation'\nimport { actions as fileActions } from '../../../state/crm/use-file'\n\nexport function list(options?: MutationOptions<any, any>) {\n const { setFiles } = fileActions\n\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n const response: any = await Client.file.list(payload)\n\n setFiles(response, payload)\n\n return response\n }, options)\n\n return {\n mutate,\n list: mutate,\n getFiles: mutate,\n isLoading\n }\n}\n\nexport function details(options?: MutationOptions<any, any>) {\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n const response: any = await Client.file.details(payload)\n\n return response\n }, options)\n\n return {\n mutate,\n getDetails: mutate,\n getFile: mutate,\n isLoading\n }\n}\n\nexport function addFolder(options?: MutationOptions<any, any>) {\n const { updateTreeWithCreate } = fileActions\n\n const { mutate, isLoading } = createMutation<any, any>(async (props: any) => {\n const parentFolderId = props?.queryParams?.parentFolderId\n await updateTreeWithCreate(parentFolderId, 'loading')\n const response: any = await Client.file.addFolder(props)\n await updateTreeWithCreate(parentFolderId, response, 'folder')\n return response\n }, options)\n\n return {\n mutate,\n addFolder: mutate,\n isLoading\n }\n}\n\nexport function addFile(options?: MutationOptions<any, any>) {\n const { updateTreeWithCreate } = fileActions\n\n const { mutate, isLoading } = createMutation<any, any>(async (props: any) => {\n const parentFolderId = props?.queryParams?.parentFolderId\n await updateTreeWithCreate(parentFolderId, 'loading')\n const response: any = await Client.file.addFile(props)\n await updateTreeWithCreate(parentFolderId, response, 'file')\n return response\n }, options)\n\n return {\n mutate,\n addFile: mutate,\n isLoading\n }\n}\n\nexport function download(options?: MutationOptions<any, any>) {\n const { mutate, isLoading } = createMutation<any, any>(async (payload: any) => {\n const response: any = await Client.file.download(payload)\n return response\n }, options)\n\n return {\n mutate,\n download: mutate,\n downloadFile: mutate,\n isLoading\n }\n}\n","import { Client } from '../../../core/http/client-assembler'\nimport type { MutationOptions } from '../../../core/types'\nimport { createMutation } from '../../../core/mutation/createMutation'\n\n/** Soft refresh CRM list cache (prefer over GET cache=false when purge API is enabled). */\nexport function purge(options?: MutationOptions<unknown, unknown>) {\n const { mutate, isLoading } = createMutation<Record<string, unknown>, unknown>(async (payload?: Record<string, unknown>) => {\n const safePayload = payload ?? {}\n const idempotencyKey = typeof safePayload.idempotencyKey === 'string' ? safePayload.idempotencyKey : undefined\n const headers = idempotencyKey ? { 'Idempotency-Key': idempotencyKey } : undefined\n const { idempotencyKey: _ignored, ...body } = safePayload\n return Client.cache.purge(body, headers)\n }, options)\n\n return { mutate, purge: mutate, purgeCache: mutate, isLoading }\n}\n\nexport function purgeStatus(purgeJobId: string, options?: MutationOptions<unknown, unknown>) {\n const { mutate, isLoading } = createMutation<string, unknown>(async (jobId?: string) => Client.cache.purgeStatus(jobId ?? purgeJobId), options)\n\n return {\n mutate,\n getPurgeStatus: mutate,\n isLoading\n }\n}\n","import { list as pipelinesList } from '../features/crm/api/pipeline'\nimport { list as stagesList } from '../features/crm/api/stage'\nimport {\n list as objectsList,\n sideBarList as objectsListSidebar,\n form as objectsGetForm,\n create as objectsCreate,\n createExisting as objectsCreateExisting,\n removeExisting as objectsRemoveExisting,\n details as objectsGetDetails,\n update as objectsUpdateDetails,\n objectFormOptions as objectsGetFormOptions\n} from '../features/crm/api/object'\nimport { list as notesList, create as notesCreate, update as notesUpdate } from '../features/crm/api/note'\nimport { list as emailsList, create as emailsCreate, update as emailsUpdate } from '../features/crm/api/email'\nimport { imageUpload, attachmentUpload } from '../features/crm/api/uploader'\nimport { list as filesList, addFolder, addFile, details as filesGetDetails, download as filesDownload } from '../features/crm/api/file'\nimport { purge as cachePurge, purgeStatus as cacheGetPurgeStatus } from '../features/crm/api/cache'\n\n/** Canonical nested CRM API (SDK 3.0). */\nexport const crmApi = {\n pipelines: { list: pipelinesList },\n stages: { list: stagesList },\n objects: {\n list: objectsList,\n listSidebar: objectsListSidebar,\n getForm: objectsGetForm,\n getFormOptions: objectsGetFormOptions,\n getDetails: objectsGetDetails,\n updateDetails: objectsUpdateDetails,\n create: objectsCreate,\n createExisting: objectsCreateExisting,\n removeExisting: objectsRemoveExisting\n },\n notes: {\n list: notesList,\n create: notesCreate,\n update: notesUpdate\n },\n emails: {\n list: emailsList,\n create: emailsCreate,\n update: emailsUpdate\n },\n files: {\n list: filesList,\n getDetails: filesGetDetails,\n download: filesDownload,\n addFolder,\n addFile\n },\n uploads: {\n uploadImage: imageUpload,\n uploadAttachment: attachmentUpload\n },\n cache: {\n purge: cachePurge,\n getPurgeStatus: cacheGetPurgeStatus\n }\n}\n"]}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { AuthErrorCode } from './chunk-COHBSTHF.js';
|
|
2
|
+
|
|
3
|
+
// src/main/core/auth/auth-interceptor-policy.ts
|
|
4
|
+
var DEFAULT_SESSION_PROBE_SUFFIXES = ["/auth/me"];
|
|
5
|
+
function normalizeRequestUrl(url) {
|
|
6
|
+
if (!url) return "";
|
|
7
|
+
try {
|
|
8
|
+
if (url.startsWith("http")) {
|
|
9
|
+
return new URL(url).pathname;
|
|
10
|
+
}
|
|
11
|
+
} catch {
|
|
12
|
+
}
|
|
13
|
+
return url.split("?")[0] ?? url;
|
|
14
|
+
}
|
|
15
|
+
function isOptionalAuthFailureUrl(url, config) {
|
|
16
|
+
const path = normalizeRequestUrl(url);
|
|
17
|
+
if (!path) return false;
|
|
18
|
+
if (config.optionalAuthFailurePaths?.includes(path)) {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
if (config.includeAdminMfaSecurityPrefixes) {
|
|
22
|
+
if (path.includes("/api/admin/auth/security/")) return true;
|
|
23
|
+
if (path.includes("/api/admin/auth/mfa/webauthn/")) return true;
|
|
24
|
+
if (path.includes("/api/auth/security/")) return true;
|
|
25
|
+
if (path.includes("/api/auth/mfa/webauthn/")) return true;
|
|
26
|
+
}
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
function isSessionProbeUrl(url, config) {
|
|
30
|
+
const path = normalizeRequestUrl(url);
|
|
31
|
+
if (!path) return false;
|
|
32
|
+
if (config.sessionProbePaths?.includes(path)) return true;
|
|
33
|
+
return DEFAULT_SESSION_PROBE_SUFFIXES.some((suffix) => path.endsWith(suffix));
|
|
34
|
+
}
|
|
35
|
+
function persistAuthError(payload) {
|
|
36
|
+
const data = {
|
|
37
|
+
...payload,
|
|
38
|
+
ts: Date.now()
|
|
39
|
+
};
|
|
40
|
+
if (typeof window !== "undefined" && window.sessionStorage) {
|
|
41
|
+
sessionStorage.setItem("authError", JSON.stringify(data));
|
|
42
|
+
}
|
|
43
|
+
return data;
|
|
44
|
+
}
|
|
45
|
+
function logoutAction(errorCode, routes) {
|
|
46
|
+
if (errorCode === AuthErrorCode.HUBSPOT_REAUTH_REQUIRED) {
|
|
47
|
+
return {
|
|
48
|
+
kind: "redirect",
|
|
49
|
+
route: routes.accountSelect,
|
|
50
|
+
clearSession: false
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
kind: "logout",
|
|
55
|
+
route: routes.unauthorized,
|
|
56
|
+
clearSession: true
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function resolveByErrorCode(errorCode, status, url, isRetryRequest, policy) {
|
|
60
|
+
const { routes } = policy;
|
|
61
|
+
switch (errorCode) {
|
|
62
|
+
case AuthErrorCode.TOKEN_EXPIRED:
|
|
63
|
+
case AuthErrorCode.TOKEN_INVALID:
|
|
64
|
+
case AuthErrorCode.AUTHENTICATION_FAILED:
|
|
65
|
+
return isRetryRequest ? logoutAction(errorCode, routes) : { kind: "refresh_retry" };
|
|
66
|
+
case AuthErrorCode.MISSING_REFRESH_TOKEN:
|
|
67
|
+
case AuthErrorCode.ACCESS_UNAUTHORIZED:
|
|
68
|
+
return logoutAction(errorCode, routes);
|
|
69
|
+
case AuthErrorCode.ACCOUNT_LOCKED:
|
|
70
|
+
case AuthErrorCode.ACCOUNT_DISABLED:
|
|
71
|
+
return {
|
|
72
|
+
kind: "redirect",
|
|
73
|
+
route: routes.unauthorized,
|
|
74
|
+
clearSession: true
|
|
75
|
+
};
|
|
76
|
+
case AuthErrorCode.LOGIN_FAILED:
|
|
77
|
+
case AuthErrorCode.INVALID_CREDENTIALS:
|
|
78
|
+
return { kind: "reject" };
|
|
79
|
+
case AuthErrorCode.EMAIL_NOT_VERIFIED:
|
|
80
|
+
return {
|
|
81
|
+
kind: "redirect",
|
|
82
|
+
route: routes.resendEmail,
|
|
83
|
+
clearSession: false
|
|
84
|
+
};
|
|
85
|
+
case AuthErrorCode.TWO_FACTOR_REQUIRED:
|
|
86
|
+
return {
|
|
87
|
+
kind: "redirect",
|
|
88
|
+
route: routes.twoFa,
|
|
89
|
+
clearSession: false
|
|
90
|
+
};
|
|
91
|
+
case AuthErrorCode.HUBSPOT_REAUTH_REQUIRED:
|
|
92
|
+
return {
|
|
93
|
+
kind: "redirect",
|
|
94
|
+
route: routes.accountSelect,
|
|
95
|
+
clearSession: false
|
|
96
|
+
};
|
|
97
|
+
case AuthErrorCode.OAUTH_PROCESSING_ERROR:
|
|
98
|
+
case AuthErrorCode.PORTAL_INACTIVE:
|
|
99
|
+
case AuthErrorCode.AMBIGUOUS_HUB_ID:
|
|
100
|
+
case AuthErrorCode.MISSING_HEADERS:
|
|
101
|
+
case AuthErrorCode.COMMERCIAL_ACCESS_EXPIRED:
|
|
102
|
+
return { kind: "reject" };
|
|
103
|
+
case AuthErrorCode.ACCESS_DENIED:
|
|
104
|
+
case AuthErrorCode.ACCESS_FORBIDDEN:
|
|
105
|
+
if (isSessionProbeUrl(url, policy)) {
|
|
106
|
+
return {
|
|
107
|
+
kind: "redirect",
|
|
108
|
+
route: routes.unauthorized,
|
|
109
|
+
clearSession: false
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
return { kind: "reject" };
|
|
113
|
+
default:
|
|
114
|
+
if (status === 401) {
|
|
115
|
+
return isRetryRequest ? logoutAction(errorCode, routes) : { kind: "refresh_retry" };
|
|
116
|
+
}
|
|
117
|
+
if (status === 403) {
|
|
118
|
+
return isSessionProbeUrl(url, policy) ? {
|
|
119
|
+
kind: "redirect",
|
|
120
|
+
route: routes.unauthorized,
|
|
121
|
+
clearSession: false
|
|
122
|
+
} : { kind: "reject" };
|
|
123
|
+
}
|
|
124
|
+
return { kind: "reject" };
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
function resolveAuthErrorAction(input) {
|
|
128
|
+
const { status, errorCode, url, skipGlobalAuthRedirect, isRetryRequest, policy } = input;
|
|
129
|
+
if (status !== 401 && status !== 403) {
|
|
130
|
+
return { kind: "reject" };
|
|
131
|
+
}
|
|
132
|
+
if (skipGlobalAuthRedirect || isOptionalAuthFailureUrl(url, policy)) {
|
|
133
|
+
return { kind: "reject" };
|
|
134
|
+
}
|
|
135
|
+
return resolveByErrorCode(errorCode, status, url ?? "", isRetryRequest, policy);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export { isOptionalAuthFailureUrl, isSessionProbeUrl, persistAuthError, resolveAuthErrorAction };
|
|
139
|
+
//# sourceMappingURL=chunk-MFIGS74G.js.map
|
|
140
|
+
//# sourceMappingURL=chunk-MFIGS74G.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/main/core/auth/auth-interceptor-policy.ts"],"names":[],"mappings":";;;AAiCA,IAAM,8BAAA,GAAiC,CAAC,UAAU,CAAA;AAElD,SAAS,oBAAoB,GAAA,EAAsB;AAC/C,EAAA,IAAI,CAAC,KAAK,OAAO,EAAA;AACjB,EAAA,IAAI;AACA,IAAA,IAAI,GAAA,CAAI,UAAA,CAAW,MAAM,CAAA,EAAG;AACxB,MAAA,OAAO,IAAI,GAAA,CAAI,GAAG,CAAA,CAAE,QAAA;AAAA,IACxB;AAAA,EACJ,CAAA,CAAA,MAAQ;AAAA,EAER;AACA,EAAA,OAAO,GAAA,CAAI,KAAA,CAAM,GAAG,CAAA,CAAE,CAAC,CAAA,IAAK,GAAA;AAChC;AAEO,SAAS,wBAAA,CAAyB,KAAyB,MAAA,EAA8C;AAC5G,EAAA,MAAM,IAAA,GAAO,oBAAoB,GAAG,CAAA;AACpC,EAAA,IAAI,CAAC,MAAM,OAAO,KAAA;AAElB,EAAA,IAAI,MAAA,CAAO,wBAAA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AA,EAOnB;AAChB,EAAA,MAAM,EAAE,MAAA,EAAQ,SAAA,EAAW,KAAK,sBAAA,EAAwB,cAAA,EAAgB,QAAO,GAAI,KAAA;AAEnF,EAAA,IAAI,MAAA,KAAW,GAAA,IAAO,MAAA,KAAW,GAAA,EAAK;AAClC,IAAA,OAAO,EAAE,MAAM,QAAA,EAAS;AAAA,EAC5B;AAEA,EAAA,IAAI,sBAAA,IAA0B,wBAAA,CAAyB,GAAA,EAAK,MAAM,CAAA,EAAG;AACjE,IAAA,OAAO,EAAE,MAAM,QAAA,EAAS;AAAA,EAC5B;AAEA,EAAA,OAAO,mBAAmB,SAAA,EAAW,MAAA,EAAQ,GAAA,IAAO,EAAA,EAAI,gBAAgB,MAAM,CAAA;AAClF","file":"chunk-MFIGS74G.js","sourcesContent":["import { AuthErrorCode, type ApiErrorPayload } from './auth-error-codes.js'\n\nexport type WoodsportalRequestConfig = {\n __isRetryRequest?: boolean\n skipGlobalAuthRedirect?: boolean\n url?: string\n}\n\nexport type AuthErrorAction =\n | { kind: 'refresh_retry' }\n | { kind: 'reject' }\n | { kind: 'redirect'; route: string; clearSession: boolean }\n | { kind: 'logout'; route: string; clearSession: boolean }\n\n/** Lane-specific routes for auth error redirects (hash or path prefixes supplied by each app). */\nexport type AuthPolicyRoutes = {\n unauthorized: string\n login: string\n twoFa: string\n resendEmail: string\n accountSelect: string\n}\n\nexport type AuthInterceptorPolicyConfig = {\n routes: AuthPolicyRoutes\n /** Request paths that must not trigger global logout (e.g. MFA enrollment). */\n optionalAuthFailurePaths?: string[]\n /** Paths treated as session probes (401/403 → unauthorized page). */\n sessionProbePaths?: string[]\n /** When true, optional MFA/security path prefixes match. */\n includeAdminMfaSecurityPrefixes?: boolean\n}\n\nconst DEFAULT_SESSION_PROBE_SUFFIXES = ['/auth/me']\n\nfunction normalizeRequestUrl(url?: string): string {\n if (!url) return ''\n try {\n if (url.startsWith('http')) {\n return new URL(url).pathname\n }\n } catch {\n // fall through\n }\n return url.split('?')[0] ?? url\n}\n\nexport function isOptionalAuthFailureUrl(url: string | undefined, config: AuthInterceptorPolicyConfig): boolean {\n const path = normalizeRequestUrl(url)\n if (!path) return false\n\n if (config.optionalAuthFailurePaths?.includes(path)) {\n return true\n }\n\n if (config.includeAdminMfaSecurityPrefixes) {\n if (path.includes('/api/admin/auth/security/')) return true\n if (path.includes('/api/admin/auth/mfa/webauthn/')) return true\n if (path.includes('/api/auth/security/')) return true\n if (path.includes('/api/auth/mfa/webauthn/')) return true\n }\n\n return false\n}\n\nexport function isSessionProbeUrl(url: string | undefined, config: AuthInterceptorPolicyConfig): boolean {\n const path = normalizeRequestUrl(url)\n if (!path) return false\n if (config.sessionProbePaths?.includes(path)) return true\n return DEFAULT_SESSION_PROBE_SUFFIXES.some((suffix) => path.endsWith(suffix))\n}\n\nexport function persistAuthError(payload: ApiErrorPayload): ApiErrorPayload & { ts: number } {\n const data = {\n ...payload,\n ts: Date.now()\n }\n if (typeof window !== 'undefined' && window.sessionStorage) {\n sessionStorage.setItem('authError', JSON.stringify(data))\n }\n return data\n}\n\nfunction logoutAction(errorCode: string | undefined, routes: AuthPolicyRoutes): AuthErrorAction {\n if (errorCode === AuthErrorCode.HUBSPOT_REAUTH_REQUIRED) {\n return {\n kind: 'redirect',\n route: routes.accountSelect,\n clearSession: false\n }\n }\n return {\n kind: 'logout',\n route: routes.unauthorized,\n clearSession: true\n }\n}\n\nfunction resolveByErrorCode(\n errorCode: string | undefined,\n status: number,\n url: string,\n isRetryRequest: boolean | undefined,\n policy: AuthInterceptorPolicyConfig\n): AuthErrorAction {\n const { routes } = policy\n\n switch (errorCode) {\n case AuthErrorCode.TOKEN_EXPIRED:\n case AuthErrorCode.TOKEN_INVALID:\n case AuthErrorCode.AUTHENTICATION_FAILED:\n return isRetryRequest ? logoutAction(errorCode, routes) : { kind: 'refresh_retry' }\n\n case AuthErrorCode.MISSING_REFRESH_TOKEN:\n case AuthErrorCode.ACCESS_UNAUTHORIZED:\n return logoutAction(errorCode, routes)\n\n case AuthErrorCode.ACCOUNT_LOCKED:\n case AuthErrorCode.ACCOUNT_DISABLED:\n return {\n kind: 'redirect',\n route: routes.unauthorized,\n clearSession: true\n }\n\n case AuthErrorCode.LOGIN_FAILED:\n case AuthErrorCode.INVALID_CREDENTIALS:\n return { kind: 'reject' }\n\n case AuthErrorCode.EMAIL_NOT_VERIFIED:\n return {\n kind: 'redirect',\n route: routes.resendEmail,\n clearSession: false\n }\n\n case AuthErrorCode.TWO_FACTOR_REQUIRED:\n return {\n kind: 'redirect',\n route: routes.twoFa,\n clearSession: false\n }\n\n case AuthErrorCode.HUBSPOT_REAUTH_REQUIRED:\n return {\n kind: 'redirect',\n route: routes.accountSelect,\n clearSession: false\n }\n\n case AuthErrorCode.OAUTH_PROCESSING_ERROR:\n case AuthErrorCode.PORTAL_INACTIVE:\n case AuthErrorCode.AMBIGUOUS_HUB_ID:\n case AuthErrorCode.MISSING_HEADERS:\n case AuthErrorCode.COMMERCIAL_ACCESS_EXPIRED:\n return { kind: 'reject' }\n\n case AuthErrorCode.ACCESS_DENIED:\n case AuthErrorCode.ACCESS_FORBIDDEN:\n if (isSessionProbeUrl(url, policy)) {\n return {\n kind: 'redirect',\n route: routes.unauthorized,\n clearSession: false\n }\n }\n return { kind: 'reject' }\n\n default:\n if (status === 401) {\n return isRetryRequest ? logoutAction(errorCode, routes) : { kind: 'refresh_retry' }\n }\n if (status === 403) {\n return isSessionProbeUrl(url, policy)\n ? {\n kind: 'redirect',\n route: routes.unauthorized,\n clearSession: false\n }\n : { kind: 'reject' }\n }\n return { kind: 'reject' }\n }\n}\n\nexport function resolveAuthErrorAction(input: {\n status: number\n errorCode?: string\n url?: string\n skipGlobalAuthRedirect?: boolean\n isRetryRequest?: boolean\n policy: AuthInterceptorPolicyConfig\n}): AuthErrorAction {\n const { status, errorCode, url, skipGlobalAuthRedirect, isRetryRequest, policy } = input\n\n if (status !== 401 && status !== 403) {\n return { kind: 'reject' }\n }\n\n if (skipGlobalAuthRedirect || isOptionalAuthFailureUrl(url, policy)) {\n return { kind: 'reject' }\n }\n\n return resolveByErrorCode(errorCode, status, url ?? '', isRetryRequest, policy)\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getProfile, setProfileDetails, getCookie } from './chunk-
|
|
1
|
+
import { getProfile, setProfileDetails, getCookie } from './chunk-TVUBMDXX.js';
|
|
2
2
|
import axios from 'axios';
|
|
3
3
|
import pako from 'pako';
|
|
4
4
|
import { Base64 } from 'js-base64';
|
|
@@ -230,6 +230,21 @@ var tableStore = createStore({
|
|
|
230
230
|
selectedPipeline: "",
|
|
231
231
|
viewType: ""
|
|
232
232
|
});
|
|
233
|
+
function getBoardStagesFromState(state) {
|
|
234
|
+
const fromTable = state.tableData?.data?.results;
|
|
235
|
+
if (Array.isArray(fromTable)) {
|
|
236
|
+
return fromTable;
|
|
237
|
+
}
|
|
238
|
+
const fromObjects = state.objectsData?.data?.results;
|
|
239
|
+
if (Array.isArray(fromObjects)) {
|
|
240
|
+
return fromObjects;
|
|
241
|
+
}
|
|
242
|
+
return [];
|
|
243
|
+
}
|
|
244
|
+
function isBoardStagePageResponse(response) {
|
|
245
|
+
const results = response?.data?.results;
|
|
246
|
+
return response?.info?.viewType === "BOARD" && results != null && !Array.isArray(results);
|
|
247
|
+
}
|
|
233
248
|
var actions2 = {
|
|
234
249
|
/** Called from Client.object.list — feeds purgeCrmListCacheAfterCrmWrite / purgeCrmDetailAndListAfterCrmWrite. */
|
|
235
250
|
setObjectsQueryParams(params) {
|
|
@@ -307,7 +322,7 @@ var actions2 = {
|
|
|
307
322
|
const viewType = response?.info?.viewType;
|
|
308
323
|
let newTablePrependData;
|
|
309
324
|
if (viewType === "BOARD") {
|
|
310
|
-
const stages = response?.data?.results
|
|
325
|
+
const stages = Array.isArray(response?.data?.results) ? response.data.results : getBoardStagesFromState(state);
|
|
311
326
|
newTablePrependData = state.tablePrependData.map((prependStage) => {
|
|
312
327
|
const matchingStage = stages.find((stage) => String(stage.id) === String(prependStage.id));
|
|
313
328
|
const rows = matchingStage?.data?.results?.rows ?? [];
|
|
@@ -358,8 +373,9 @@ var actions2 = {
|
|
|
358
373
|
if (payload.isFristTimeLoadData) {
|
|
359
374
|
newTablePrependData = [];
|
|
360
375
|
}
|
|
376
|
+
const preserveBoardTableData = isBoardStagePageResponse(response) && state.tableData?.info?.viewType === "BOARD" && Array.isArray(state.tableData?.data?.results);
|
|
361
377
|
tableStore.setState({
|
|
362
|
-
tableData: response,
|
|
378
|
+
tableData: preserveBoardTableData ? state.tableData : response,
|
|
363
379
|
tablePrependData: newTablePrependData || [],
|
|
364
380
|
hubspotObjectTypeId,
|
|
365
381
|
viewType
|
|
@@ -407,7 +423,7 @@ var actions2 = {
|
|
|
407
423
|
let rows = [];
|
|
408
424
|
if (state.tableData?.info?.viewType == "BOARD") {
|
|
409
425
|
if (response === "loading") {
|
|
410
|
-
const responseData = state
|
|
426
|
+
const responseData = getBoardStagesFromState(state);
|
|
411
427
|
const pipelineStage = props?.payload?.propertyPayload?.hs_pipeline_stage || props?.payload?.propertyPayload?.dealstage || formState?.form?.data?.pipelineDefaults?.defaultStage?.id;
|
|
412
428
|
rows = responseData.map(({ id, data }) => {
|
|
413
429
|
const matchedPrepend = state.tablePrependData.find((item) => String(item.id) === String(id));
|
|
@@ -1618,5 +1634,5 @@ var resetAllStore = () => {
|
|
|
1618
1634
|
};
|
|
1619
1635
|
|
|
1620
1636
|
export { actions, actions2, actions3, actions4, actions5, actions7 as actions6, actions6 as actions7, actions8, breadcrumbStage, configureLogger, createStore, decodeToBase64, emailStore, fileStore, generatePath, generateUrl, getParam, getParamDetails, getPath, getRouteDetails, getRouteMenu, isHttpTracingEnabled, isMessingParent, isMessingParentLastItem, logger, noteStore, resetAllStore, sanitizeAxiosErrorData, syncStore, tableStore, tableUiActions, tableUiStore, ticketHubspotObjectTypeId, updateLink, uploaderStore, userStore };
|
|
1621
|
-
//# sourceMappingURL=chunk-
|
|
1622
|
-
//# sourceMappingURL=chunk-
|
|
1637
|
+
//# sourceMappingURL=chunk-O64WTOPM.js.map
|
|
1638
|
+
//# sourceMappingURL=chunk-O64WTOPM.js.map
|