woodsportal-client-sdk 1.1.4-dev.62 → 1.1.4-dev.64
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/CHANGELOG.md +12 -0
- package/README.md +74 -1
- package/dist/adapters/angular/index.d.ts +5 -2
- package/dist/adapters/angular/index.js +7 -7
- package/dist/adapters/angular/index.js.map +1 -1
- package/dist/adapters/react/index.d.ts +5 -2
- package/dist/adapters/react/index.js +6 -6
- package/dist/adapters/react/index.js.map +1 -1
- package/dist/adapters/vue/index.d.ts +5 -2
- package/dist/adapters/vue/index.js +7 -7
- package/dist/adapters/vue/index.js.map +1 -1
- package/dist/auth-utils-UU5PVRPL.js +3 -0
- package/dist/{auth-utils-TZSW6BVD.js.map → auth-utils-UU5PVRPL.js.map} +1 -1
- package/dist/{chunk-XWIYW67P.js → chunk-C76BHDO4.js} +599 -151
- package/dist/chunk-C76BHDO4.js.map +1 -0
- package/dist/{chunk-Y5MRAAGK.js → chunk-HBHT637F.js} +3 -3
- package/dist/chunk-HBHT637F.js.map +1 -0
- package/dist/chunk-K3YKUUNS.js +18 -0
- package/dist/chunk-K3YKUUNS.js.map +1 -0
- package/dist/{chunk-2SYUOWTT.js → chunk-S2NB4AXQ.js} +13 -7
- package/dist/chunk-S2NB4AXQ.js.map +1 -0
- package/dist/index.d.ts +347 -1
- package/dist/index.js +2 -2
- package/dist/{use-uploader-DOpqLu77.d.ts → use-uploader-wGxh8vtk.d.ts} +5 -1
- package/package.json +3 -3
- package/dist/auth-utils-TZSW6BVD.js +0 -3
- package/dist/chunk-2SYUOWTT.js.map +0 -1
- package/dist/chunk-XFNFPTU6.js +0 -17
- package/dist/chunk-XFNFPTU6.js.map +0 -1
- package/dist/chunk-XWIYW67P.js.map +0 -1
- package/dist/chunk-Y5MRAAGK.js.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { __export, ensureValidRefresh, HUBSPOT_DATA, PORTAL_ID, DEV_PORTAL_ID, HUB_ID, setRefreshCallback,
|
|
1
|
+
import { __export, getProfile, getAccessToken, ensureValidRefresh, HUBSPOT_DATA, PORTAL_ID, DEV_PORTAL_ID, HUB_ID, setRefreshCallback, setRefreshToken, setAccessToken, isAuthenticateApp, isExpiresAccessToken, isCookieExpired, getRefreshToken, DEV_API_URL, setProfileDetails, getCookie, clearAccessToken, removeAllCookie, setPortal, setSubscriptionType, setLoggedInDetails } from './chunk-S2NB4AXQ.js';
|
|
2
2
|
import axios from 'axios';
|
|
3
3
|
import pako from 'pako';
|
|
4
4
|
import { Base64 } from 'js-base64';
|
|
5
5
|
|
|
6
|
-
// src/client/index.ts
|
|
6
|
+
// src/main/client/index.ts
|
|
7
7
|
var client_exports = {};
|
|
8
8
|
__export(client_exports, {
|
|
9
9
|
Client: () => Client
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
-
// src/utils/localStoraget.ts
|
|
12
|
+
// src/main/utils/localStoraget.ts
|
|
13
13
|
var memory = /* @__PURE__ */ new Map();
|
|
14
14
|
var memoryStore = {
|
|
15
15
|
getItem(key) {
|
|
@@ -52,7 +52,7 @@ var storage = {
|
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
-
// src/utils/config.ts
|
|
55
|
+
// src/main/utils/config.ts
|
|
56
56
|
var config = {
|
|
57
57
|
get hubId() {
|
|
58
58
|
const hubSpotData = storage.get(HUBSPOT_DATA);
|
|
@@ -81,7 +81,7 @@ var setConfig = {
|
|
|
81
81
|
}
|
|
82
82
|
};
|
|
83
83
|
|
|
84
|
-
// src/utils/generateApiUrl.ts
|
|
84
|
+
// src/main/utils/generateApiUrl.ts
|
|
85
85
|
var generateApiUrl = ({
|
|
86
86
|
route,
|
|
87
87
|
params = {},
|
|
@@ -107,7 +107,7 @@ function replaceParams(template, values) {
|
|
|
107
107
|
);
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
// src/client/api-endpoints.ts
|
|
110
|
+
// src/main/client/api-endpoints.ts
|
|
111
111
|
var API_ENDPOINTS = {
|
|
112
112
|
// Auth
|
|
113
113
|
PRE_LOGIN: "/api/auth/pre-login",
|
|
@@ -121,12 +121,38 @@ var API_ENDPOINTS = {
|
|
|
121
121
|
RESEND_EMAIL: "/api/auth/resend-email",
|
|
122
122
|
VERIFY_EMAIL_RESEND: "/api/auth/verify-email/resend",
|
|
123
123
|
LOGOUT: "/api/auth/logout",
|
|
124
|
+
VERIFY_OTP: "/api/auth/verify-otp",
|
|
125
|
+
// Auth MFA (client lane)
|
|
126
|
+
MFA_PENDING_OTP_SEND: "/api/auth/mfa/pending/otp/send",
|
|
127
|
+
MFA_PENDING_PASSKEY_OPTIONS: "/api/auth/mfa/pending/passkey/authenticate/options",
|
|
128
|
+
MFA_PENDING_PASSKEY_VERIFY: "/api/auth/mfa/pending/passkey/authenticate/verify",
|
|
129
|
+
MFA_STATUS: "/api/auth/mfa/status",
|
|
130
|
+
MFA_PREFERENCES: "/api/auth/mfa/preferences",
|
|
131
|
+
MFA_PHONE_VERIFY_START: "/api/auth/mfa/phone/verify/start",
|
|
132
|
+
MFA_PHONE_VERIFY_CONFIRM: "/api/auth/mfa/phone/verify/confirm",
|
|
133
|
+
MFA_TOTP_ENROLL_START: "/api/auth/mfa/totp/enroll/start",
|
|
134
|
+
MFA_TOTP_ENROLL_VERIFY: "/api/auth/mfa/totp/enroll/verify",
|
|
135
|
+
MFA_TOTP_DISABLE: "/api/auth/mfa/totp/disable",
|
|
136
|
+
MFA_WEBAUTHN_REGISTER_OPTIONS: "/api/auth/mfa/webauthn/register/options",
|
|
137
|
+
MFA_WEBAUTHN_REGISTER_VERIFY: "/api/auth/mfa/webauthn/register/verify",
|
|
138
|
+
MFA_WEBAUTHN_AUTH_OPTIONS: "/api/auth/mfa/webauthn/authenticate/options",
|
|
139
|
+
MFA_WEBAUTHN_AUTH_VERIFY: "/api/auth/mfa/webauthn/authenticate/verify",
|
|
140
|
+
MFA_WEBAUTHN_CREDENTIALS: "/api/auth/mfa/webauthn/credentials",
|
|
141
|
+
MFA_WEBAUTHN_CREDENTIAL_DELETE: "/api/auth/mfa/webauthn/credentials/${credentialRecordId}",
|
|
142
|
+
PASSKEY_LOGIN_OPTIONS: "/api/auth/passkey/login/options",
|
|
143
|
+
PASSKEY_LOGIN_VERIFY: "/api/auth/passkey/login/verify",
|
|
144
|
+
// Auth Security (client lane)
|
|
145
|
+
SECURITY_OVERVIEW: "/api/auth/security/overview",
|
|
146
|
+
SECURITY_LOGIN_ACTIVITY: "/api/auth/security/login-activity",
|
|
147
|
+
SECURITY_SESSIONS: "/api/auth/security/sessions",
|
|
148
|
+
SECURITY_SESSION_REVOKE: "/api/auth/security/sessions/${familyId}/revoke",
|
|
149
|
+
SECURITY_SESSIONS_REVOKE_OTHERS: "/api/auth/security/sessions/revoke-others",
|
|
124
150
|
// SSO
|
|
125
151
|
SSO_DETAILS: "/api/auth/sso/active",
|
|
126
152
|
SSO_URL: "/api/auth/sso/authorize",
|
|
127
153
|
SSO_CALLBACK: "/api/auth/sso/callback",
|
|
128
154
|
// User
|
|
129
|
-
ME: "/api/auth/me",
|
|
155
|
+
ME: "/api/${hubId}/${portalId}/auth/me?include=crmProfile",
|
|
130
156
|
PROFILE: "/api/${hubId}/${portalId}/profiles",
|
|
131
157
|
CHANGE_PASSWORD: "/api/auth/change-password",
|
|
132
158
|
// Pipeline
|
|
@@ -178,12 +204,12 @@ var API_ENDPOINTS = {
|
|
|
178
204
|
FILES_UPLOAD: "/api/${hubId}/${portalId}/hubspot-object-data/${objectId}/records/${id}/files"
|
|
179
205
|
};
|
|
180
206
|
|
|
181
|
-
// src/client/config.ts
|
|
207
|
+
// src/main/client/config.ts
|
|
182
208
|
var config2 = {
|
|
183
209
|
baseURL: ""
|
|
184
210
|
};
|
|
185
211
|
|
|
186
|
-
// src/client/http-clint.ts
|
|
212
|
+
// src/main/client/http-clint.ts
|
|
187
213
|
var axiosInstance = null;
|
|
188
214
|
var config3 = {};
|
|
189
215
|
function initializeHttpClient(clientConfig) {
|
|
@@ -234,9 +260,9 @@ function formatBooleanSearchParam(key, value) {
|
|
|
234
260
|
return value ? `${key}:1` : `${key}:`;
|
|
235
261
|
}
|
|
236
262
|
var HttpClient = class {
|
|
237
|
-
static async get(url2, params) {
|
|
263
|
+
static async get(url2, params, options) {
|
|
238
264
|
await ensureValidRefresh();
|
|
239
|
-
const response = await getAxiosInstance().get(url2, { params });
|
|
265
|
+
const response = await getAxiosInstance().get(url2, { params, ...options || {} });
|
|
240
266
|
return response.data;
|
|
241
267
|
}
|
|
242
268
|
static async post(url2, data, options) {
|
|
@@ -335,13 +361,222 @@ async function getAuthRefreshToken(refreshToken) {
|
|
|
335
361
|
}
|
|
336
362
|
}
|
|
337
363
|
|
|
338
|
-
// src/
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
364
|
+
// src/main/client/auth-headers.ts
|
|
365
|
+
function devPortalHeaders() {
|
|
366
|
+
if (!config?.devPortalId) {
|
|
367
|
+
return void 0;
|
|
368
|
+
}
|
|
369
|
+
return { "X-Dev-Portal-Id": config.devPortalId };
|
|
370
|
+
}
|
|
371
|
+
function mergeRequestOptions(token, extraHeaders) {
|
|
372
|
+
const bearerToken = token || getAccessToken();
|
|
373
|
+
const headers = { ...extraHeaders };
|
|
374
|
+
if (bearerToken) {
|
|
375
|
+
headers.Authorization = `Bearer ${bearerToken}`;
|
|
376
|
+
}
|
|
377
|
+
const devHeaders = devPortalHeaders();
|
|
378
|
+
if (devHeaders) {
|
|
379
|
+
Object.assign(headers, devHeaders);
|
|
380
|
+
}
|
|
381
|
+
return Object.keys(headers).length > 0 ? { headers } : void 0;
|
|
382
|
+
}
|
|
383
|
+
function hubIdQuery() {
|
|
384
|
+
return config.hubId ? { hubId: config.hubId } : null;
|
|
385
|
+
}
|
|
386
|
+
function portalIdQuery(portalId) {
|
|
387
|
+
const id = portalId ?? config.portalId ?? config.devPortalId;
|
|
388
|
+
if (id === null || id === void 0 || id === "") {
|
|
389
|
+
return void 0;
|
|
390
|
+
}
|
|
391
|
+
return { portalId: String(id) };
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
// src/main/client/mfa-client.ts
|
|
395
|
+
var mfaPortalQuery = (portalId) => portalIdQuery(portalId) ?? null;
|
|
396
|
+
var mfaClient = {
|
|
397
|
+
verifyOtp: (data) => AuthHttpClient.post(
|
|
398
|
+
generateApiUrl({ route: API_ENDPOINTS.VERIFY_OTP, queryParams: hubIdQuery() }),
|
|
399
|
+
data,
|
|
400
|
+
mergeRequestOptions(data.token)
|
|
401
|
+
),
|
|
402
|
+
sendPendingOtp: (data) => AuthHttpClient.post(
|
|
403
|
+
API_ENDPOINTS.MFA_PENDING_OTP_SEND,
|
|
404
|
+
data,
|
|
405
|
+
mergeRequestOptions(data.token)
|
|
406
|
+
),
|
|
407
|
+
pendingPasskeyOptions: (data) => AuthHttpClient.post(
|
|
408
|
+
API_ENDPOINTS.MFA_PENDING_PASSKEY_OPTIONS,
|
|
409
|
+
data,
|
|
410
|
+
mergeRequestOptions(data.token)
|
|
411
|
+
),
|
|
412
|
+
pendingPasskeyVerify: (data) => AuthHttpClient.post(
|
|
413
|
+
generateApiUrl({ route: API_ENDPOINTS.MFA_PENDING_PASSKEY_VERIFY, queryParams: hubIdQuery() }),
|
|
414
|
+
data,
|
|
415
|
+
mergeRequestOptions(data.token)
|
|
416
|
+
),
|
|
417
|
+
getStatus: (query) => HttpClient.get(
|
|
418
|
+
generateApiUrl({
|
|
419
|
+
route: API_ENDPOINTS.MFA_STATUS,
|
|
420
|
+
queryParams: mfaPortalQuery(query?.portalId)
|
|
421
|
+
})
|
|
422
|
+
),
|
|
423
|
+
setPreferences: (data, query) => HttpClient.put(
|
|
424
|
+
generateApiUrl({
|
|
425
|
+
route: API_ENDPOINTS.MFA_PREFERENCES,
|
|
426
|
+
queryParams: mfaPortalQuery(query?.portalId)
|
|
427
|
+
}),
|
|
428
|
+
data
|
|
429
|
+
),
|
|
430
|
+
startPhoneVerify: (data) => HttpClient.post(API_ENDPOINTS.MFA_PHONE_VERIFY_START, data),
|
|
431
|
+
confirmPhoneVerify: (data) => HttpClient.post(API_ENDPOINTS.MFA_PHONE_VERIFY_CONFIRM, data),
|
|
432
|
+
totpEnrollStart: (query) => HttpClient.post(
|
|
433
|
+
generateApiUrl({
|
|
434
|
+
route: API_ENDPOINTS.MFA_TOTP_ENROLL_START,
|
|
435
|
+
queryParams: mfaPortalQuery(query?.portalId)
|
|
436
|
+
}),
|
|
437
|
+
null
|
|
438
|
+
),
|
|
439
|
+
totpEnrollVerify: (data) => HttpClient.post(
|
|
440
|
+
generateApiUrl({
|
|
441
|
+
route: API_ENDPOINTS.MFA_TOTP_ENROLL_VERIFY,
|
|
442
|
+
queryParams: mfaPortalQuery(data.portalId)
|
|
443
|
+
}),
|
|
444
|
+
data
|
|
445
|
+
),
|
|
446
|
+
totpDisable: (data) => HttpClient.post(API_ENDPOINTS.MFA_TOTP_DISABLE, data),
|
|
447
|
+
webauthnRegisterOptions: (query) => HttpClient.post(
|
|
448
|
+
generateApiUrl({
|
|
449
|
+
route: API_ENDPOINTS.MFA_WEBAUTHN_REGISTER_OPTIONS,
|
|
450
|
+
queryParams: mfaPortalQuery(query?.portalId)
|
|
451
|
+
}),
|
|
452
|
+
null,
|
|
453
|
+
mergeRequestOptions(void 0)
|
|
454
|
+
),
|
|
455
|
+
webauthnRegisterVerify: (data) => HttpClient.post(
|
|
456
|
+
generateApiUrl({
|
|
457
|
+
route: API_ENDPOINTS.MFA_WEBAUTHN_REGISTER_VERIFY,
|
|
458
|
+
queryParams: mfaPortalQuery(data.portalId)
|
|
459
|
+
}),
|
|
460
|
+
data
|
|
461
|
+
),
|
|
462
|
+
webauthnAuthOptions: (query) => HttpClient.post(
|
|
463
|
+
generateApiUrl({
|
|
464
|
+
route: API_ENDPOINTS.MFA_WEBAUTHN_AUTH_OPTIONS,
|
|
465
|
+
queryParams: mfaPortalQuery(query?.portalId)
|
|
466
|
+
}),
|
|
467
|
+
null
|
|
468
|
+
),
|
|
469
|
+
webauthnAuthVerify: (data) => HttpClient.post(
|
|
470
|
+
generateApiUrl({
|
|
471
|
+
route: API_ENDPOINTS.MFA_WEBAUTHN_AUTH_VERIFY,
|
|
472
|
+
queryParams: mfaPortalQuery(data.portalId)
|
|
473
|
+
}),
|
|
474
|
+
data
|
|
475
|
+
),
|
|
476
|
+
listWebauthnCredentials: (query) => HttpClient.get(
|
|
477
|
+
generateApiUrl({
|
|
478
|
+
route: API_ENDPOINTS.MFA_WEBAUTHN_CREDENTIALS,
|
|
479
|
+
queryParams: mfaPortalQuery(query?.portalId)
|
|
480
|
+
})
|
|
481
|
+
),
|
|
482
|
+
deleteWebauthnCredential: (credentialRecordId, query) => HttpClient.delete(
|
|
483
|
+
generateApiUrl({
|
|
484
|
+
route: API_ENDPOINTS.MFA_WEBAUTHN_CREDENTIAL_DELETE,
|
|
485
|
+
params: { credentialRecordId: String(credentialRecordId) },
|
|
486
|
+
queryParams: mfaPortalQuery(query?.portalId)
|
|
487
|
+
})
|
|
488
|
+
),
|
|
489
|
+
passkeyLoginOptions: (data) => AuthHttpClient.post(
|
|
490
|
+
generateApiUrl({ route: API_ENDPOINTS.PASSKEY_LOGIN_OPTIONS, queryParams: hubIdQuery() }),
|
|
491
|
+
data,
|
|
492
|
+
mergeRequestOptions(void 0)
|
|
493
|
+
),
|
|
494
|
+
passkeyLoginVerify: (data) => AuthHttpClient.post(
|
|
495
|
+
generateApiUrl({ route: API_ENDPOINTS.PASSKEY_LOGIN_VERIFY, queryParams: hubIdQuery() }),
|
|
496
|
+
data,
|
|
497
|
+
mergeRequestOptions(void 0)
|
|
498
|
+
)
|
|
342
499
|
};
|
|
343
|
-
|
|
344
|
-
|
|
500
|
+
|
|
501
|
+
// src/main/client/security-client.ts
|
|
502
|
+
var refreshTokenHeaders = (refreshToken) => {
|
|
503
|
+
if (!refreshToken) {
|
|
504
|
+
return void 0;
|
|
505
|
+
}
|
|
506
|
+
return { "X-Refresh-Token": refreshToken };
|
|
507
|
+
};
|
|
508
|
+
var securityClient = {
|
|
509
|
+
getOverview: (query) => HttpClient.get(
|
|
510
|
+
generateApiUrl({
|
|
511
|
+
route: API_ENDPOINTS.SECURITY_OVERVIEW,
|
|
512
|
+
queryParams: portalIdQuery(query?.portalId)
|
|
513
|
+
})
|
|
514
|
+
),
|
|
515
|
+
getLoginActivity: (query) => HttpClient.get(
|
|
516
|
+
generateApiUrl({
|
|
517
|
+
route: API_ENDPOINTS.SECURITY_LOGIN_ACTIVITY,
|
|
518
|
+
queryParams: query ?? {}
|
|
519
|
+
})
|
|
520
|
+
),
|
|
521
|
+
getSessions: (query) => HttpClient.get(
|
|
522
|
+
generateApiUrl({
|
|
523
|
+
route: API_ENDPOINTS.SECURITY_SESSIONS,
|
|
524
|
+
queryParams: query?.currentFamilyId ? { currentFamilyId: query.currentFamilyId } : void 0
|
|
525
|
+
}),
|
|
526
|
+
void 0,
|
|
527
|
+
mergeRequestOptions(void 0, refreshTokenHeaders(query?.refreshToken))
|
|
528
|
+
),
|
|
529
|
+
revokeSession: (payload) => HttpClient.post(
|
|
530
|
+
generateApiUrl({
|
|
531
|
+
route: API_ENDPOINTS.SECURITY_SESSION_REVOKE,
|
|
532
|
+
params: { familyId: payload.familyId }
|
|
533
|
+
}),
|
|
534
|
+
null,
|
|
535
|
+
mergeRequestOptions(void 0, refreshTokenHeaders(payload.refreshToken))
|
|
536
|
+
),
|
|
537
|
+
revokeOtherSessions: (refreshToken) => HttpClient.post(
|
|
538
|
+
API_ENDPOINTS.SECURITY_SESSIONS_REVOKE_OTHERS,
|
|
539
|
+
null,
|
|
540
|
+
mergeRequestOptions(void 0, refreshTokenHeaders(refreshToken))
|
|
541
|
+
)
|
|
542
|
+
};
|
|
543
|
+
|
|
544
|
+
// src/main/store2/store.ts
|
|
545
|
+
function createStore(initialState) {
|
|
546
|
+
let state = initialState;
|
|
547
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
548
|
+
return {
|
|
549
|
+
getState() {
|
|
550
|
+
return state;
|
|
551
|
+
},
|
|
552
|
+
setState(partial) {
|
|
553
|
+
state = {
|
|
554
|
+
...state,
|
|
555
|
+
...partial
|
|
556
|
+
};
|
|
557
|
+
listeners.forEach(
|
|
558
|
+
(listener) => listener(state)
|
|
559
|
+
);
|
|
560
|
+
},
|
|
561
|
+
subscribe(listener) {
|
|
562
|
+
listeners.add(listener);
|
|
563
|
+
return () => listeners.delete(listener);
|
|
564
|
+
}
|
|
565
|
+
};
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
// src/main/store2/use-user.ts
|
|
569
|
+
var userStore = createStore({
|
|
570
|
+
profile: getProfile()
|
|
571
|
+
});
|
|
572
|
+
var actions = {
|
|
573
|
+
setProfile(response) {
|
|
574
|
+
const data = response?.data || null;
|
|
575
|
+
userStore.setState({
|
|
576
|
+
profile: data
|
|
577
|
+
});
|
|
578
|
+
setProfileDetails(data);
|
|
579
|
+
}
|
|
345
580
|
};
|
|
346
581
|
function convertToBase64(obj) {
|
|
347
582
|
try {
|
|
@@ -367,7 +602,7 @@ function decodeToBase64(encoded) {
|
|
|
367
602
|
}
|
|
368
603
|
}
|
|
369
604
|
|
|
370
|
-
// src/breadcrumb/url-utils.ts
|
|
605
|
+
// src/main/breadcrumb/url-utils.ts
|
|
371
606
|
function mapKeysDeep(obj, keyMap2) {
|
|
372
607
|
if (Array.isArray(obj)) {
|
|
373
608
|
return obj.map((item) => mapKeysDeep(item, keyMap2));
|
|
@@ -450,7 +685,7 @@ var generatePath = (breadcrumbs, breadcrumb, index) => {
|
|
|
450
685
|
}
|
|
451
686
|
};
|
|
452
687
|
|
|
453
|
-
// src/breadcrumb/key-map.ts
|
|
688
|
+
// src/main/breadcrumb/key-map.ts
|
|
454
689
|
var keyMap = {
|
|
455
690
|
dp: "defPermissions",
|
|
456
691
|
n: "name",
|
|
@@ -475,7 +710,7 @@ var keyMap = {
|
|
|
475
710
|
pId: "pipeline_id"
|
|
476
711
|
};
|
|
477
712
|
|
|
478
|
-
// src/utils/url.ts
|
|
713
|
+
// src/main/utils/url.ts
|
|
479
714
|
var ticketHubspotObjectTypeId = () => {
|
|
480
715
|
const { getParamDetails: getParamDetails2 } = routeParam;
|
|
481
716
|
const paramDetails = getParamDetails2();
|
|
@@ -494,7 +729,7 @@ var ticketHubspotObjectTypeId = () => {
|
|
|
494
729
|
return "";
|
|
495
730
|
};
|
|
496
731
|
|
|
497
|
-
// src/utils/param.ts
|
|
732
|
+
// src/main/utils/param.ts
|
|
498
733
|
function getParam(paramName) {
|
|
499
734
|
if (typeof globalThis === "undefined" || !globalThis.location) return null;
|
|
500
735
|
const hash = globalThis.location.hash || "";
|
|
@@ -512,7 +747,7 @@ function getPath() {
|
|
|
512
747
|
return hash.slice(1).split("?")[0];
|
|
513
748
|
}
|
|
514
749
|
|
|
515
|
-
// src/breadcrumb/param.ts
|
|
750
|
+
// src/main/breadcrumb/param.ts
|
|
516
751
|
var getRouteMenu = (path) => {
|
|
517
752
|
const apiRoutes = globalThis?.apiRoutes || [];
|
|
518
753
|
return apiRoutes.find((menu) => menu?.path === path);
|
|
@@ -608,8 +843,8 @@ var getParamDetails = (props, isDetailsPage = false) => {
|
|
|
608
843
|
};
|
|
609
844
|
};
|
|
610
845
|
|
|
611
|
-
// src/store/index.ts
|
|
612
|
-
function
|
|
846
|
+
// src/main/store/index.ts
|
|
847
|
+
function createStore2(initializer) {
|
|
613
848
|
let state;
|
|
614
849
|
const listeners = /* @__PURE__ */ new Set();
|
|
615
850
|
const get = () => state;
|
|
@@ -636,12 +871,12 @@ function createStore(initializer) {
|
|
|
636
871
|
};
|
|
637
872
|
}
|
|
638
873
|
|
|
639
|
-
// src/utils/getCookieData.ts
|
|
874
|
+
// src/main/utils/getCookieData.ts
|
|
640
875
|
var getAuthSubscriptionType = () => {
|
|
641
876
|
return getCookie("subscriptionType");
|
|
642
877
|
};
|
|
643
878
|
|
|
644
|
-
// src/breadcrumb/url.ts
|
|
879
|
+
// src/main/breadcrumb/url.ts
|
|
645
880
|
var useUpdateLink = () => {
|
|
646
881
|
const updateLink = async (props, displayName = "prm") => {
|
|
647
882
|
const search = getParam("b");
|
|
@@ -742,9 +977,9 @@ var updateBParam = (newValue) => {
|
|
|
742
977
|
}
|
|
743
978
|
};
|
|
744
979
|
|
|
745
|
-
// src/store/use-table.ts
|
|
980
|
+
// src/main/store/use-table.ts
|
|
746
981
|
var pageLimit = 10;
|
|
747
|
-
var tableStore =
|
|
982
|
+
var tableStore = createStore2((set, get) => ({
|
|
748
983
|
// ==============================
|
|
749
984
|
// STATE
|
|
750
985
|
// ==============================
|
|
@@ -991,43 +1226,19 @@ function useTable() {
|
|
|
991
1226
|
};
|
|
992
1227
|
}
|
|
993
1228
|
|
|
994
|
-
// src/store2/
|
|
995
|
-
|
|
996
|
-
let state = initialState;
|
|
997
|
-
const listeners = /* @__PURE__ */ new Set();
|
|
998
|
-
return {
|
|
999
|
-
getState() {
|
|
1000
|
-
return state;
|
|
1001
|
-
},
|
|
1002
|
-
setState(partial) {
|
|
1003
|
-
state = {
|
|
1004
|
-
...state,
|
|
1005
|
-
...partial
|
|
1006
|
-
};
|
|
1007
|
-
listeners.forEach(
|
|
1008
|
-
(listener) => listener(state)
|
|
1009
|
-
);
|
|
1010
|
-
},
|
|
1011
|
-
subscribe(listener) {
|
|
1012
|
-
listeners.add(listener);
|
|
1013
|
-
return () => listeners.delete(listener);
|
|
1014
|
-
}
|
|
1015
|
-
};
|
|
1016
|
-
}
|
|
1017
|
-
|
|
1018
|
-
// src/store2/use-form.ts
|
|
1019
|
-
var formStore = createStore2({
|
|
1229
|
+
// src/main/store2/use-form.ts
|
|
1230
|
+
var formStore = createStore({
|
|
1020
1231
|
form: null
|
|
1021
1232
|
});
|
|
1022
|
-
var
|
|
1233
|
+
var actions2 = {
|
|
1023
1234
|
setFormData(response) {
|
|
1024
1235
|
formStore.setState({
|
|
1025
1236
|
form: response
|
|
1026
1237
|
});
|
|
1027
1238
|
}};
|
|
1028
1239
|
|
|
1029
|
-
// src/store2/use-table.ts
|
|
1030
|
-
var tableStore2 =
|
|
1240
|
+
// src/main/store2/use-table.ts
|
|
1241
|
+
var tableStore2 = createStore({
|
|
1031
1242
|
queryParams: null,
|
|
1032
1243
|
multiObjectsQueryParams: {},
|
|
1033
1244
|
objectsData: null,
|
|
@@ -1037,7 +1248,7 @@ var tableStore2 = createStore2({
|
|
|
1037
1248
|
selectedPipeline: "",
|
|
1038
1249
|
viewType: ""
|
|
1039
1250
|
});
|
|
1040
|
-
var
|
|
1251
|
+
var actions3 = {
|
|
1041
1252
|
/** Called from Client.object.list — feeds purgeCrmListCacheAfterCrmWrite / purgeCrmDetailAndListAfterCrmWrite. */
|
|
1042
1253
|
setObjectsQueryParams(params) {
|
|
1043
1254
|
tableStore2.setState({
|
|
@@ -1323,8 +1534,8 @@ var actions2 = {
|
|
|
1323
1534
|
}
|
|
1324
1535
|
};
|
|
1325
1536
|
|
|
1326
|
-
// src/store2/use-uploader.ts
|
|
1327
|
-
var uploaderStore =
|
|
1537
|
+
// src/main/store2/use-uploader.ts
|
|
1538
|
+
var uploaderStore = createStore({
|
|
1328
1539
|
attachments: []
|
|
1329
1540
|
});
|
|
1330
1541
|
function toAttachmentSummary(attachment) {
|
|
@@ -1342,7 +1553,7 @@ function resolveAttachmentsFromIds(attachmentIds, storedAttachments) {
|
|
|
1342
1553
|
const ids = String(raw ?? "").split(";").map((id) => id.trim()).filter(Boolean);
|
|
1343
1554
|
return ids.map((id) => storedAttachments.find((a) => String(a.id) === id)).filter((a) => a != null).map(toAttachmentSummary);
|
|
1344
1555
|
}
|
|
1345
|
-
var
|
|
1556
|
+
var actions4 = {
|
|
1346
1557
|
setAttachment(response) {
|
|
1347
1558
|
const data = response?.data;
|
|
1348
1559
|
if (!data?.id) return;
|
|
@@ -1358,14 +1569,14 @@ var actions3 = {
|
|
|
1358
1569
|
}
|
|
1359
1570
|
};
|
|
1360
1571
|
|
|
1361
|
-
// src/store2/use-note.ts
|
|
1362
|
-
var noteStore =
|
|
1572
|
+
// src/main/store2/use-note.ts
|
|
1573
|
+
var noteStore = createStore({
|
|
1363
1574
|
notes: [],
|
|
1364
1575
|
prependNotes: [],
|
|
1365
1576
|
id: "",
|
|
1366
1577
|
queryParams: null
|
|
1367
1578
|
});
|
|
1368
|
-
var
|
|
1579
|
+
var actions5 = {
|
|
1369
1580
|
/** Called from Client.note.list — feeds purgeEngagementCaches (view: notes). */
|
|
1370
1581
|
setListQueryParams(params) {
|
|
1371
1582
|
noteStore.setState({
|
|
@@ -1438,7 +1649,7 @@ var actions4 = {
|
|
|
1438
1649
|
noteStore.setState({
|
|
1439
1650
|
prependNotes: []
|
|
1440
1651
|
});
|
|
1441
|
-
|
|
1652
|
+
actions4.clearAttachments();
|
|
1442
1653
|
},
|
|
1443
1654
|
async updatePrependNote(response) {
|
|
1444
1655
|
const responseData = { ...response };
|
|
@@ -1516,14 +1727,14 @@ var actions4 = {
|
|
|
1516
1727
|
}
|
|
1517
1728
|
};
|
|
1518
1729
|
|
|
1519
|
-
// src/store2/use-email.ts
|
|
1520
|
-
var emailStore =
|
|
1730
|
+
// src/main/store2/use-email.ts
|
|
1731
|
+
var emailStore = createStore({
|
|
1521
1732
|
emails: [],
|
|
1522
1733
|
prependEmails: [],
|
|
1523
1734
|
id: "",
|
|
1524
1735
|
queryParams: null
|
|
1525
1736
|
});
|
|
1526
|
-
var
|
|
1737
|
+
var actions6 = {
|
|
1527
1738
|
/** Called from Client.email.list — feeds purgeEngagementCaches (view: emails). */
|
|
1528
1739
|
setListQueryParams(params) {
|
|
1529
1740
|
emailStore.setState({
|
|
@@ -1596,7 +1807,7 @@ var actions5 = {
|
|
|
1596
1807
|
emailStore.setState({
|
|
1597
1808
|
prependEmails: []
|
|
1598
1809
|
});
|
|
1599
|
-
|
|
1810
|
+
actions4.clearAttachments();
|
|
1600
1811
|
},
|
|
1601
1812
|
async updatePrependEmail(response) {
|
|
1602
1813
|
const responseData = { ...response };
|
|
@@ -1674,11 +1885,11 @@ var actions5 = {
|
|
|
1674
1885
|
}
|
|
1675
1886
|
};
|
|
1676
1887
|
|
|
1677
|
-
// src/store2/use-file.ts
|
|
1678
|
-
var fileStore =
|
|
1888
|
+
// src/main/store2/use-file.ts
|
|
1889
|
+
var fileStore = createStore({
|
|
1679
1890
|
queryParams: null
|
|
1680
1891
|
});
|
|
1681
|
-
var
|
|
1892
|
+
var actions7 = {
|
|
1682
1893
|
/** Called from Client.file.list — feeds purgeEngagementCaches (view: files). */
|
|
1683
1894
|
setListQueryParams(params) {
|
|
1684
1895
|
fileStore.setState({
|
|
@@ -1687,7 +1898,7 @@ var actions6 = {
|
|
|
1687
1898
|
}
|
|
1688
1899
|
};
|
|
1689
1900
|
|
|
1690
|
-
// src/utils/cache/builders.ts
|
|
1901
|
+
// src/main/utils/cache/builders.ts
|
|
1691
1902
|
function buildCrmListPurgeTarget(objectTypeId, listQuery, recordIds) {
|
|
1692
1903
|
const target = {
|
|
1693
1904
|
domain: "crm_object_data",
|
|
@@ -1756,7 +1967,7 @@ function buildCachePurgeRequest(targets, options) {
|
|
|
1756
1967
|
return request;
|
|
1757
1968
|
}
|
|
1758
1969
|
|
|
1759
|
-
// src/utils/cache/createCachePurgeJob.ts
|
|
1970
|
+
// src/main/utils/cache/createCachePurgeJob.ts
|
|
1760
1971
|
function randomIdempotencyKey() {
|
|
1761
1972
|
if (typeof crypto !== "undefined" && crypto.randomUUID) {
|
|
1762
1973
|
return crypto.randomUUID();
|
|
@@ -1841,7 +2052,7 @@ async function createCachePurgeJob(request, options = {}) {
|
|
|
1841
2052
|
}
|
|
1842
2053
|
}
|
|
1843
2054
|
|
|
1844
|
-
// src/utils/cache/crmCacheRefresh.ts
|
|
2055
|
+
// src/main/utils/cache/crmCacheRefresh.ts
|
|
1845
2056
|
async function purgeCrmObjectDataCache(options) {
|
|
1846
2057
|
const result = await purgeCrmListCache(options);
|
|
1847
2058
|
return result.ok;
|
|
@@ -1968,7 +2179,7 @@ async function purgeCrmCombined(options) {
|
|
|
1968
2179
|
});
|
|
1969
2180
|
}
|
|
1970
2181
|
|
|
1971
|
-
// src/utils/cache/extractHubspotRecordIdFromWriteResponse.ts
|
|
2182
|
+
// src/main/utils/cache/extractHubspotRecordIdFromWriteResponse.ts
|
|
1972
2183
|
function extractHubspotRecordIdFromWriteResponse(response) {
|
|
1973
2184
|
if (response == null || typeof response !== "object") {
|
|
1974
2185
|
return void 0;
|
|
@@ -1995,7 +2206,7 @@ function idFromRecordPayload(payload) {
|
|
|
1995
2206
|
return void 0;
|
|
1996
2207
|
}
|
|
1997
2208
|
|
|
1998
|
-
// src/utils/cache/extractEngagementItemIdFromWriteResponse.ts
|
|
2209
|
+
// src/main/utils/cache/extractEngagementItemIdFromWriteResponse.ts
|
|
1999
2210
|
function extractEngagementItemIdFromWriteResponse(response) {
|
|
2000
2211
|
if (response == null || typeof response !== "object") {
|
|
2001
2212
|
return void 0;
|
|
@@ -2050,7 +2261,7 @@ function fieldValue(raw) {
|
|
|
2050
2261
|
return s.length > 0 ? s : void 0;
|
|
2051
2262
|
}
|
|
2052
2263
|
|
|
2053
|
-
// src/utils/cache/resolveCrmListPurgeQuery.ts
|
|
2264
|
+
// src/main/utils/cache/resolveCrmListPurgeQuery.ts
|
|
2054
2265
|
var LIST_QUERY_KEYS = [
|
|
2055
2266
|
"sort",
|
|
2056
2267
|
"search",
|
|
@@ -2129,7 +2340,7 @@ function resolveCrmListPurgeQuery(options) {
|
|
|
2129
2340
|
};
|
|
2130
2341
|
}
|
|
2131
2342
|
|
|
2132
|
-
// src/client/index.ts
|
|
2343
|
+
// src/main/client/index.ts
|
|
2133
2344
|
var recordWriteContext = (paramsObject) => {
|
|
2134
2345
|
if (!paramsObject) {
|
|
2135
2346
|
return void 0;
|
|
@@ -2195,6 +2406,7 @@ var Client = {
|
|
|
2195
2406
|
}
|
|
2196
2407
|
);
|
|
2197
2408
|
},
|
|
2409
|
+
verifyOtp: (data) => mfaClient.verifyOtp(data),
|
|
2198
2410
|
verifyEmail: (data) => AuthHttpClient.post(API_ENDPOINTS.VERIFY_EMAIL, data),
|
|
2199
2411
|
resetPasswordVerifyToken: (data) => AuthHttpClient.post(API_ENDPOINTS.RESET_PASSWORD_VERIFY_TOKEN, data),
|
|
2200
2412
|
resetPassword: (data) => AuthHttpClient.post(API_ENDPOINTS.RESET_PASSWORD, data),
|
|
@@ -2219,13 +2431,13 @@ var Client = {
|
|
|
2219
2431
|
const params = { hubspotObjectTypeId: payload?.hubspotObjectTypeId };
|
|
2220
2432
|
const { getParamDetails: getParamDetails2 } = routeParam;
|
|
2221
2433
|
const { paramsObject } = getParamDetails2({ type: payload?.componentName });
|
|
2222
|
-
const userData =
|
|
2434
|
+
const userData = userStore.getState().profile;
|
|
2223
2435
|
const apiParams = {};
|
|
2224
2436
|
if (paramsObject?.parentObjectTypeId) {
|
|
2225
2437
|
apiParams.parentObjectTypeId = paramsObject?.parentObjectTypeId;
|
|
2226
|
-
} else if (payload?.isHome && userData?.
|
|
2227
|
-
apiParams.parentObjectTypeId = userData?.
|
|
2228
|
-
} else if (payload?.isHome && userData?.
|
|
2438
|
+
} else if (payload?.isHome && userData?.crmProfile?.info?.objectTypeId && !param?.isPrimaryCompany) {
|
|
2439
|
+
apiParams.parentObjectTypeId = userData?.crmProfile?.info?.objectTypeId;
|
|
2440
|
+
} else if (payload?.isHome && userData?.crmProfile?.info?.objectTypeId && param?.isPrimaryCompany) {
|
|
2229
2441
|
apiParams.parentObjectTypeId = "0-2";
|
|
2230
2442
|
}
|
|
2231
2443
|
apiParams.isPrimaryCompany = param?.isPrimaryCompany;
|
|
@@ -2248,12 +2460,12 @@ var Client = {
|
|
|
2248
2460
|
},
|
|
2249
2461
|
object: {
|
|
2250
2462
|
list: async (payload = null, param = null) => {
|
|
2251
|
-
const { setObjectsQueryParams } =
|
|
2463
|
+
const { setObjectsQueryParams } = actions3;
|
|
2252
2464
|
const params = { hubspotObjectTypeId: payload?.hubspotObjectTypeId };
|
|
2253
2465
|
const { updateLink, getLinkParams } = useUpdateLink();
|
|
2254
2466
|
const { getParamDetails: getParamDetails2 } = routeParam;
|
|
2255
2467
|
const { paramsObject, parentAccessLabel } = getParamDetails2({ type: payload?.componentName });
|
|
2256
|
-
const userData =
|
|
2468
|
+
const userData = userStore.getState().profile;
|
|
2257
2469
|
const pipeline = payload?.variables?.pipeline;
|
|
2258
2470
|
const mPipelines = payload?.variables?.mPipelines;
|
|
2259
2471
|
const mSelectedPipeline = pipeline !== void 0 ? pipeline : payload?.selectedPipeline;
|
|
@@ -2295,9 +2507,9 @@ var Client = {
|
|
|
2295
2507
|
}
|
|
2296
2508
|
if (payload?.isHome || payload?.hubspotObjectTypeId === "0-5" && payload?.componentName === "object") {
|
|
2297
2509
|
let parentObjectTypeId = "";
|
|
2298
|
-
if (userData?.
|
|
2299
|
-
parentObjectTypeId = userData?.
|
|
2300
|
-
} else if (userData?.
|
|
2510
|
+
if (userData?.crmProfile?.info?.objectTypeId && !param?.isPrimaryCompany) {
|
|
2511
|
+
parentObjectTypeId = userData?.crmProfile?.info?.objectTypeId;
|
|
2512
|
+
} else if (userData?.crmProfile?.info?.objectTypeId && param?.isPrimaryCompany) {
|
|
2301
2513
|
parentObjectTypeId = "0-2";
|
|
2302
2514
|
}
|
|
2303
2515
|
param.parentObjectTypeId = parentObjectTypeId;
|
|
@@ -2319,7 +2531,7 @@ var Client = {
|
|
|
2319
2531
|
return HttpClient.get(apiUrl);
|
|
2320
2532
|
},
|
|
2321
2533
|
sideBarList: async (payload = null) => {
|
|
2322
|
-
const { setMultiObjectsQueryParams } =
|
|
2534
|
+
const { setMultiObjectsQueryParams } = actions3;
|
|
2323
2535
|
const hubspotObjectTypeId = payload?.hubspotObjectTypeId;
|
|
2324
2536
|
const params = { hubspotObjectTypeId };
|
|
2325
2537
|
const queryParams = payload.param;
|
|
@@ -2478,7 +2690,7 @@ var Client = {
|
|
|
2478
2690
|
},
|
|
2479
2691
|
note: {
|
|
2480
2692
|
list: (props = null) => {
|
|
2481
|
-
const { setListQueryParams } =
|
|
2693
|
+
const { setListQueryParams } = actions5;
|
|
2482
2694
|
setListQueryParams(props?.queryParams ?? {});
|
|
2483
2695
|
const params = {
|
|
2484
2696
|
// hubId: config.hubId,
|
|
@@ -2566,7 +2778,7 @@ var Client = {
|
|
|
2566
2778
|
},
|
|
2567
2779
|
email: {
|
|
2568
2780
|
list: (props = null) => {
|
|
2569
|
-
const { setListQueryParams } =
|
|
2781
|
+
const { setListQueryParams } = actions6;
|
|
2570
2782
|
setListQueryParams(props?.queryParams ?? {});
|
|
2571
2783
|
const params = {
|
|
2572
2784
|
// hubId: config.hubId,
|
|
@@ -2667,7 +2879,7 @@ var Client = {
|
|
|
2667
2879
|
},
|
|
2668
2880
|
file: {
|
|
2669
2881
|
list: (props = null) => {
|
|
2670
|
-
const { setListQueryParams } =
|
|
2882
|
+
const { setListQueryParams } = actions7;
|
|
2671
2883
|
setListQueryParams(props?.queryParams ?? {});
|
|
2672
2884
|
const params = {
|
|
2673
2885
|
// hubId: config.hubId,
|
|
@@ -2742,17 +2954,19 @@ var Client = {
|
|
|
2742
2954
|
}
|
|
2743
2955
|
return response;
|
|
2744
2956
|
}
|
|
2745
|
-
}
|
|
2957
|
+
},
|
|
2958
|
+
mfa: mfaClient,
|
|
2959
|
+
security: securityClient
|
|
2746
2960
|
};
|
|
2747
2961
|
|
|
2748
|
-
// src/store2/use-sync.ts
|
|
2749
|
-
var syncStore =
|
|
2962
|
+
// src/main/store2/use-sync.ts
|
|
2963
|
+
var syncStore = createStore({
|
|
2750
2964
|
apiSync: false,
|
|
2751
2965
|
sync: false,
|
|
2752
2966
|
isSyncLoading: false,
|
|
2753
2967
|
isSyncDisable: false
|
|
2754
2968
|
});
|
|
2755
|
-
var
|
|
2969
|
+
var actions8 = {
|
|
2756
2970
|
setIsSyncLoading(status) {
|
|
2757
2971
|
syncStore.setState({
|
|
2758
2972
|
isSyncLoading: status,
|
|
@@ -2779,12 +2993,12 @@ var actions7 = {
|
|
|
2779
2993
|
}
|
|
2780
2994
|
};
|
|
2781
2995
|
var resetAllStore = () => {
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2996
|
+
actions3.clearTablePrependData();
|
|
2997
|
+
actions5.clearPrependNotes();
|
|
2998
|
+
actions6.clearPrependEmails();
|
|
2785
2999
|
};
|
|
2786
3000
|
|
|
2787
|
-
// src/utils/logError.ts
|
|
3001
|
+
// src/main/utils/logError.ts
|
|
2788
3002
|
function logError(context, error) {
|
|
2789
3003
|
if (axios.isAxiosError(error)) {
|
|
2790
3004
|
resetAllStore();
|
|
@@ -2805,7 +3019,7 @@ function logError(context, error) {
|
|
|
2805
3019
|
console.error(context, error);
|
|
2806
3020
|
}
|
|
2807
3021
|
|
|
2808
|
-
// src/mutation/createMutation.ts
|
|
3022
|
+
// src/main/mutation/createMutation.ts
|
|
2809
3023
|
function createMutation(mutationFn, options) {
|
|
2810
3024
|
let inFlight = 0;
|
|
2811
3025
|
let lastReportedLoading = null;
|
|
@@ -2837,7 +3051,41 @@ function createMutation(mutationFn, options) {
|
|
|
2837
3051
|
};
|
|
2838
3052
|
}
|
|
2839
3053
|
|
|
2840
|
-
// src/
|
|
3054
|
+
// src/main/client/login-session.ts
|
|
3055
|
+
async function completeLoginSession(response) {
|
|
3056
|
+
const tokenData = response?.data?.tokenData || {};
|
|
3057
|
+
const loggedInDetails = response?.data?.loggedInDetails || {};
|
|
3058
|
+
const currentPortal = response?.data?.loggedInDetails?.currentPortal || {};
|
|
3059
|
+
const currentPortalId = currentPortal?.portalId || null;
|
|
3060
|
+
const subscriptionType = loggedInDetails?.subscriptionType || "BASIC";
|
|
3061
|
+
const token = tokenData?.token;
|
|
3062
|
+
const refreshToken = tokenData?.refreshToken;
|
|
3063
|
+
const expiresIn = tokenData?.expiresIn;
|
|
3064
|
+
const rExpiresIn = tokenData?.refreshExpiresIn;
|
|
3065
|
+
setPortal(currentPortal);
|
|
3066
|
+
setSubscriptionType(subscriptionType);
|
|
3067
|
+
await setAccessToken(token, expiresIn);
|
|
3068
|
+
await setRefreshToken(refreshToken, rExpiresIn);
|
|
3069
|
+
await setLoggedInDetails(response.data);
|
|
3070
|
+
actions.setProfile(response);
|
|
3071
|
+
setConfig.setDevPortalId(currentPortalId);
|
|
3072
|
+
return response;
|
|
3073
|
+
}
|
|
3074
|
+
async function applyLoginResponse(response) {
|
|
3075
|
+
const data = response?.data ?? response;
|
|
3076
|
+
if (data?.twoFactorRequired === true) {
|
|
3077
|
+
const tokenData = data?.tokenData || {};
|
|
3078
|
+
const token = tokenData?.token;
|
|
3079
|
+
const expiresIn = tokenData?.expiresIn;
|
|
3080
|
+
if (token) {
|
|
3081
|
+
await setAccessToken(token, expiresIn);
|
|
3082
|
+
}
|
|
3083
|
+
return response;
|
|
3084
|
+
}
|
|
3085
|
+
return completeLoginSession(response);
|
|
3086
|
+
}
|
|
3087
|
+
|
|
3088
|
+
// src/main/apis/authentication.ts
|
|
2841
3089
|
function preLogin(options) {
|
|
2842
3090
|
const { mutate, isLoading } = createMutation(
|
|
2843
3091
|
async (payload) => {
|
|
@@ -2856,21 +3104,7 @@ function login(options) {
|
|
|
2856
3104
|
const { mutate, isLoading } = createMutation(
|
|
2857
3105
|
async (payload) => {
|
|
2858
3106
|
const response = await Client.authentication.login(payload);
|
|
2859
|
-
|
|
2860
|
-
const loggedInDetails = response?.data?.loggedInDetails || {};
|
|
2861
|
-
const currentPortal = response?.data?.loggedInDetails?.currentPortal || {};
|
|
2862
|
-
const currentPortalId = currentPortal?.portalId || null;
|
|
2863
|
-
const SubscriptionType = loggedInDetails?.subscriptionType || "BASIC";
|
|
2864
|
-
const token = tokenData?.token;
|
|
2865
|
-
const refreshToken = tokenData?.refreshToken;
|
|
2866
|
-
const expiresIn = tokenData?.expiresIn;
|
|
2867
|
-
const rExpiresIn = tokenData?.refreshExpiresIn;
|
|
2868
|
-
setPortal(currentPortal);
|
|
2869
|
-
setSubscriptionType(SubscriptionType);
|
|
2870
|
-
await setAccessToken(token, expiresIn);
|
|
2871
|
-
await setRefreshToken(refreshToken, rExpiresIn);
|
|
2872
|
-
await setLoggedInDetails(response.data);
|
|
2873
|
-
setConfig.setDevPortalId(currentPortalId);
|
|
3107
|
+
await applyLoginResponse(response);
|
|
2874
3108
|
return response;
|
|
2875
3109
|
},
|
|
2876
3110
|
options
|
|
@@ -3002,7 +3236,197 @@ function resendEmail(options) {
|
|
|
3002
3236
|
};
|
|
3003
3237
|
}
|
|
3004
3238
|
|
|
3005
|
-
// src/apis/
|
|
3239
|
+
// src/main/apis/mfa.ts
|
|
3240
|
+
function verifyOtp(options) {
|
|
3241
|
+
const { mutate, isLoading } = createMutation(
|
|
3242
|
+
async (payload) => {
|
|
3243
|
+
const response = await Client.authentication.verifyOtp(payload);
|
|
3244
|
+
await applyLoginResponse(response);
|
|
3245
|
+
return response;
|
|
3246
|
+
},
|
|
3247
|
+
options
|
|
3248
|
+
);
|
|
3249
|
+
return { mutate, verifyOtp: mutate, isLoading };
|
|
3250
|
+
}
|
|
3251
|
+
function sendMfaOtp(options) {
|
|
3252
|
+
const { mutate, isLoading } = createMutation(
|
|
3253
|
+
async (payload) => Client.mfa.sendPendingOtp(payload),
|
|
3254
|
+
options
|
|
3255
|
+
);
|
|
3256
|
+
return { mutate, sendMfaOtp: mutate, isLoading };
|
|
3257
|
+
}
|
|
3258
|
+
function pendingPasskeyOptions(options) {
|
|
3259
|
+
const { mutate, isLoading } = createMutation(
|
|
3260
|
+
async (payload) => Client.mfa.pendingPasskeyOptions(payload),
|
|
3261
|
+
options
|
|
3262
|
+
);
|
|
3263
|
+
return { mutate, pendingPasskeyOptions: mutate, isLoading };
|
|
3264
|
+
}
|
|
3265
|
+
function pendingPasskeyVerify(options) {
|
|
3266
|
+
const { mutate, isLoading } = createMutation(
|
|
3267
|
+
async (payload) => {
|
|
3268
|
+
const response = await Client.mfa.pendingPasskeyVerify(payload);
|
|
3269
|
+
await applyLoginResponse(response);
|
|
3270
|
+
return response;
|
|
3271
|
+
},
|
|
3272
|
+
options
|
|
3273
|
+
);
|
|
3274
|
+
return { mutate, pendingPasskeyVerify: mutate, isLoading };
|
|
3275
|
+
}
|
|
3276
|
+
function getMfaStatus(options) {
|
|
3277
|
+
const { mutate, isLoading } = createMutation(
|
|
3278
|
+
async (payload) => Client.mfa.getStatus(payload),
|
|
3279
|
+
options
|
|
3280
|
+
);
|
|
3281
|
+
return { mutate, getMfaStatus: mutate, isLoading };
|
|
3282
|
+
}
|
|
3283
|
+
function setMfaPreferences(options) {
|
|
3284
|
+
const { mutate, isLoading } = createMutation(
|
|
3285
|
+
async (payload) => {
|
|
3286
|
+
const { portalId, ...data } = payload;
|
|
3287
|
+
return Client.mfa.setPreferences(data, { portalId });
|
|
3288
|
+
},
|
|
3289
|
+
options
|
|
3290
|
+
);
|
|
3291
|
+
return { mutate, setMfaPreferences: mutate, isLoading };
|
|
3292
|
+
}
|
|
3293
|
+
function startPhoneVerify(options) {
|
|
3294
|
+
const { mutate, isLoading } = createMutation(
|
|
3295
|
+
async (payload) => Client.mfa.startPhoneVerify(payload),
|
|
3296
|
+
options
|
|
3297
|
+
);
|
|
3298
|
+
return { mutate, startPhoneVerify: mutate, isLoading };
|
|
3299
|
+
}
|
|
3300
|
+
function confirmPhoneVerify(options) {
|
|
3301
|
+
const { mutate, isLoading } = createMutation(
|
|
3302
|
+
async (payload) => Client.mfa.confirmPhoneVerify(payload),
|
|
3303
|
+
options
|
|
3304
|
+
);
|
|
3305
|
+
return { mutate, confirmPhoneVerify: mutate, isLoading };
|
|
3306
|
+
}
|
|
3307
|
+
function totpEnrollStart(options) {
|
|
3308
|
+
const { mutate, isLoading } = createMutation(
|
|
3309
|
+
async (payload) => Client.mfa.totpEnrollStart(payload),
|
|
3310
|
+
options
|
|
3311
|
+
);
|
|
3312
|
+
return { mutate, totpEnrollStart: mutate, isLoading };
|
|
3313
|
+
}
|
|
3314
|
+
function totpEnrollVerify(options) {
|
|
3315
|
+
const { mutate, isLoading } = createMutation(
|
|
3316
|
+
async (payload) => Client.mfa.totpEnrollVerify(payload),
|
|
3317
|
+
options
|
|
3318
|
+
);
|
|
3319
|
+
return { mutate, totpEnrollVerify: mutate, isLoading };
|
|
3320
|
+
}
|
|
3321
|
+
function totpDisable(options) {
|
|
3322
|
+
const { mutate, isLoading } = createMutation(
|
|
3323
|
+
async (payload) => Client.mfa.totpDisable(payload),
|
|
3324
|
+
options
|
|
3325
|
+
);
|
|
3326
|
+
return { mutate, totpDisable: mutate, isLoading };
|
|
3327
|
+
}
|
|
3328
|
+
function webauthnRegisterOptions(options) {
|
|
3329
|
+
const { mutate, isLoading } = createMutation(
|
|
3330
|
+
async (payload) => Client.mfa.webauthnRegisterOptions(payload),
|
|
3331
|
+
options
|
|
3332
|
+
);
|
|
3333
|
+
return { mutate, webauthnRegisterOptions: mutate, isLoading };
|
|
3334
|
+
}
|
|
3335
|
+
function webauthnRegisterVerify(options) {
|
|
3336
|
+
const { mutate, isLoading } = createMutation(
|
|
3337
|
+
async (payload) => Client.mfa.webauthnRegisterVerify(payload),
|
|
3338
|
+
options
|
|
3339
|
+
);
|
|
3340
|
+
return { mutate, webauthnRegisterVerify: mutate, isLoading };
|
|
3341
|
+
}
|
|
3342
|
+
function webauthnAuthOptions(options) {
|
|
3343
|
+
const { mutate, isLoading } = createMutation(
|
|
3344
|
+
async (payload) => Client.mfa.webauthnAuthOptions(payload),
|
|
3345
|
+
options
|
|
3346
|
+
);
|
|
3347
|
+
return { mutate, webauthnAuthOptions: mutate, isLoading };
|
|
3348
|
+
}
|
|
3349
|
+
function webauthnAuthVerify(options) {
|
|
3350
|
+
const { mutate, isLoading } = createMutation(
|
|
3351
|
+
async (payload) => Client.mfa.webauthnAuthVerify(payload),
|
|
3352
|
+
options
|
|
3353
|
+
);
|
|
3354
|
+
return { mutate, webauthnAuthVerify: mutate, isLoading };
|
|
3355
|
+
}
|
|
3356
|
+
function listWebauthnCredentials(options) {
|
|
3357
|
+
const { mutate, isLoading } = createMutation(
|
|
3358
|
+
async (payload) => Client.mfa.listWebauthnCredentials(payload),
|
|
3359
|
+
options
|
|
3360
|
+
);
|
|
3361
|
+
return { mutate, listWebauthnCredentials: mutate, isLoading };
|
|
3362
|
+
}
|
|
3363
|
+
function deleteWebauthnCredential(options) {
|
|
3364
|
+
const { mutate, isLoading } = createMutation(
|
|
3365
|
+
async (payload) => {
|
|
3366
|
+
const { credentialRecordId, portalId } = payload;
|
|
3367
|
+
return Client.mfa.deleteWebauthnCredential(credentialRecordId, { portalId });
|
|
3368
|
+
},
|
|
3369
|
+
options
|
|
3370
|
+
);
|
|
3371
|
+
return { mutate, deleteWebauthnCredential: mutate, isLoading };
|
|
3372
|
+
}
|
|
3373
|
+
function passkeyLoginOptions(options) {
|
|
3374
|
+
const { mutate, isLoading } = createMutation(
|
|
3375
|
+
async (payload) => Client.mfa.passkeyLoginOptions(payload),
|
|
3376
|
+
options
|
|
3377
|
+
);
|
|
3378
|
+
return { mutate, passkeyLoginOptions: mutate, isLoading };
|
|
3379
|
+
}
|
|
3380
|
+
function passkeyLoginVerify(options) {
|
|
3381
|
+
const { mutate, isLoading } = createMutation(
|
|
3382
|
+
async (payload) => {
|
|
3383
|
+
const response = await Client.mfa.passkeyLoginVerify(payload);
|
|
3384
|
+
await applyLoginResponse(response);
|
|
3385
|
+
return response;
|
|
3386
|
+
},
|
|
3387
|
+
options
|
|
3388
|
+
);
|
|
3389
|
+
return { mutate, passkeyLoginVerify: mutate, isLoading };
|
|
3390
|
+
}
|
|
3391
|
+
|
|
3392
|
+
// src/main/apis/security.ts
|
|
3393
|
+
function getSecurityOverview(options) {
|
|
3394
|
+
const { mutate, isLoading } = createMutation(
|
|
3395
|
+
async (payload) => Client.security.getOverview(payload),
|
|
3396
|
+
options
|
|
3397
|
+
);
|
|
3398
|
+
return { mutate, getSecurityOverview: mutate, isLoading };
|
|
3399
|
+
}
|
|
3400
|
+
function getSecurityLoginActivity(options) {
|
|
3401
|
+
const { mutate, isLoading } = createMutation(
|
|
3402
|
+
async (payload) => Client.security.getLoginActivity(payload),
|
|
3403
|
+
options
|
|
3404
|
+
);
|
|
3405
|
+
return { mutate, getSecurityLoginActivity: mutate, isLoading };
|
|
3406
|
+
}
|
|
3407
|
+
function getSecuritySessions(options) {
|
|
3408
|
+
const { mutate, isLoading } = createMutation(
|
|
3409
|
+
async (payload) => Client.security.getSessions(payload),
|
|
3410
|
+
options
|
|
3411
|
+
);
|
|
3412
|
+
return { mutate, getSecuritySessions: mutate, isLoading };
|
|
3413
|
+
}
|
|
3414
|
+
function revokeSecuritySession(options) {
|
|
3415
|
+
const { mutate, isLoading } = createMutation(
|
|
3416
|
+
async (payload) => Client.security.revokeSession(payload),
|
|
3417
|
+
options
|
|
3418
|
+
);
|
|
3419
|
+
return { mutate, revokeSecuritySession: mutate, isLoading };
|
|
3420
|
+
}
|
|
3421
|
+
function revokeOtherSecuritySessions(options) {
|
|
3422
|
+
const { mutate, isLoading } = createMutation(
|
|
3423
|
+
async (payload) => Client.security.revokeOtherSessions(payload?.refreshToken),
|
|
3424
|
+
options
|
|
3425
|
+
);
|
|
3426
|
+
return { mutate, revokeOtherSecuritySessions: mutate, isLoading };
|
|
3427
|
+
}
|
|
3428
|
+
|
|
3429
|
+
// src/main/apis/sso.ts
|
|
3006
3430
|
function getSsoDetails(options) {
|
|
3007
3431
|
const { mutate, isLoading } = createMutation(
|
|
3008
3432
|
async () => {
|
|
@@ -3046,12 +3470,13 @@ function ssoCallback(options) {
|
|
|
3046
3470
|
};
|
|
3047
3471
|
}
|
|
3048
3472
|
|
|
3049
|
-
// src/apis/users.ts
|
|
3473
|
+
// src/main/apis/users.ts
|
|
3050
3474
|
function me(options) {
|
|
3051
3475
|
const { mutate, isLoading } = createMutation(
|
|
3052
3476
|
async () => {
|
|
3053
3477
|
const response = await Client.user.me();
|
|
3054
|
-
|
|
3478
|
+
actions.setProfile(response);
|
|
3479
|
+
return response?.data;
|
|
3055
3480
|
},
|
|
3056
3481
|
options
|
|
3057
3482
|
);
|
|
@@ -3065,7 +3490,6 @@ function profile(options) {
|
|
|
3065
3490
|
const { mutate, isLoading } = createMutation(
|
|
3066
3491
|
async (paylaod) => {
|
|
3067
3492
|
const response = await Client.user.profile(paylaod);
|
|
3068
|
-
setProfileData(response);
|
|
3069
3493
|
return response;
|
|
3070
3494
|
},
|
|
3071
3495
|
options
|
|
@@ -3091,7 +3515,7 @@ function changePassword(options) {
|
|
|
3091
3515
|
};
|
|
3092
3516
|
}
|
|
3093
3517
|
|
|
3094
|
-
// src/apis/pipeline.ts
|
|
3518
|
+
// src/main/apis/pipeline.ts
|
|
3095
3519
|
function list(options) {
|
|
3096
3520
|
const {
|
|
3097
3521
|
getTableParam
|
|
@@ -3111,7 +3535,7 @@ function list(options) {
|
|
|
3111
3535
|
};
|
|
3112
3536
|
}
|
|
3113
3537
|
|
|
3114
|
-
// src/apis/stage.ts
|
|
3538
|
+
// src/main/apis/stage.ts
|
|
3115
3539
|
function list2(options) {
|
|
3116
3540
|
const { mutate, isLoading } = createMutation(
|
|
3117
3541
|
async (payload) => {
|
|
@@ -3127,8 +3551,8 @@ function list2(options) {
|
|
|
3127
3551
|
};
|
|
3128
3552
|
}
|
|
3129
3553
|
|
|
3130
|
-
// src/store2/use-multi-object.ts
|
|
3131
|
-
var multiObjectStore =
|
|
3554
|
+
// src/main/store2/use-multi-object.ts
|
|
3555
|
+
var multiObjectStore = createStore({
|
|
3132
3556
|
objects: {},
|
|
3133
3557
|
objectsPrependData: {},
|
|
3134
3558
|
meta: {}
|
|
@@ -3136,7 +3560,7 @@ var multiObjectStore = createStore2({
|
|
|
3136
3560
|
function getObjectKey(payload) {
|
|
3137
3561
|
return String(payload?.hubspotObjectTypeId ?? "");
|
|
3138
3562
|
}
|
|
3139
|
-
var
|
|
3563
|
+
var actions9 = {
|
|
3140
3564
|
setMultiObjectData(response, payload) {
|
|
3141
3565
|
const key = getObjectKey(payload);
|
|
3142
3566
|
const state = multiObjectStore.getState();
|
|
@@ -3222,10 +3646,10 @@ var actions8 = {
|
|
|
3222
3646
|
}
|
|
3223
3647
|
};
|
|
3224
3648
|
|
|
3225
|
-
// src/apis/object.ts
|
|
3649
|
+
// src/main/apis/object.ts
|
|
3226
3650
|
function list3(options) {
|
|
3227
3651
|
const { getTableParam } = useTable();
|
|
3228
|
-
const { setObjectsData, setTableData } =
|
|
3652
|
+
const { setObjectsData, setTableData } = actions3;
|
|
3229
3653
|
const { mutate, isLoading } = createMutation(
|
|
3230
3654
|
async (payload) => {
|
|
3231
3655
|
const param = await getTableParam(payload?.companyAsMediator);
|
|
@@ -3243,7 +3667,7 @@ function list3(options) {
|
|
|
3243
3667
|
};
|
|
3244
3668
|
}
|
|
3245
3669
|
function sideBarList(options) {
|
|
3246
|
-
const { setMultiObjectData } =
|
|
3670
|
+
const { setMultiObjectData } = actions9;
|
|
3247
3671
|
const { mutate, isLoading } = createMutation(
|
|
3248
3672
|
async (payload) => {
|
|
3249
3673
|
const response = await Client.object.sideBarList(payload);
|
|
@@ -3259,7 +3683,7 @@ function sideBarList(options) {
|
|
|
3259
3683
|
};
|
|
3260
3684
|
}
|
|
3261
3685
|
function form(options) {
|
|
3262
|
-
const { setFormData } =
|
|
3686
|
+
const { setFormData } = actions2;
|
|
3263
3687
|
const { mutate, isLoading } = createMutation(
|
|
3264
3688
|
async (payload) => {
|
|
3265
3689
|
const response = await Client.object.form(payload);
|
|
@@ -3289,8 +3713,8 @@ function objectFormOptions(options) {
|
|
|
3289
3713
|
};
|
|
3290
3714
|
}
|
|
3291
3715
|
function create(options) {
|
|
3292
|
-
const { setTablePrependData } =
|
|
3293
|
-
const { setMultiObjectPrependData } =
|
|
3716
|
+
const { setTablePrependData } = actions3;
|
|
3717
|
+
const { setMultiObjectPrependData } = actions9;
|
|
3294
3718
|
const { mutate, isLoading } = createMutation(
|
|
3295
3719
|
async (props) => {
|
|
3296
3720
|
if (props?.componentName === "sidebarTable") await setMultiObjectPrependData("loading", props);
|
|
@@ -3365,9 +3789,9 @@ function update(options) {
|
|
|
3365
3789
|
};
|
|
3366
3790
|
}
|
|
3367
3791
|
|
|
3368
|
-
// src/apis/note.ts
|
|
3792
|
+
// src/main/apis/note.ts
|
|
3369
3793
|
function list4(options) {
|
|
3370
|
-
const { setNotes } =
|
|
3794
|
+
const { setNotes } = actions5;
|
|
3371
3795
|
const { mutate, isLoading } = createMutation(
|
|
3372
3796
|
async (payload) => {
|
|
3373
3797
|
const response = await Client.note.list(payload);
|
|
@@ -3383,7 +3807,7 @@ function list4(options) {
|
|
|
3383
3807
|
};
|
|
3384
3808
|
}
|
|
3385
3809
|
function create2(options) {
|
|
3386
|
-
const { setPrependNote } =
|
|
3810
|
+
const { setPrependNote } = actions5;
|
|
3387
3811
|
const { mutate, isLoading } = createMutation(
|
|
3388
3812
|
async (props) => {
|
|
3389
3813
|
await setPrependNote("loading");
|
|
@@ -3400,7 +3824,7 @@ function create2(options) {
|
|
|
3400
3824
|
};
|
|
3401
3825
|
}
|
|
3402
3826
|
function update2(options) {
|
|
3403
|
-
const { updatePrependNote } =
|
|
3827
|
+
const { updatePrependNote } = actions5;
|
|
3404
3828
|
const { mutate, isLoading } = createMutation(
|
|
3405
3829
|
async (payload) => {
|
|
3406
3830
|
const response = await Client.note.update(payload);
|
|
@@ -3415,9 +3839,9 @@ function update2(options) {
|
|
|
3415
3839
|
};
|
|
3416
3840
|
}
|
|
3417
3841
|
|
|
3418
|
-
// src/apis/email.ts
|
|
3842
|
+
// src/main/apis/email.ts
|
|
3419
3843
|
function list5(options) {
|
|
3420
|
-
const { setEmails } =
|
|
3844
|
+
const { setEmails } = actions6;
|
|
3421
3845
|
const { mutate, isLoading } = createMutation(
|
|
3422
3846
|
async (payload) => {
|
|
3423
3847
|
const response = await Client.email.list(payload);
|
|
@@ -3433,7 +3857,7 @@ function list5(options) {
|
|
|
3433
3857
|
};
|
|
3434
3858
|
}
|
|
3435
3859
|
function create3(options) {
|
|
3436
|
-
const { setPrependEmail } =
|
|
3860
|
+
const { setPrependEmail } = actions6;
|
|
3437
3861
|
const { mutate, isLoading } = createMutation(
|
|
3438
3862
|
async (props) => {
|
|
3439
3863
|
await setPrependEmail("loading");
|
|
@@ -3450,7 +3874,7 @@ function create3(options) {
|
|
|
3450
3874
|
};
|
|
3451
3875
|
}
|
|
3452
3876
|
function update3(options) {
|
|
3453
|
-
const { updatePrependEmail } =
|
|
3877
|
+
const { updatePrependEmail } = actions6;
|
|
3454
3878
|
const { mutate, isLoading } = createMutation(
|
|
3455
3879
|
async (payload) => {
|
|
3456
3880
|
const response = await Client.email.update(payload);
|
|
@@ -3465,7 +3889,7 @@ function update3(options) {
|
|
|
3465
3889
|
};
|
|
3466
3890
|
}
|
|
3467
3891
|
|
|
3468
|
-
// src/apis/uploader.ts
|
|
3892
|
+
// src/main/apis/uploader.ts
|
|
3469
3893
|
function imageUpload(options) {
|
|
3470
3894
|
const { mutate, isLoading } = createMutation(
|
|
3471
3895
|
async (payload) => {
|
|
@@ -3484,7 +3908,7 @@ function attachmentUpload(options) {
|
|
|
3484
3908
|
const { mutate, isLoading } = createMutation(
|
|
3485
3909
|
async (payload) => {
|
|
3486
3910
|
const response = payload?.type === "email" ? await Client.email.attachment(payload) : await Client.note.attachment(payload);
|
|
3487
|
-
|
|
3911
|
+
actions4.setAttachment(response);
|
|
3488
3912
|
return response;
|
|
3489
3913
|
},
|
|
3490
3914
|
options
|
|
@@ -3496,7 +3920,7 @@ function attachmentUpload(options) {
|
|
|
3496
3920
|
};
|
|
3497
3921
|
}
|
|
3498
3922
|
|
|
3499
|
-
// src/apis/file.ts
|
|
3923
|
+
// src/main/apis/file.ts
|
|
3500
3924
|
function list6(options) {
|
|
3501
3925
|
const { mutate, isLoading } = createMutation(
|
|
3502
3926
|
async (payload) => {
|
|
@@ -3568,7 +3992,7 @@ function download(options) {
|
|
|
3568
3992
|
};
|
|
3569
3993
|
}
|
|
3570
3994
|
|
|
3571
|
-
// src/apis/cache.ts
|
|
3995
|
+
// src/main/apis/cache.ts
|
|
3572
3996
|
function purge(options) {
|
|
3573
3997
|
const { mutate, isLoading } = createMutation(
|
|
3574
3998
|
async (payload) => {
|
|
@@ -3594,7 +4018,7 @@ function purgeStatus(purgeJobId, options) {
|
|
|
3594
4018
|
};
|
|
3595
4019
|
}
|
|
3596
4020
|
|
|
3597
|
-
// src/breadcrumb/breadcrumbs.ts
|
|
4021
|
+
// src/main/breadcrumb/breadcrumbs.ts
|
|
3598
4022
|
var getBreadcrumbs = () => {
|
|
3599
4023
|
const search = getParam("b");
|
|
3600
4024
|
let breadcrumbs = decodeToBase64(search) || [];
|
|
@@ -3685,7 +4109,7 @@ var nameTrancate = (name) => {
|
|
|
3685
4109
|
return name?.length > 30 ? `${name?.slice(0, 30) + "..."}` : name;
|
|
3686
4110
|
};
|
|
3687
4111
|
|
|
3688
|
-
// src/breadcrumb/generate-url.ts
|
|
4112
|
+
// src/main/breadcrumb/generate-url.ts
|
|
3689
4113
|
var useMakeLink = () => {
|
|
3690
4114
|
const search = getParam("b");
|
|
3691
4115
|
const makeLink = (props) => {
|
|
@@ -3800,7 +4224,7 @@ var buildChildRoute = (props, breadcrumbItems) => {
|
|
|
3800
4224
|
return generateUrl(props, breadcrumbs);
|
|
3801
4225
|
};
|
|
3802
4226
|
|
|
3803
|
-
// src/utils/datetime.ts
|
|
4227
|
+
// src/main/utils/datetime.ts
|
|
3804
4228
|
var DEFAULT_HUBSPOT_TIMEZONE = "Asia/Kolkata";
|
|
3805
4229
|
function getCurrentTimeZone() {
|
|
3806
4230
|
try {
|
|
@@ -3860,10 +4284,11 @@ function formatHubSpotActivityDateTime(timestamp, timeZone = getCurrentTimeZone(
|
|
|
3860
4284
|
return formatHubSpotActivityDateTimeParts(timestamp, timeZone)?.formatted ?? "";
|
|
3861
4285
|
}
|
|
3862
4286
|
|
|
3863
|
-
// src/index.ts
|
|
4287
|
+
// src/main/index.ts
|
|
3864
4288
|
var api = {
|
|
3865
4289
|
preLogin,
|
|
3866
4290
|
login,
|
|
4291
|
+
verifyOtp,
|
|
3867
4292
|
verifyEmail,
|
|
3868
4293
|
resetPasswordVerifyToken,
|
|
3869
4294
|
resetPassword,
|
|
@@ -3878,6 +4303,29 @@ var api = {
|
|
|
3878
4303
|
me,
|
|
3879
4304
|
profile,
|
|
3880
4305
|
changePassword,
|
|
4306
|
+
sendMfaOtp,
|
|
4307
|
+
pendingPasskeyOptions,
|
|
4308
|
+
pendingPasskeyVerify,
|
|
4309
|
+
getMfaStatus,
|
|
4310
|
+
setMfaPreferences,
|
|
4311
|
+
startPhoneVerify,
|
|
4312
|
+
confirmPhoneVerify,
|
|
4313
|
+
totpEnrollStart,
|
|
4314
|
+
totpEnrollVerify,
|
|
4315
|
+
totpDisable,
|
|
4316
|
+
webauthnRegisterOptions,
|
|
4317
|
+
webauthnRegisterVerify,
|
|
4318
|
+
webauthnAuthOptions,
|
|
4319
|
+
webauthnAuthVerify,
|
|
4320
|
+
listWebauthnCredentials,
|
|
4321
|
+
deleteWebauthnCredential,
|
|
4322
|
+
passkeyLoginOptions,
|
|
4323
|
+
passkeyLoginVerify,
|
|
4324
|
+
getSecurityOverview,
|
|
4325
|
+
getSecurityLoginActivity,
|
|
4326
|
+
getSecuritySessions,
|
|
4327
|
+
revokeSecuritySession,
|
|
4328
|
+
revokeOtherSecuritySessions,
|
|
3881
4329
|
pipelines: list,
|
|
3882
4330
|
stages: list2,
|
|
3883
4331
|
objects: list3,
|
|
@@ -3929,6 +4377,6 @@ var routeParam = {
|
|
|
3929
4377
|
getParamDetails
|
|
3930
4378
|
};
|
|
3931
4379
|
|
|
3932
|
-
export { DEFAULT_HUBSPOT_TIMEZONE,
|
|
3933
|
-
//# sourceMappingURL=chunk-
|
|
3934
|
-
//# sourceMappingURL=chunk-
|
|
4380
|
+
export { DEFAULT_HUBSPOT_TIMEZONE, actions, actions3 as actions2, actions4 as actions3, actions5 as actions4, actions6 as actions5, actions8 as actions6, actions9 as actions7, api, breadcrumbsDetails, buildCachePurgeRequest, buildCrmListPurgeTarget, buildCrmSinglePurgeTarget, buildEngagementPurgeTarget, buildPortalConfigPurgeTarget, buildUserSessionPurgeTarget, client_exports, createCachePurgeJob, emailStore, extractEngagementItemIdFromWriteResponse, extractHubspotRecordIdFromWriteResponse, formatGmtOffset, formatHubSpotActivityDateTime, formatHubSpotActivityDateTimeParts, getCurrentTimeZone, getFieldErrors, getFormErrors, initializeHttpClient, mergePurgeTargets, multiObjectStore, normalizeToTimestamp, noteStore, purgeCrmCombined, purgeCrmDetailAndListAfterCrmWrite, purgeCrmListCache, purgeCrmListCacheAfterCrmWrite, purgeCrmObjectDataCache, purgeCrmRecordCache, purgeEngagementCaches, purgeEngagementCachesAfterCrmWrite, resolveCrmListPurgeQuery, routeParam, store, syncStore, tableStore2 as tableStore, toCachePurgeListQuery, uploaderStore, url, userStore };
|
|
4381
|
+
//# sourceMappingURL=chunk-C76BHDO4.js.map
|
|
4382
|
+
//# sourceMappingURL=chunk-C76BHDO4.js.map
|