woodsportal-client-sdk 1.1.4-dev.63 → 1.1.4-dev.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +74 -1
- package/dist/adapters/angular/index.js +5 -5
- package/dist/adapters/angular/index.js.map +1 -1
- package/dist/adapters/react/index.js +4 -4
- package/dist/adapters/react/index.js.map +1 -1
- package/dist/adapters/vue/index.js +5 -5
- package/dist/adapters/vue/index.js.map +1 -1
- package/dist/auth-utils-UU5PVRPL.js +3 -0
- package/dist/{auth-utils-BPOQZCAA.js.map → auth-utils-UU5PVRPL.js.map} +1 -1
- package/dist/{chunk-YEHZZGAU.js → chunk-FBCBJGCE.js} +531 -72
- package/dist/chunk-FBCBJGCE.js.map +1 -0
- package/dist/{chunk-ALQCX7KV.js → chunk-GMM4A727.js} +4 -4
- package/dist/chunk-GMM4A727.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-UGSUUZLT.js → chunk-S2NB4AXQ.js} +6 -6
- package/dist/chunk-S2NB4AXQ.js.map +1 -0
- package/dist/index.d.ts +354 -1
- package/dist/index.js +2 -2
- package/package.json +3 -3
- package/dist/auth-utils-BPOQZCAA.js +0 -3
- package/dist/chunk-ALQCX7KV.js.map +0 -1
- package/dist/chunk-UGSUUZLT.js.map +0 -1
- package/dist/chunk-Y5MRAAGK.js.map +0 -1
- package/dist/chunk-YEHZZGAU.js.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { __export, getProfile, 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,6 +121,32 @@ 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",
|
|
@@ -128,6 +154,7 @@ var API_ENDPOINTS = {
|
|
|
128
154
|
// User
|
|
129
155
|
ME: "/api/${hubId}/${portalId}/auth/me?include=crmProfile",
|
|
130
156
|
PROFILE: "/api/${hubId}/${portalId}/profiles",
|
|
157
|
+
PROFILE_UPDATE: "/api/${hubId}/${portalId}/profiles",
|
|
131
158
|
CHANGE_PASSWORD: "/api/auth/change-password",
|
|
132
159
|
// Pipeline
|
|
133
160
|
PIPELINES: "/api/${hubId}/${portalId}/hubspot-object-pipelines/${hubspotObjectTypeId}",
|
|
@@ -178,12 +205,12 @@ var API_ENDPOINTS = {
|
|
|
178
205
|
FILES_UPLOAD: "/api/${hubId}/${portalId}/hubspot-object-data/${objectId}/records/${id}/files"
|
|
179
206
|
};
|
|
180
207
|
|
|
181
|
-
// src/client/config.ts
|
|
208
|
+
// src/main/client/config.ts
|
|
182
209
|
var config2 = {
|
|
183
210
|
baseURL: ""
|
|
184
211
|
};
|
|
185
212
|
|
|
186
|
-
// src/client/http-clint.ts
|
|
213
|
+
// src/main/client/http-clint.ts
|
|
187
214
|
var axiosInstance = null;
|
|
188
215
|
var config3 = {};
|
|
189
216
|
function initializeHttpClient(clientConfig) {
|
|
@@ -234,9 +261,9 @@ function formatBooleanSearchParam(key, value) {
|
|
|
234
261
|
return value ? `${key}:1` : `${key}:`;
|
|
235
262
|
}
|
|
236
263
|
var HttpClient = class {
|
|
237
|
-
static async get(url2, params) {
|
|
264
|
+
static async get(url2, params, options) {
|
|
238
265
|
await ensureValidRefresh();
|
|
239
|
-
const response = await getAxiosInstance().get(url2, { params });
|
|
266
|
+
const response = await getAxiosInstance().get(url2, { params, ...options || {} });
|
|
240
267
|
return response.data;
|
|
241
268
|
}
|
|
242
269
|
static async post(url2, data, options) {
|
|
@@ -335,7 +362,187 @@ async function getAuthRefreshToken(refreshToken) {
|
|
|
335
362
|
}
|
|
336
363
|
}
|
|
337
364
|
|
|
338
|
-
// src/
|
|
365
|
+
// src/main/client/auth-headers.ts
|
|
366
|
+
function devPortalHeaders() {
|
|
367
|
+
if (!config?.devPortalId) {
|
|
368
|
+
return void 0;
|
|
369
|
+
}
|
|
370
|
+
return { "X-Dev-Portal-Id": config.devPortalId };
|
|
371
|
+
}
|
|
372
|
+
function mergeRequestOptions(token, extraHeaders) {
|
|
373
|
+
const bearerToken = token || getAccessToken();
|
|
374
|
+
const headers = { ...extraHeaders };
|
|
375
|
+
if (bearerToken) {
|
|
376
|
+
headers.Authorization = `Bearer ${bearerToken}`;
|
|
377
|
+
}
|
|
378
|
+
const devHeaders = devPortalHeaders();
|
|
379
|
+
if (devHeaders) {
|
|
380
|
+
Object.assign(headers, devHeaders);
|
|
381
|
+
}
|
|
382
|
+
return Object.keys(headers).length > 0 ? { headers } : void 0;
|
|
383
|
+
}
|
|
384
|
+
function hubIdQuery() {
|
|
385
|
+
return config.hubId ? { hubId: config.hubId } : null;
|
|
386
|
+
}
|
|
387
|
+
function portalIdQuery(portalId) {
|
|
388
|
+
const id = portalId ?? config.portalId ?? config.devPortalId;
|
|
389
|
+
if (id === null || id === void 0 || id === "") {
|
|
390
|
+
return void 0;
|
|
391
|
+
}
|
|
392
|
+
return { portalId: String(id) };
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
// src/main/client/mfa-client.ts
|
|
396
|
+
var mfaPortalQuery = (portalId) => portalIdQuery(portalId) ?? null;
|
|
397
|
+
var mfaClient = {
|
|
398
|
+
verifyOtp: (data) => AuthHttpClient.post(
|
|
399
|
+
generateApiUrl({ route: API_ENDPOINTS.VERIFY_OTP, queryParams: hubIdQuery() }),
|
|
400
|
+
data,
|
|
401
|
+
mergeRequestOptions(data.token)
|
|
402
|
+
),
|
|
403
|
+
sendPendingOtp: (data) => AuthHttpClient.post(
|
|
404
|
+
API_ENDPOINTS.MFA_PENDING_OTP_SEND,
|
|
405
|
+
data,
|
|
406
|
+
mergeRequestOptions(data.token)
|
|
407
|
+
),
|
|
408
|
+
pendingPasskeyOptions: (data) => AuthHttpClient.post(
|
|
409
|
+
API_ENDPOINTS.MFA_PENDING_PASSKEY_OPTIONS,
|
|
410
|
+
data,
|
|
411
|
+
mergeRequestOptions(data.token)
|
|
412
|
+
),
|
|
413
|
+
pendingPasskeyVerify: (data) => AuthHttpClient.post(
|
|
414
|
+
generateApiUrl({ route: API_ENDPOINTS.MFA_PENDING_PASSKEY_VERIFY, queryParams: hubIdQuery() }),
|
|
415
|
+
data,
|
|
416
|
+
mergeRequestOptions(data.token)
|
|
417
|
+
),
|
|
418
|
+
getStatus: (query) => HttpClient.get(
|
|
419
|
+
generateApiUrl({
|
|
420
|
+
route: API_ENDPOINTS.MFA_STATUS,
|
|
421
|
+
queryParams: mfaPortalQuery(query?.portalId)
|
|
422
|
+
})
|
|
423
|
+
),
|
|
424
|
+
setPreferences: (data, query) => HttpClient.put(
|
|
425
|
+
generateApiUrl({
|
|
426
|
+
route: API_ENDPOINTS.MFA_PREFERENCES,
|
|
427
|
+
queryParams: mfaPortalQuery(query?.portalId)
|
|
428
|
+
}),
|
|
429
|
+
data
|
|
430
|
+
),
|
|
431
|
+
startPhoneVerify: (data) => HttpClient.post(API_ENDPOINTS.MFA_PHONE_VERIFY_START, data),
|
|
432
|
+
confirmPhoneVerify: (data) => HttpClient.post(API_ENDPOINTS.MFA_PHONE_VERIFY_CONFIRM, data),
|
|
433
|
+
totpEnrollStart: (query) => HttpClient.post(
|
|
434
|
+
generateApiUrl({
|
|
435
|
+
route: API_ENDPOINTS.MFA_TOTP_ENROLL_START,
|
|
436
|
+
queryParams: mfaPortalQuery(query?.portalId)
|
|
437
|
+
}),
|
|
438
|
+
null
|
|
439
|
+
),
|
|
440
|
+
totpEnrollVerify: (data) => HttpClient.post(
|
|
441
|
+
generateApiUrl({
|
|
442
|
+
route: API_ENDPOINTS.MFA_TOTP_ENROLL_VERIFY,
|
|
443
|
+
queryParams: mfaPortalQuery(data.portalId)
|
|
444
|
+
}),
|
|
445
|
+
data
|
|
446
|
+
),
|
|
447
|
+
totpDisable: (data) => HttpClient.post(API_ENDPOINTS.MFA_TOTP_DISABLE, data),
|
|
448
|
+
webauthnRegisterOptions: (query) => HttpClient.post(
|
|
449
|
+
generateApiUrl({
|
|
450
|
+
route: API_ENDPOINTS.MFA_WEBAUTHN_REGISTER_OPTIONS,
|
|
451
|
+
queryParams: mfaPortalQuery(query?.portalId)
|
|
452
|
+
}),
|
|
453
|
+
null,
|
|
454
|
+
mergeRequestOptions(void 0)
|
|
455
|
+
),
|
|
456
|
+
webauthnRegisterVerify: (data) => HttpClient.post(
|
|
457
|
+
generateApiUrl({
|
|
458
|
+
route: API_ENDPOINTS.MFA_WEBAUTHN_REGISTER_VERIFY,
|
|
459
|
+
queryParams: mfaPortalQuery(data.portalId)
|
|
460
|
+
}),
|
|
461
|
+
data
|
|
462
|
+
),
|
|
463
|
+
webauthnAuthOptions: (query) => HttpClient.post(
|
|
464
|
+
generateApiUrl({
|
|
465
|
+
route: API_ENDPOINTS.MFA_WEBAUTHN_AUTH_OPTIONS,
|
|
466
|
+
queryParams: mfaPortalQuery(query?.portalId)
|
|
467
|
+
}),
|
|
468
|
+
null
|
|
469
|
+
),
|
|
470
|
+
webauthnAuthVerify: (data) => HttpClient.post(
|
|
471
|
+
generateApiUrl({
|
|
472
|
+
route: API_ENDPOINTS.MFA_WEBAUTHN_AUTH_VERIFY,
|
|
473
|
+
queryParams: mfaPortalQuery(data.portalId)
|
|
474
|
+
}),
|
|
475
|
+
data
|
|
476
|
+
),
|
|
477
|
+
listWebauthnCredentials: (query) => HttpClient.get(
|
|
478
|
+
generateApiUrl({
|
|
479
|
+
route: API_ENDPOINTS.MFA_WEBAUTHN_CREDENTIALS,
|
|
480
|
+
queryParams: mfaPortalQuery(query?.portalId)
|
|
481
|
+
})
|
|
482
|
+
),
|
|
483
|
+
deleteWebauthnCredential: (credentialRecordId, query) => HttpClient.delete(
|
|
484
|
+
generateApiUrl({
|
|
485
|
+
route: API_ENDPOINTS.MFA_WEBAUTHN_CREDENTIAL_DELETE,
|
|
486
|
+
params: { credentialRecordId: String(credentialRecordId) },
|
|
487
|
+
queryParams: mfaPortalQuery(query?.portalId)
|
|
488
|
+
})
|
|
489
|
+
),
|
|
490
|
+
passkeyLoginOptions: (data) => AuthHttpClient.post(
|
|
491
|
+
generateApiUrl({ route: API_ENDPOINTS.PASSKEY_LOGIN_OPTIONS, queryParams: hubIdQuery() }),
|
|
492
|
+
data,
|
|
493
|
+
mergeRequestOptions(void 0)
|
|
494
|
+
),
|
|
495
|
+
passkeyLoginVerify: (data) => AuthHttpClient.post(
|
|
496
|
+
generateApiUrl({ route: API_ENDPOINTS.PASSKEY_LOGIN_VERIFY, queryParams: hubIdQuery() }),
|
|
497
|
+
data,
|
|
498
|
+
mergeRequestOptions(void 0)
|
|
499
|
+
)
|
|
500
|
+
};
|
|
501
|
+
|
|
502
|
+
// src/main/client/security-client.ts
|
|
503
|
+
var refreshTokenHeaders = (refreshToken) => {
|
|
504
|
+
if (!refreshToken) {
|
|
505
|
+
return void 0;
|
|
506
|
+
}
|
|
507
|
+
return { "X-Refresh-Token": refreshToken };
|
|
508
|
+
};
|
|
509
|
+
var securityClient = {
|
|
510
|
+
getOverview: (query) => HttpClient.get(
|
|
511
|
+
generateApiUrl({
|
|
512
|
+
route: API_ENDPOINTS.SECURITY_OVERVIEW,
|
|
513
|
+
queryParams: portalIdQuery(query?.portalId)
|
|
514
|
+
})
|
|
515
|
+
),
|
|
516
|
+
getLoginActivity: (query) => HttpClient.get(
|
|
517
|
+
generateApiUrl({
|
|
518
|
+
route: API_ENDPOINTS.SECURITY_LOGIN_ACTIVITY,
|
|
519
|
+
queryParams: query ?? {}
|
|
520
|
+
})
|
|
521
|
+
),
|
|
522
|
+
getSessions: (query) => HttpClient.get(
|
|
523
|
+
generateApiUrl({
|
|
524
|
+
route: API_ENDPOINTS.SECURITY_SESSIONS,
|
|
525
|
+
queryParams: query?.currentFamilyId ? { currentFamilyId: query.currentFamilyId } : void 0
|
|
526
|
+
}),
|
|
527
|
+
void 0,
|
|
528
|
+
mergeRequestOptions(void 0, refreshTokenHeaders(query?.refreshToken))
|
|
529
|
+
),
|
|
530
|
+
revokeSession: (payload) => HttpClient.post(
|
|
531
|
+
generateApiUrl({
|
|
532
|
+
route: API_ENDPOINTS.SECURITY_SESSION_REVOKE,
|
|
533
|
+
params: { familyId: payload.familyId }
|
|
534
|
+
}),
|
|
535
|
+
null,
|
|
536
|
+
mergeRequestOptions(void 0, refreshTokenHeaders(payload.refreshToken))
|
|
537
|
+
),
|
|
538
|
+
revokeOtherSessions: (refreshToken) => HttpClient.post(
|
|
539
|
+
API_ENDPOINTS.SECURITY_SESSIONS_REVOKE_OTHERS,
|
|
540
|
+
null,
|
|
541
|
+
mergeRequestOptions(void 0, refreshTokenHeaders(refreshToken))
|
|
542
|
+
)
|
|
543
|
+
};
|
|
544
|
+
|
|
545
|
+
// src/main/store2/store.ts
|
|
339
546
|
function createStore(initialState) {
|
|
340
547
|
let state = initialState;
|
|
341
548
|
const listeners = /* @__PURE__ */ new Set();
|
|
@@ -359,7 +566,7 @@ function createStore(initialState) {
|
|
|
359
566
|
};
|
|
360
567
|
}
|
|
361
568
|
|
|
362
|
-
// src/store2/use-user.ts
|
|
569
|
+
// src/main/store2/use-user.ts
|
|
363
570
|
var userStore = createStore({
|
|
364
571
|
profile: getProfile()
|
|
365
572
|
});
|
|
@@ -396,7 +603,7 @@ function decodeToBase64(encoded) {
|
|
|
396
603
|
}
|
|
397
604
|
}
|
|
398
605
|
|
|
399
|
-
// src/breadcrumb/url-utils.ts
|
|
606
|
+
// src/main/breadcrumb/url-utils.ts
|
|
400
607
|
function mapKeysDeep(obj, keyMap2) {
|
|
401
608
|
if (Array.isArray(obj)) {
|
|
402
609
|
return obj.map((item) => mapKeysDeep(item, keyMap2));
|
|
@@ -479,7 +686,7 @@ var generatePath = (breadcrumbs, breadcrumb, index) => {
|
|
|
479
686
|
}
|
|
480
687
|
};
|
|
481
688
|
|
|
482
|
-
// src/breadcrumb/key-map.ts
|
|
689
|
+
// src/main/breadcrumb/key-map.ts
|
|
483
690
|
var keyMap = {
|
|
484
691
|
dp: "defPermissions",
|
|
485
692
|
n: "name",
|
|
@@ -504,7 +711,7 @@ var keyMap = {
|
|
|
504
711
|
pId: "pipeline_id"
|
|
505
712
|
};
|
|
506
713
|
|
|
507
|
-
// src/utils/url.ts
|
|
714
|
+
// src/main/utils/url.ts
|
|
508
715
|
var ticketHubspotObjectTypeId = () => {
|
|
509
716
|
const { getParamDetails: getParamDetails2 } = routeParam;
|
|
510
717
|
const paramDetails = getParamDetails2();
|
|
@@ -523,7 +730,7 @@ var ticketHubspotObjectTypeId = () => {
|
|
|
523
730
|
return "";
|
|
524
731
|
};
|
|
525
732
|
|
|
526
|
-
// src/utils/param.ts
|
|
733
|
+
// src/main/utils/param.ts
|
|
527
734
|
function getParam(paramName) {
|
|
528
735
|
if (typeof globalThis === "undefined" || !globalThis.location) return null;
|
|
529
736
|
const hash = globalThis.location.hash || "";
|
|
@@ -541,7 +748,7 @@ function getPath() {
|
|
|
541
748
|
return hash.slice(1).split("?")[0];
|
|
542
749
|
}
|
|
543
750
|
|
|
544
|
-
// src/breadcrumb/param.ts
|
|
751
|
+
// src/main/breadcrumb/param.ts
|
|
545
752
|
var getRouteMenu = (path) => {
|
|
546
753
|
const apiRoutes = globalThis?.apiRoutes || [];
|
|
547
754
|
return apiRoutes.find((menu) => menu?.path === path);
|
|
@@ -637,7 +844,7 @@ var getParamDetails = (props, isDetailsPage = false) => {
|
|
|
637
844
|
};
|
|
638
845
|
};
|
|
639
846
|
|
|
640
|
-
// src/store/index.ts
|
|
847
|
+
// src/main/store/index.ts
|
|
641
848
|
function createStore2(initializer) {
|
|
642
849
|
let state;
|
|
643
850
|
const listeners = /* @__PURE__ */ new Set();
|
|
@@ -665,12 +872,12 @@ function createStore2(initializer) {
|
|
|
665
872
|
};
|
|
666
873
|
}
|
|
667
874
|
|
|
668
|
-
// src/utils/getCookieData.ts
|
|
875
|
+
// src/main/utils/getCookieData.ts
|
|
669
876
|
var getAuthSubscriptionType = () => {
|
|
670
877
|
return getCookie("subscriptionType");
|
|
671
878
|
};
|
|
672
879
|
|
|
673
|
-
// src/breadcrumb/url.ts
|
|
880
|
+
// src/main/breadcrumb/url.ts
|
|
674
881
|
var useUpdateLink = () => {
|
|
675
882
|
const updateLink = async (props, displayName = "prm") => {
|
|
676
883
|
const search = getParam("b");
|
|
@@ -771,7 +978,7 @@ var updateBParam = (newValue) => {
|
|
|
771
978
|
}
|
|
772
979
|
};
|
|
773
980
|
|
|
774
|
-
// src/store/use-table.ts
|
|
981
|
+
// src/main/store/use-table.ts
|
|
775
982
|
var pageLimit = 10;
|
|
776
983
|
var tableStore = createStore2((set, get) => ({
|
|
777
984
|
// ==============================
|
|
@@ -1020,7 +1227,7 @@ function useTable() {
|
|
|
1020
1227
|
};
|
|
1021
1228
|
}
|
|
1022
1229
|
|
|
1023
|
-
// src/store2/use-form.ts
|
|
1230
|
+
// src/main/store2/use-form.ts
|
|
1024
1231
|
var formStore = createStore({
|
|
1025
1232
|
form: null
|
|
1026
1233
|
});
|
|
@@ -1031,7 +1238,7 @@ var actions2 = {
|
|
|
1031
1238
|
});
|
|
1032
1239
|
}};
|
|
1033
1240
|
|
|
1034
|
-
// src/store2/use-table.ts
|
|
1241
|
+
// src/main/store2/use-table.ts
|
|
1035
1242
|
var tableStore2 = createStore({
|
|
1036
1243
|
queryParams: null,
|
|
1037
1244
|
multiObjectsQueryParams: {},
|
|
@@ -1328,7 +1535,7 @@ var actions3 = {
|
|
|
1328
1535
|
}
|
|
1329
1536
|
};
|
|
1330
1537
|
|
|
1331
|
-
// src/store2/use-uploader.ts
|
|
1538
|
+
// src/main/store2/use-uploader.ts
|
|
1332
1539
|
var uploaderStore = createStore({
|
|
1333
1540
|
attachments: []
|
|
1334
1541
|
});
|
|
@@ -1363,7 +1570,7 @@ var actions4 = {
|
|
|
1363
1570
|
}
|
|
1364
1571
|
};
|
|
1365
1572
|
|
|
1366
|
-
// src/store2/use-note.ts
|
|
1573
|
+
// src/main/store2/use-note.ts
|
|
1367
1574
|
var noteStore = createStore({
|
|
1368
1575
|
notes: [],
|
|
1369
1576
|
prependNotes: [],
|
|
@@ -1521,7 +1728,7 @@ var actions5 = {
|
|
|
1521
1728
|
}
|
|
1522
1729
|
};
|
|
1523
1730
|
|
|
1524
|
-
// src/store2/use-email.ts
|
|
1731
|
+
// src/main/store2/use-email.ts
|
|
1525
1732
|
var emailStore = createStore({
|
|
1526
1733
|
emails: [],
|
|
1527
1734
|
prependEmails: [],
|
|
@@ -1679,7 +1886,7 @@ var actions6 = {
|
|
|
1679
1886
|
}
|
|
1680
1887
|
};
|
|
1681
1888
|
|
|
1682
|
-
// src/store2/use-file.ts
|
|
1889
|
+
// src/main/store2/use-file.ts
|
|
1683
1890
|
var fileStore = createStore({
|
|
1684
1891
|
queryParams: null
|
|
1685
1892
|
});
|
|
@@ -1692,7 +1899,7 @@ var actions7 = {
|
|
|
1692
1899
|
}
|
|
1693
1900
|
};
|
|
1694
1901
|
|
|
1695
|
-
// src/utils/cache/builders.ts
|
|
1902
|
+
// src/main/utils/cache/builders.ts
|
|
1696
1903
|
function buildCrmListPurgeTarget(objectTypeId, listQuery, recordIds) {
|
|
1697
1904
|
const target = {
|
|
1698
1905
|
domain: "crm_object_data",
|
|
@@ -1761,7 +1968,7 @@ function buildCachePurgeRequest(targets, options) {
|
|
|
1761
1968
|
return request;
|
|
1762
1969
|
}
|
|
1763
1970
|
|
|
1764
|
-
// src/utils/cache/createCachePurgeJob.ts
|
|
1971
|
+
// src/main/utils/cache/createCachePurgeJob.ts
|
|
1765
1972
|
function randomIdempotencyKey() {
|
|
1766
1973
|
if (typeof crypto !== "undefined" && crypto.randomUUID) {
|
|
1767
1974
|
return crypto.randomUUID();
|
|
@@ -1846,7 +2053,7 @@ async function createCachePurgeJob(request, options = {}) {
|
|
|
1846
2053
|
}
|
|
1847
2054
|
}
|
|
1848
2055
|
|
|
1849
|
-
// src/utils/cache/crmCacheRefresh.ts
|
|
2056
|
+
// src/main/utils/cache/crmCacheRefresh.ts
|
|
1850
2057
|
async function purgeCrmObjectDataCache(options) {
|
|
1851
2058
|
const result = await purgeCrmListCache(options);
|
|
1852
2059
|
return result.ok;
|
|
@@ -1973,7 +2180,7 @@ async function purgeCrmCombined(options) {
|
|
|
1973
2180
|
});
|
|
1974
2181
|
}
|
|
1975
2182
|
|
|
1976
|
-
// src/utils/cache/extractHubspotRecordIdFromWriteResponse.ts
|
|
2183
|
+
// src/main/utils/cache/extractHubspotRecordIdFromWriteResponse.ts
|
|
1977
2184
|
function extractHubspotRecordIdFromWriteResponse(response) {
|
|
1978
2185
|
if (response == null || typeof response !== "object") {
|
|
1979
2186
|
return void 0;
|
|
@@ -2000,7 +2207,7 @@ function idFromRecordPayload(payload) {
|
|
|
2000
2207
|
return void 0;
|
|
2001
2208
|
}
|
|
2002
2209
|
|
|
2003
|
-
// src/utils/cache/extractEngagementItemIdFromWriteResponse.ts
|
|
2210
|
+
// src/main/utils/cache/extractEngagementItemIdFromWriteResponse.ts
|
|
2004
2211
|
function extractEngagementItemIdFromWriteResponse(response) {
|
|
2005
2212
|
if (response == null || typeof response !== "object") {
|
|
2006
2213
|
return void 0;
|
|
@@ -2055,7 +2262,7 @@ function fieldValue(raw) {
|
|
|
2055
2262
|
return s.length > 0 ? s : void 0;
|
|
2056
2263
|
}
|
|
2057
2264
|
|
|
2058
|
-
// src/utils/cache/resolveCrmListPurgeQuery.ts
|
|
2265
|
+
// src/main/utils/cache/resolveCrmListPurgeQuery.ts
|
|
2059
2266
|
var LIST_QUERY_KEYS = [
|
|
2060
2267
|
"sort",
|
|
2061
2268
|
"search",
|
|
@@ -2134,7 +2341,7 @@ function resolveCrmListPurgeQuery(options) {
|
|
|
2134
2341
|
};
|
|
2135
2342
|
}
|
|
2136
2343
|
|
|
2137
|
-
// src/client/index.ts
|
|
2344
|
+
// src/main/client/index.ts
|
|
2138
2345
|
var recordWriteContext = (paramsObject) => {
|
|
2139
2346
|
if (!paramsObject) {
|
|
2140
2347
|
return void 0;
|
|
@@ -2200,6 +2407,7 @@ var Client = {
|
|
|
2200
2407
|
}
|
|
2201
2408
|
);
|
|
2202
2409
|
},
|
|
2410
|
+
verifyOtp: (data) => mfaClient.verifyOtp(data),
|
|
2203
2411
|
verifyEmail: (data) => AuthHttpClient.post(API_ENDPOINTS.VERIFY_EMAIL, data),
|
|
2204
2412
|
resetPasswordVerifyToken: (data) => AuthHttpClient.post(API_ENDPOINTS.RESET_PASSWORD_VERIFY_TOKEN, data),
|
|
2205
2413
|
resetPassword: (data) => AuthHttpClient.post(API_ENDPOINTS.RESET_PASSWORD, data),
|
|
@@ -2217,6 +2425,7 @@ var Client = {
|
|
|
2217
2425
|
user: {
|
|
2218
2426
|
me: () => HttpClient.get(generateApiUrl({ route: API_ENDPOINTS.ME })),
|
|
2219
2427
|
profile: (payload) => HttpClient.get(generateApiUrl({ route: API_ENDPOINTS.PROFILE, queryParams: payload })),
|
|
2428
|
+
profileUpdate: (props) => HttpClient.put(generateApiUrl({ route: API_ENDPOINTS.PROFILE_UPDATE, queryParams: props?.queryParams || {} }), props?.payload || {}),
|
|
2220
2429
|
changePassword: (data) => HttpClient.post(API_ENDPOINTS.CHANGE_PASSWORD, data)
|
|
2221
2430
|
},
|
|
2222
2431
|
pipeline: {
|
|
@@ -2747,10 +2956,12 @@ var Client = {
|
|
|
2747
2956
|
}
|
|
2748
2957
|
return response;
|
|
2749
2958
|
}
|
|
2750
|
-
}
|
|
2959
|
+
},
|
|
2960
|
+
mfa: mfaClient,
|
|
2961
|
+
security: securityClient
|
|
2751
2962
|
};
|
|
2752
2963
|
|
|
2753
|
-
// src/store2/use-sync.ts
|
|
2964
|
+
// src/main/store2/use-sync.ts
|
|
2754
2965
|
var syncStore = createStore({
|
|
2755
2966
|
apiSync: false,
|
|
2756
2967
|
sync: false,
|
|
@@ -2789,7 +3000,7 @@ var resetAllStore = () => {
|
|
|
2789
3000
|
actions6.clearPrependEmails();
|
|
2790
3001
|
};
|
|
2791
3002
|
|
|
2792
|
-
// src/utils/logError.ts
|
|
3003
|
+
// src/main/utils/logError.ts
|
|
2793
3004
|
function logError(context, error) {
|
|
2794
3005
|
if (axios.isAxiosError(error)) {
|
|
2795
3006
|
resetAllStore();
|
|
@@ -2810,7 +3021,7 @@ function logError(context, error) {
|
|
|
2810
3021
|
console.error(context, error);
|
|
2811
3022
|
}
|
|
2812
3023
|
|
|
2813
|
-
// src/mutation/createMutation.ts
|
|
3024
|
+
// src/main/mutation/createMutation.ts
|
|
2814
3025
|
function createMutation(mutationFn, options) {
|
|
2815
3026
|
let inFlight = 0;
|
|
2816
3027
|
let lastReportedLoading = null;
|
|
@@ -2842,7 +3053,41 @@ function createMutation(mutationFn, options) {
|
|
|
2842
3053
|
};
|
|
2843
3054
|
}
|
|
2844
3055
|
|
|
2845
|
-
// src/
|
|
3056
|
+
// src/main/client/login-session.ts
|
|
3057
|
+
async function completeLoginSession(response) {
|
|
3058
|
+
const tokenData = response?.data?.tokenData || {};
|
|
3059
|
+
const loggedInDetails = response?.data?.loggedInDetails || {};
|
|
3060
|
+
const currentPortal = response?.data?.loggedInDetails?.currentPortal || {};
|
|
3061
|
+
const currentPortalId = currentPortal?.portalId || null;
|
|
3062
|
+
const subscriptionType = loggedInDetails?.subscriptionType || "BASIC";
|
|
3063
|
+
const token = tokenData?.token;
|
|
3064
|
+
const refreshToken = tokenData?.refreshToken;
|
|
3065
|
+
const expiresIn = tokenData?.expiresIn;
|
|
3066
|
+
const rExpiresIn = tokenData?.refreshExpiresIn;
|
|
3067
|
+
setPortal(currentPortal);
|
|
3068
|
+
setSubscriptionType(subscriptionType);
|
|
3069
|
+
await setAccessToken(token, expiresIn);
|
|
3070
|
+
await setRefreshToken(refreshToken, rExpiresIn);
|
|
3071
|
+
await setLoggedInDetails(response.data);
|
|
3072
|
+
actions.setProfile(response);
|
|
3073
|
+
setConfig.setDevPortalId(currentPortalId);
|
|
3074
|
+
return response;
|
|
3075
|
+
}
|
|
3076
|
+
async function applyLoginResponse(response) {
|
|
3077
|
+
const data = response?.data ?? response;
|
|
3078
|
+
if (data?.twoFactorRequired === true) {
|
|
3079
|
+
const tokenData = data?.tokenData || {};
|
|
3080
|
+
const token = tokenData?.token;
|
|
3081
|
+
const expiresIn = tokenData?.expiresIn;
|
|
3082
|
+
if (token) {
|
|
3083
|
+
await setAccessToken(token, expiresIn);
|
|
3084
|
+
}
|
|
3085
|
+
return response;
|
|
3086
|
+
}
|
|
3087
|
+
return completeLoginSession(response);
|
|
3088
|
+
}
|
|
3089
|
+
|
|
3090
|
+
// src/main/apis/authentication.ts
|
|
2846
3091
|
function preLogin(options) {
|
|
2847
3092
|
const { mutate, isLoading } = createMutation(
|
|
2848
3093
|
async (payload) => {
|
|
@@ -2861,22 +3106,7 @@ function login(options) {
|
|
|
2861
3106
|
const { mutate, isLoading } = createMutation(
|
|
2862
3107
|
async (payload) => {
|
|
2863
3108
|
const response = await Client.authentication.login(payload);
|
|
2864
|
-
|
|
2865
|
-
const loggedInDetails = response?.data?.loggedInDetails || {};
|
|
2866
|
-
const currentPortal = response?.data?.loggedInDetails?.currentPortal || {};
|
|
2867
|
-
const currentPortalId = currentPortal?.portalId || null;
|
|
2868
|
-
const SubscriptionType = loggedInDetails?.subscriptionType || "BASIC";
|
|
2869
|
-
const token = tokenData?.token;
|
|
2870
|
-
const refreshToken = tokenData?.refreshToken;
|
|
2871
|
-
const expiresIn = tokenData?.expiresIn;
|
|
2872
|
-
const rExpiresIn = tokenData?.refreshExpiresIn;
|
|
2873
|
-
setPortal(currentPortal);
|
|
2874
|
-
setSubscriptionType(SubscriptionType);
|
|
2875
|
-
await setAccessToken(token, expiresIn);
|
|
2876
|
-
await setRefreshToken(refreshToken, rExpiresIn);
|
|
2877
|
-
await setLoggedInDetails(response.data);
|
|
2878
|
-
actions.setProfile(response);
|
|
2879
|
-
setConfig.setDevPortalId(currentPortalId);
|
|
3109
|
+
await applyLoginResponse(response);
|
|
2880
3110
|
return response;
|
|
2881
3111
|
},
|
|
2882
3112
|
options
|
|
@@ -3008,7 +3238,197 @@ function resendEmail(options) {
|
|
|
3008
3238
|
};
|
|
3009
3239
|
}
|
|
3010
3240
|
|
|
3011
|
-
// src/apis/
|
|
3241
|
+
// src/main/apis/mfa.ts
|
|
3242
|
+
function verifyOtp(options) {
|
|
3243
|
+
const { mutate, isLoading } = createMutation(
|
|
3244
|
+
async (payload) => {
|
|
3245
|
+
const response = await Client.authentication.verifyOtp(payload);
|
|
3246
|
+
await applyLoginResponse(response);
|
|
3247
|
+
return response;
|
|
3248
|
+
},
|
|
3249
|
+
options
|
|
3250
|
+
);
|
|
3251
|
+
return { mutate, verifyOtp: mutate, isLoading };
|
|
3252
|
+
}
|
|
3253
|
+
function sendMfaOtp(options) {
|
|
3254
|
+
const { mutate, isLoading } = createMutation(
|
|
3255
|
+
async (payload) => Client.mfa.sendPendingOtp(payload),
|
|
3256
|
+
options
|
|
3257
|
+
);
|
|
3258
|
+
return { mutate, sendMfaOtp: mutate, isLoading };
|
|
3259
|
+
}
|
|
3260
|
+
function pendingPasskeyOptions(options) {
|
|
3261
|
+
const { mutate, isLoading } = createMutation(
|
|
3262
|
+
async (payload) => Client.mfa.pendingPasskeyOptions(payload),
|
|
3263
|
+
options
|
|
3264
|
+
);
|
|
3265
|
+
return { mutate, pendingPasskeyOptions: mutate, isLoading };
|
|
3266
|
+
}
|
|
3267
|
+
function pendingPasskeyVerify(options) {
|
|
3268
|
+
const { mutate, isLoading } = createMutation(
|
|
3269
|
+
async (payload) => {
|
|
3270
|
+
const response = await Client.mfa.pendingPasskeyVerify(payload);
|
|
3271
|
+
await applyLoginResponse(response);
|
|
3272
|
+
return response;
|
|
3273
|
+
},
|
|
3274
|
+
options
|
|
3275
|
+
);
|
|
3276
|
+
return { mutate, pendingPasskeyVerify: mutate, isLoading };
|
|
3277
|
+
}
|
|
3278
|
+
function getMfaStatus(options) {
|
|
3279
|
+
const { mutate, isLoading } = createMutation(
|
|
3280
|
+
async (payload) => Client.mfa.getStatus(payload),
|
|
3281
|
+
options
|
|
3282
|
+
);
|
|
3283
|
+
return { mutate, getMfaStatus: mutate, isLoading };
|
|
3284
|
+
}
|
|
3285
|
+
function setMfaPreferences(options) {
|
|
3286
|
+
const { mutate, isLoading } = createMutation(
|
|
3287
|
+
async (payload) => {
|
|
3288
|
+
const { portalId, ...data } = payload;
|
|
3289
|
+
return Client.mfa.setPreferences(data, { portalId });
|
|
3290
|
+
},
|
|
3291
|
+
options
|
|
3292
|
+
);
|
|
3293
|
+
return { mutate, setMfaPreferences: mutate, isLoading };
|
|
3294
|
+
}
|
|
3295
|
+
function startPhoneVerify(options) {
|
|
3296
|
+
const { mutate, isLoading } = createMutation(
|
|
3297
|
+
async (payload) => Client.mfa.startPhoneVerify(payload),
|
|
3298
|
+
options
|
|
3299
|
+
);
|
|
3300
|
+
return { mutate, startPhoneVerify: mutate, isLoading };
|
|
3301
|
+
}
|
|
3302
|
+
function confirmPhoneVerify(options) {
|
|
3303
|
+
const { mutate, isLoading } = createMutation(
|
|
3304
|
+
async (payload) => Client.mfa.confirmPhoneVerify(payload),
|
|
3305
|
+
options
|
|
3306
|
+
);
|
|
3307
|
+
return { mutate, confirmPhoneVerify: mutate, isLoading };
|
|
3308
|
+
}
|
|
3309
|
+
function totpEnrollStart(options) {
|
|
3310
|
+
const { mutate, isLoading } = createMutation(
|
|
3311
|
+
async (payload) => Client.mfa.totpEnrollStart(payload),
|
|
3312
|
+
options
|
|
3313
|
+
);
|
|
3314
|
+
return { mutate, totpEnrollStart: mutate, isLoading };
|
|
3315
|
+
}
|
|
3316
|
+
function totpEnrollVerify(options) {
|
|
3317
|
+
const { mutate, isLoading } = createMutation(
|
|
3318
|
+
async (payload) => Client.mfa.totpEnrollVerify(payload),
|
|
3319
|
+
options
|
|
3320
|
+
);
|
|
3321
|
+
return { mutate, totpEnrollVerify: mutate, isLoading };
|
|
3322
|
+
}
|
|
3323
|
+
function totpDisable(options) {
|
|
3324
|
+
const { mutate, isLoading } = createMutation(
|
|
3325
|
+
async (payload) => Client.mfa.totpDisable(payload),
|
|
3326
|
+
options
|
|
3327
|
+
);
|
|
3328
|
+
return { mutate, totpDisable: mutate, isLoading };
|
|
3329
|
+
}
|
|
3330
|
+
function webauthnRegisterOptions(options) {
|
|
3331
|
+
const { mutate, isLoading } = createMutation(
|
|
3332
|
+
async (payload) => Client.mfa.webauthnRegisterOptions(payload),
|
|
3333
|
+
options
|
|
3334
|
+
);
|
|
3335
|
+
return { mutate, webauthnRegisterOptions: mutate, isLoading };
|
|
3336
|
+
}
|
|
3337
|
+
function webauthnRegisterVerify(options) {
|
|
3338
|
+
const { mutate, isLoading } = createMutation(
|
|
3339
|
+
async (payload) => Client.mfa.webauthnRegisterVerify(payload),
|
|
3340
|
+
options
|
|
3341
|
+
);
|
|
3342
|
+
return { mutate, webauthnRegisterVerify: mutate, isLoading };
|
|
3343
|
+
}
|
|
3344
|
+
function webauthnAuthOptions(options) {
|
|
3345
|
+
const { mutate, isLoading } = createMutation(
|
|
3346
|
+
async (payload) => Client.mfa.webauthnAuthOptions(payload),
|
|
3347
|
+
options
|
|
3348
|
+
);
|
|
3349
|
+
return { mutate, webauthnAuthOptions: mutate, isLoading };
|
|
3350
|
+
}
|
|
3351
|
+
function webauthnAuthVerify(options) {
|
|
3352
|
+
const { mutate, isLoading } = createMutation(
|
|
3353
|
+
async (payload) => Client.mfa.webauthnAuthVerify(payload),
|
|
3354
|
+
options
|
|
3355
|
+
);
|
|
3356
|
+
return { mutate, webauthnAuthVerify: mutate, isLoading };
|
|
3357
|
+
}
|
|
3358
|
+
function listWebauthnCredentials(options) {
|
|
3359
|
+
const { mutate, isLoading } = createMutation(
|
|
3360
|
+
async (payload) => Client.mfa.listWebauthnCredentials(payload),
|
|
3361
|
+
options
|
|
3362
|
+
);
|
|
3363
|
+
return { mutate, listWebauthnCredentials: mutate, isLoading };
|
|
3364
|
+
}
|
|
3365
|
+
function deleteWebauthnCredential(options) {
|
|
3366
|
+
const { mutate, isLoading } = createMutation(
|
|
3367
|
+
async (payload) => {
|
|
3368
|
+
const { credentialRecordId, portalId } = payload;
|
|
3369
|
+
return Client.mfa.deleteWebauthnCredential(credentialRecordId, { portalId });
|
|
3370
|
+
},
|
|
3371
|
+
options
|
|
3372
|
+
);
|
|
3373
|
+
return { mutate, deleteWebauthnCredential: mutate, isLoading };
|
|
3374
|
+
}
|
|
3375
|
+
function passkeyLoginOptions(options) {
|
|
3376
|
+
const { mutate, isLoading } = createMutation(
|
|
3377
|
+
async (payload) => Client.mfa.passkeyLoginOptions(payload),
|
|
3378
|
+
options
|
|
3379
|
+
);
|
|
3380
|
+
return { mutate, passkeyLoginOptions: mutate, isLoading };
|
|
3381
|
+
}
|
|
3382
|
+
function passkeyLoginVerify(options) {
|
|
3383
|
+
const { mutate, isLoading } = createMutation(
|
|
3384
|
+
async (payload) => {
|
|
3385
|
+
const response = await Client.mfa.passkeyLoginVerify(payload);
|
|
3386
|
+
await applyLoginResponse(response);
|
|
3387
|
+
return response;
|
|
3388
|
+
},
|
|
3389
|
+
options
|
|
3390
|
+
);
|
|
3391
|
+
return { mutate, passkeyLoginVerify: mutate, isLoading };
|
|
3392
|
+
}
|
|
3393
|
+
|
|
3394
|
+
// src/main/apis/security.ts
|
|
3395
|
+
function getSecurityOverview(options) {
|
|
3396
|
+
const { mutate, isLoading } = createMutation(
|
|
3397
|
+
async (payload) => Client.security.getOverview(payload),
|
|
3398
|
+
options
|
|
3399
|
+
);
|
|
3400
|
+
return { mutate, getSecurityOverview: mutate, isLoading };
|
|
3401
|
+
}
|
|
3402
|
+
function getSecurityLoginActivity(options) {
|
|
3403
|
+
const { mutate, isLoading } = createMutation(
|
|
3404
|
+
async (payload) => Client.security.getLoginActivity(payload),
|
|
3405
|
+
options
|
|
3406
|
+
);
|
|
3407
|
+
return { mutate, getSecurityLoginActivity: mutate, isLoading };
|
|
3408
|
+
}
|
|
3409
|
+
function getSecuritySessions(options) {
|
|
3410
|
+
const { mutate, isLoading } = createMutation(
|
|
3411
|
+
async (payload) => Client.security.getSessions(payload),
|
|
3412
|
+
options
|
|
3413
|
+
);
|
|
3414
|
+
return { mutate, getSecuritySessions: mutate, isLoading };
|
|
3415
|
+
}
|
|
3416
|
+
function revokeSecuritySession(options) {
|
|
3417
|
+
const { mutate, isLoading } = createMutation(
|
|
3418
|
+
async (payload) => Client.security.revokeSession(payload),
|
|
3419
|
+
options
|
|
3420
|
+
);
|
|
3421
|
+
return { mutate, revokeSecuritySession: mutate, isLoading };
|
|
3422
|
+
}
|
|
3423
|
+
function revokeOtherSecuritySessions(options) {
|
|
3424
|
+
const { mutate, isLoading } = createMutation(
|
|
3425
|
+
async (payload) => Client.security.revokeOtherSessions(payload?.refreshToken),
|
|
3426
|
+
options
|
|
3427
|
+
);
|
|
3428
|
+
return { mutate, revokeOtherSecuritySessions: mutate, isLoading };
|
|
3429
|
+
}
|
|
3430
|
+
|
|
3431
|
+
// src/main/apis/sso.ts
|
|
3012
3432
|
function getSsoDetails(options) {
|
|
3013
3433
|
const { mutate, isLoading } = createMutation(
|
|
3014
3434
|
async () => {
|
|
@@ -3052,7 +3472,7 @@ function ssoCallback(options) {
|
|
|
3052
3472
|
};
|
|
3053
3473
|
}
|
|
3054
3474
|
|
|
3055
|
-
// src/apis/users.ts
|
|
3475
|
+
// src/main/apis/users.ts
|
|
3056
3476
|
function me(options) {
|
|
3057
3477
|
const { mutate, isLoading } = createMutation(
|
|
3058
3478
|
async () => {
|
|
@@ -3082,6 +3502,20 @@ function profile(options) {
|
|
|
3082
3502
|
isLoading
|
|
3083
3503
|
};
|
|
3084
3504
|
}
|
|
3505
|
+
function profileUpdate(options) {
|
|
3506
|
+
const { mutate, isLoading } = createMutation(
|
|
3507
|
+
async (paylaod) => {
|
|
3508
|
+
const response = await Client.user.profileUpdate(paylaod);
|
|
3509
|
+
return response;
|
|
3510
|
+
},
|
|
3511
|
+
options
|
|
3512
|
+
);
|
|
3513
|
+
return {
|
|
3514
|
+
mutate,
|
|
3515
|
+
profileUpdate: mutate,
|
|
3516
|
+
isLoading
|
|
3517
|
+
};
|
|
3518
|
+
}
|
|
3085
3519
|
function changePassword(options) {
|
|
3086
3520
|
const { mutate, isLoading } = createMutation(
|
|
3087
3521
|
async (payload) => {
|
|
@@ -3097,7 +3531,7 @@ function changePassword(options) {
|
|
|
3097
3531
|
};
|
|
3098
3532
|
}
|
|
3099
3533
|
|
|
3100
|
-
// src/apis/pipeline.ts
|
|
3534
|
+
// src/main/apis/pipeline.ts
|
|
3101
3535
|
function list(options) {
|
|
3102
3536
|
const {
|
|
3103
3537
|
getTableParam
|
|
@@ -3117,7 +3551,7 @@ function list(options) {
|
|
|
3117
3551
|
};
|
|
3118
3552
|
}
|
|
3119
3553
|
|
|
3120
|
-
// src/apis/stage.ts
|
|
3554
|
+
// src/main/apis/stage.ts
|
|
3121
3555
|
function list2(options) {
|
|
3122
3556
|
const { mutate, isLoading } = createMutation(
|
|
3123
3557
|
async (payload) => {
|
|
@@ -3133,7 +3567,7 @@ function list2(options) {
|
|
|
3133
3567
|
};
|
|
3134
3568
|
}
|
|
3135
3569
|
|
|
3136
|
-
// src/store2/use-multi-object.ts
|
|
3570
|
+
// src/main/store2/use-multi-object.ts
|
|
3137
3571
|
var multiObjectStore = createStore({
|
|
3138
3572
|
objects: {},
|
|
3139
3573
|
objectsPrependData: {},
|
|
@@ -3228,7 +3662,7 @@ var actions9 = {
|
|
|
3228
3662
|
}
|
|
3229
3663
|
};
|
|
3230
3664
|
|
|
3231
|
-
// src/apis/object.ts
|
|
3665
|
+
// src/main/apis/object.ts
|
|
3232
3666
|
function list3(options) {
|
|
3233
3667
|
const { getTableParam } = useTable();
|
|
3234
3668
|
const { setObjectsData, setTableData } = actions3;
|
|
@@ -3371,7 +3805,7 @@ function update(options) {
|
|
|
3371
3805
|
};
|
|
3372
3806
|
}
|
|
3373
3807
|
|
|
3374
|
-
// src/apis/note.ts
|
|
3808
|
+
// src/main/apis/note.ts
|
|
3375
3809
|
function list4(options) {
|
|
3376
3810
|
const { setNotes } = actions5;
|
|
3377
3811
|
const { mutate, isLoading } = createMutation(
|
|
@@ -3421,7 +3855,7 @@ function update2(options) {
|
|
|
3421
3855
|
};
|
|
3422
3856
|
}
|
|
3423
3857
|
|
|
3424
|
-
// src/apis/email.ts
|
|
3858
|
+
// src/main/apis/email.ts
|
|
3425
3859
|
function list5(options) {
|
|
3426
3860
|
const { setEmails } = actions6;
|
|
3427
3861
|
const { mutate, isLoading } = createMutation(
|
|
@@ -3471,7 +3905,7 @@ function update3(options) {
|
|
|
3471
3905
|
};
|
|
3472
3906
|
}
|
|
3473
3907
|
|
|
3474
|
-
// src/apis/uploader.ts
|
|
3908
|
+
// src/main/apis/uploader.ts
|
|
3475
3909
|
function imageUpload(options) {
|
|
3476
3910
|
const { mutate, isLoading } = createMutation(
|
|
3477
3911
|
async (payload) => {
|
|
@@ -3502,7 +3936,7 @@ function attachmentUpload(options) {
|
|
|
3502
3936
|
};
|
|
3503
3937
|
}
|
|
3504
3938
|
|
|
3505
|
-
// src/apis/file.ts
|
|
3939
|
+
// src/main/apis/file.ts
|
|
3506
3940
|
function list6(options) {
|
|
3507
3941
|
const { mutate, isLoading } = createMutation(
|
|
3508
3942
|
async (payload) => {
|
|
@@ -3574,7 +4008,7 @@ function download(options) {
|
|
|
3574
4008
|
};
|
|
3575
4009
|
}
|
|
3576
4010
|
|
|
3577
|
-
// src/apis/cache.ts
|
|
4011
|
+
// src/main/apis/cache.ts
|
|
3578
4012
|
function purge(options) {
|
|
3579
4013
|
const { mutate, isLoading } = createMutation(
|
|
3580
4014
|
async (payload) => {
|
|
@@ -3600,7 +4034,7 @@ function purgeStatus(purgeJobId, options) {
|
|
|
3600
4034
|
};
|
|
3601
4035
|
}
|
|
3602
4036
|
|
|
3603
|
-
// src/breadcrumb/breadcrumbs.ts
|
|
4037
|
+
// src/main/breadcrumb/breadcrumbs.ts
|
|
3604
4038
|
var getBreadcrumbs = () => {
|
|
3605
4039
|
const search = getParam("b");
|
|
3606
4040
|
let breadcrumbs = decodeToBase64(search) || [];
|
|
@@ -3691,7 +4125,7 @@ var nameTrancate = (name) => {
|
|
|
3691
4125
|
return name?.length > 30 ? `${name?.slice(0, 30) + "..."}` : name;
|
|
3692
4126
|
};
|
|
3693
4127
|
|
|
3694
|
-
// src/breadcrumb/generate-url.ts
|
|
4128
|
+
// src/main/breadcrumb/generate-url.ts
|
|
3695
4129
|
var useMakeLink = () => {
|
|
3696
4130
|
const search = getParam("b");
|
|
3697
4131
|
const makeLink = (props) => {
|
|
@@ -3806,7 +4240,7 @@ var buildChildRoute = (props, breadcrumbItems) => {
|
|
|
3806
4240
|
return generateUrl(props, breadcrumbs);
|
|
3807
4241
|
};
|
|
3808
4242
|
|
|
3809
|
-
// src/utils/datetime.ts
|
|
4243
|
+
// src/main/utils/datetime.ts
|
|
3810
4244
|
var DEFAULT_HUBSPOT_TIMEZONE = "Asia/Kolkata";
|
|
3811
4245
|
function getCurrentTimeZone() {
|
|
3812
4246
|
try {
|
|
@@ -3866,10 +4300,11 @@ function formatHubSpotActivityDateTime(timestamp, timeZone = getCurrentTimeZone(
|
|
|
3866
4300
|
return formatHubSpotActivityDateTimeParts(timestamp, timeZone)?.formatted ?? "";
|
|
3867
4301
|
}
|
|
3868
4302
|
|
|
3869
|
-
// src/index.ts
|
|
4303
|
+
// src/main/index.ts
|
|
3870
4304
|
var api = {
|
|
3871
4305
|
preLogin,
|
|
3872
4306
|
login,
|
|
4307
|
+
verifyOtp,
|
|
3873
4308
|
verifyEmail,
|
|
3874
4309
|
resetPasswordVerifyToken,
|
|
3875
4310
|
resetPassword,
|
|
@@ -3883,7 +4318,31 @@ var api = {
|
|
|
3883
4318
|
logout,
|
|
3884
4319
|
me,
|
|
3885
4320
|
profile,
|
|
4321
|
+
profileUpdate,
|
|
3886
4322
|
changePassword,
|
|
4323
|
+
sendMfaOtp,
|
|
4324
|
+
pendingPasskeyOptions,
|
|
4325
|
+
pendingPasskeyVerify,
|
|
4326
|
+
getMfaStatus,
|
|
4327
|
+
setMfaPreferences,
|
|
4328
|
+
startPhoneVerify,
|
|
4329
|
+
confirmPhoneVerify,
|
|
4330
|
+
totpEnrollStart,
|
|
4331
|
+
totpEnrollVerify,
|
|
4332
|
+
totpDisable,
|
|
4333
|
+
webauthnRegisterOptions,
|
|
4334
|
+
webauthnRegisterVerify,
|
|
4335
|
+
webauthnAuthOptions,
|
|
4336
|
+
webauthnAuthVerify,
|
|
4337
|
+
listWebauthnCredentials,
|
|
4338
|
+
deleteWebauthnCredential,
|
|
4339
|
+
passkeyLoginOptions,
|
|
4340
|
+
passkeyLoginVerify,
|
|
4341
|
+
getSecurityOverview,
|
|
4342
|
+
getSecurityLoginActivity,
|
|
4343
|
+
getSecuritySessions,
|
|
4344
|
+
revokeSecuritySession,
|
|
4345
|
+
revokeOtherSecuritySessions,
|
|
3887
4346
|
pipelines: list,
|
|
3888
4347
|
stages: list2,
|
|
3889
4348
|
objects: list3,
|
|
@@ -3936,5 +4395,5 @@ var routeParam = {
|
|
|
3936
4395
|
};
|
|
3937
4396
|
|
|
3938
4397
|
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 };
|
|
3939
|
-
//# sourceMappingURL=chunk-
|
|
3940
|
-
//# sourceMappingURL=chunk-
|
|
4398
|
+
//# sourceMappingURL=chunk-FBCBJGCE.js.map
|
|
4399
|
+
//# sourceMappingURL=chunk-FBCBJGCE.js.map
|