@blazeo.com/calendar-client 1.0.57 → 1.0.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +39 -4
- package/dist/index.js +73 -25
- package/dist/index.mjs +72 -25
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -352,8 +352,22 @@ export type ActivityLogSnapshot = {
|
|
|
352
352
|
isPartialData?: boolean;
|
|
353
353
|
userEmail?: string;
|
|
354
354
|
createdOn?: string | null;
|
|
355
|
-
|
|
356
|
-
|
|
355
|
+
appointmentId?: number | null;
|
|
356
|
+
title?: string;
|
|
357
|
+
startDate?: string | null;
|
|
358
|
+
endDate?: string | null;
|
|
359
|
+
timeZone?: string;
|
|
360
|
+
source?: string;
|
|
361
|
+
meetingWith?: string;
|
|
362
|
+
handledBy?: string;
|
|
363
|
+
location?: string;
|
|
364
|
+
summary?: string;
|
|
365
|
+
transcript?: string;
|
|
366
|
+
userDefinedFields?: Record<string, unknown> | null;
|
|
367
|
+
newStartDate?: string | null;
|
|
368
|
+
newEndDate?: string | null;
|
|
369
|
+
oldStartDate?: string | null;
|
|
370
|
+
oldEndDate?: string | null;
|
|
357
371
|
};
|
|
358
372
|
|
|
359
373
|
export const ActivityLogModel: {
|
|
@@ -509,6 +523,21 @@ export const LeadModel: {
|
|
|
509
523
|
create(snapshot?: object, options?: { env?: object }): unknown;
|
|
510
524
|
};
|
|
511
525
|
|
|
526
|
+
export const AuthorizationSource: {
|
|
527
|
+
None: 0;
|
|
528
|
+
Direct: 1;
|
|
529
|
+
Email: 2;
|
|
530
|
+
};
|
|
531
|
+
|
|
532
|
+
export type ParticipantCredentialsData = {
|
|
533
|
+
participantCredentialId?: string;
|
|
534
|
+
participantId: string;
|
|
535
|
+
email?: string;
|
|
536
|
+
authorizedByParticipantId?: string | null;
|
|
537
|
+
authorizationSource?: number | null;
|
|
538
|
+
authorizedOn?: string | null;
|
|
539
|
+
};
|
|
540
|
+
|
|
512
541
|
export type CalendarProviderOption = {
|
|
513
542
|
emailProvider: number;
|
|
514
543
|
key: string;
|
|
@@ -558,8 +587,14 @@ export type ParticipantData = {
|
|
|
558
587
|
createdOn?: string | null;
|
|
559
588
|
modifiedOn?: string | null;
|
|
560
589
|
isDeleted?: boolean;
|
|
561
|
-
/** Last stored authorization error
|
|
590
|
+
/** Last stored authorization error from ParticipantCredentials. */
|
|
562
591
|
authorizationError?: string;
|
|
592
|
+
/** Participant who initiated calendar authorization (in-app flow). */
|
|
593
|
+
authorizedByParticipantId?: string | null;
|
|
594
|
+
/** 1 = Direct, 2 = Email — from ParticipantCredentials. */
|
|
595
|
+
authorizationSource?: number | null;
|
|
596
|
+
/** When calendar OAuth last completed successfully. */
|
|
597
|
+
authorizedOn?: string | null;
|
|
563
598
|
};
|
|
564
599
|
|
|
565
600
|
export const CALENDAR_AUTH_MESSAGE_TYPE: 'calendar-authorization';
|
|
@@ -581,7 +616,7 @@ export const AuthModel: {
|
|
|
581
616
|
getAuthorizationUrl(
|
|
582
617
|
participantId: string,
|
|
583
618
|
emailProvider: string | number,
|
|
584
|
-
opts?: { host?: string }
|
|
619
|
+
opts?: { host?: string; authorizedByParticipantId?: string }
|
|
585
620
|
): Promise<{
|
|
586
621
|
status: string;
|
|
587
622
|
data?: ParticipantAuthorizationUrl;
|
package/dist/index.js
CHANGED
|
@@ -26,6 +26,7 @@ __export(index_exports, {
|
|
|
26
26
|
AssignmentMethod: () => AssignmentMethod,
|
|
27
27
|
AttendeeStatus: () => AttendeeStatus,
|
|
28
28
|
AuthModel: () => Auth_default,
|
|
29
|
+
AuthorizationSource: () => AuthorizationSource,
|
|
29
30
|
AvailabilityDetailModel: () => AvailabilityDetail_default,
|
|
30
31
|
AvailabilityModel: () => Availability_default,
|
|
31
32
|
CALENDAR_AUTH_MESSAGE_TYPE: () => CALENDAR_AUTH_MESSAGE_TYPE,
|
|
@@ -376,6 +377,11 @@ var EmailProvider = {
|
|
|
376
377
|
Microsoft: 2,
|
|
377
378
|
Default: 3
|
|
378
379
|
};
|
|
380
|
+
var AuthorizationSource = {
|
|
381
|
+
None: 0,
|
|
382
|
+
Direct: 1,
|
|
383
|
+
Email: 2
|
|
384
|
+
};
|
|
379
385
|
var LocationType = {
|
|
380
386
|
Physical: 0,
|
|
381
387
|
Video: 1,
|
|
@@ -1566,7 +1572,11 @@ var ParticipantModel = import_mobx_state_tree11.types.model("Participant", {
|
|
|
1566
1572
|
provider: import_mobx_state_tree11.types.optional(import_mobx_state_tree11.types.number, 0),
|
|
1567
1573
|
createdOn: import_mobx_state_tree11.types.optional(import_mobx_state_tree11.types.maybeNull(import_mobx_state_tree11.types.string), null),
|
|
1568
1574
|
modifiedOn: import_mobx_state_tree11.types.optional(import_mobx_state_tree11.types.maybeNull(import_mobx_state_tree11.types.string), null),
|
|
1569
|
-
isDeleted: import_mobx_state_tree11.types.optional(import_mobx_state_tree11.types.boolean, false)
|
|
1575
|
+
isDeleted: import_mobx_state_tree11.types.optional(import_mobx_state_tree11.types.boolean, false),
|
|
1576
|
+
authorizationError: import_mobx_state_tree11.types.optional(import_mobx_state_tree11.types.string, ""),
|
|
1577
|
+
authorizedByParticipantId: import_mobx_state_tree11.types.optional(import_mobx_state_tree11.types.maybeNull(import_mobx_state_tree11.types.string), null),
|
|
1578
|
+
authorizationSource: import_mobx_state_tree11.types.optional(import_mobx_state_tree11.types.maybeNull(import_mobx_state_tree11.types.number), null),
|
|
1579
|
+
authorizedOn: import_mobx_state_tree11.types.optional(import_mobx_state_tree11.types.maybeNull(import_mobx_state_tree11.types.string), null)
|
|
1570
1580
|
}).actions((self) => {
|
|
1571
1581
|
const { reqGet, reqPost } = createRequestHelpers(self, import_mobx_state_tree11.getEnv);
|
|
1572
1582
|
return {
|
|
@@ -1660,7 +1670,20 @@ function mapParticipantFromApi(d) {
|
|
|
1660
1670
|
createdOn: pick2("createdOn", "CreatedOn", "created_on") ?? null,
|
|
1661
1671
|
modifiedOn: pick2("modifiedOn", "ModifiedOn", "modified_on") ?? null,
|
|
1662
1672
|
isDeleted: Boolean(pick2("isDeleted", "IsDeleted", "is_deleted")),
|
|
1663
|
-
authorizationError: pick2("authorizationError", "AuthorizationError", "authorization_error") ?? ""
|
|
1673
|
+
authorizationError: pick2("authorizationError", "AuthorizationError", "authorization_error") ?? "",
|
|
1674
|
+
authorizedByParticipantId: (() => {
|
|
1675
|
+
const v = pick2(
|
|
1676
|
+
"authorizedByParticipantId",
|
|
1677
|
+
"AuthorizedByParticipantId",
|
|
1678
|
+
"authorized_by_participant_id"
|
|
1679
|
+
);
|
|
1680
|
+
return v != null && v !== "" ? String(v) : null;
|
|
1681
|
+
})(),
|
|
1682
|
+
authorizationSource: (() => {
|
|
1683
|
+
const v = pick2("authorizationSource", "AuthorizationSource", "authorization_source");
|
|
1684
|
+
return v != null && v !== "" ? Number(v) : null;
|
|
1685
|
+
})(),
|
|
1686
|
+
authorizedOn: pick2("authorizedOn", "AuthorizedOn", "authorized_on") ?? null
|
|
1664
1687
|
};
|
|
1665
1688
|
}
|
|
1666
1689
|
function mapFromApi2(d) {
|
|
@@ -2991,23 +3014,20 @@ var Lead_default = LeadModel;
|
|
|
2991
3014
|
|
|
2992
3015
|
// src/models/appointment/ActivityLog.js
|
|
2993
3016
|
var import_mobx_state_tree21 = require("mobx-state-tree");
|
|
2994
|
-
var ActivityLogDetailModel = import_mobx_state_tree21.types.model("ActivityLogDetail", {
|
|
2995
|
-
key: import_mobx_state_tree21.types.optional(import_mobx_state_tree21.types.string, ""),
|
|
2996
|
-
value: import_mobx_state_tree21.types.optional(import_mobx_state_tree21.types.string, "")
|
|
2997
|
-
});
|
|
2998
3017
|
function mapActivityLogFromApi(d) {
|
|
2999
3018
|
if (!d) return d;
|
|
3000
3019
|
const pick2 = (...keys) => keys.reduce((v, k) => v ?? d[k], void 0);
|
|
3001
|
-
const
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
}))
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3020
|
+
const userDefinedFieldsRaw = pick2("userDefinedFields", "UserDefinedFields");
|
|
3021
|
+
let userDefinedFields = null;
|
|
3022
|
+
if (userDefinedFieldsRaw && typeof userDefinedFieldsRaw === "object" && !Array.isArray(userDefinedFieldsRaw)) {
|
|
3023
|
+
userDefinedFields = { ...userDefinedFieldsRaw };
|
|
3024
|
+
} else if (typeof userDefinedFieldsRaw === "string" && userDefinedFieldsRaw.trim()) {
|
|
3025
|
+
try {
|
|
3026
|
+
userDefinedFields = JSON.parse(userDefinedFieldsRaw);
|
|
3027
|
+
} catch {
|
|
3028
|
+
userDefinedFields = null;
|
|
3029
|
+
}
|
|
3030
|
+
}
|
|
3011
3031
|
return {
|
|
3012
3032
|
id: pick2("id", "Id") ?? null,
|
|
3013
3033
|
activityLogId: pick2("activityLogId", "ActivityLogId", "activity_log_id") ?? "new",
|
|
@@ -3020,14 +3040,24 @@ function mapActivityLogFromApi(d) {
|
|
|
3020
3040
|
isPartialData: pick2("isPartialData", "IsPartialData", "is_partial_data") ?? false,
|
|
3021
3041
|
userEmail: pick2("userEmail", "UserEmail", "user_email") ?? "",
|
|
3022
3042
|
createdOn: pick2("createdOn", "CreatedOn", "created_on") ?? null,
|
|
3023
|
-
|
|
3024
|
-
|
|
3043
|
+
appointmentId: pick2("appointmentId", "AppointmentId", "appointment_id") ?? null,
|
|
3044
|
+
title: pick2("title", "Title") ?? "",
|
|
3045
|
+
startDate: pick2("startDate", "StartDate", "start_date") ?? null,
|
|
3046
|
+
endDate: pick2("endDate", "EndDate", "end_date") ?? null,
|
|
3047
|
+
timeZone: pick2("timeZone", "TimeZone", "time_zone") ?? "",
|
|
3048
|
+
source: pick2("source", "Source") ?? "",
|
|
3049
|
+
meetingWith: pick2("meetingWith", "MeetingWith", "meeting_with") ?? "",
|
|
3050
|
+
handledBy: pick2("handledBy", "HandledBy", "handled_by") ?? "",
|
|
3051
|
+
location: pick2("location", "Location") ?? "",
|
|
3052
|
+
summary: pick2("summary", "Summary") ?? "",
|
|
3053
|
+
transcript: pick2("transcript", "Transcript") ?? "",
|
|
3054
|
+
userDefinedFields,
|
|
3055
|
+
newStartDate: pick2("newStartDate", "NewStartDate", "new_start_date") ?? null,
|
|
3056
|
+
newEndDate: pick2("newEndDate", "NewEndDate", "new_end_date") ?? null,
|
|
3057
|
+
oldStartDate: pick2("oldStartDate", "OldStartDate", "old_start_date") ?? null,
|
|
3058
|
+
oldEndDate: pick2("oldEndDate", "OldEndDate", "old_end_date") ?? null
|
|
3025
3059
|
};
|
|
3026
3060
|
}
|
|
3027
|
-
function pickDetail(row, ...keys) {
|
|
3028
|
-
if (!row) return void 0;
|
|
3029
|
-
return keys.reduce((v, k) => v ?? row[k], void 0);
|
|
3030
|
-
}
|
|
3031
3061
|
function normalizeActivityTypeIds(raw) {
|
|
3032
3062
|
if (raw == null) return null;
|
|
3033
3063
|
const values = Array.isArray(raw) ? raw : [raw];
|
|
@@ -3109,8 +3139,22 @@ var ActivityLogModel = import_mobx_state_tree21.types.model("ActivityLog", {
|
|
|
3109
3139
|
isPartialData: import_mobx_state_tree21.types.optional(import_mobx_state_tree21.types.boolean, false),
|
|
3110
3140
|
userEmail: import_mobx_state_tree21.types.optional(import_mobx_state_tree21.types.string, ""),
|
|
3111
3141
|
createdOn: import_mobx_state_tree21.types.optional(import_mobx_state_tree21.types.maybeNull(import_mobx_state_tree21.types.string), null),
|
|
3112
|
-
|
|
3113
|
-
|
|
3142
|
+
appointmentId: import_mobx_state_tree21.types.optional(import_mobx_state_tree21.types.maybeNull(import_mobx_state_tree21.types.number), null),
|
|
3143
|
+
title: import_mobx_state_tree21.types.optional(import_mobx_state_tree21.types.string, ""),
|
|
3144
|
+
startDate: import_mobx_state_tree21.types.optional(import_mobx_state_tree21.types.maybeNull(import_mobx_state_tree21.types.string), null),
|
|
3145
|
+
endDate: import_mobx_state_tree21.types.optional(import_mobx_state_tree21.types.maybeNull(import_mobx_state_tree21.types.string), null),
|
|
3146
|
+
timeZone: import_mobx_state_tree21.types.optional(import_mobx_state_tree21.types.string, ""),
|
|
3147
|
+
source: import_mobx_state_tree21.types.optional(import_mobx_state_tree21.types.string, ""),
|
|
3148
|
+
meetingWith: import_mobx_state_tree21.types.optional(import_mobx_state_tree21.types.string, ""),
|
|
3149
|
+
handledBy: import_mobx_state_tree21.types.optional(import_mobx_state_tree21.types.string, ""),
|
|
3150
|
+
location: import_mobx_state_tree21.types.optional(import_mobx_state_tree21.types.string, ""),
|
|
3151
|
+
summary: import_mobx_state_tree21.types.optional(import_mobx_state_tree21.types.string, ""),
|
|
3152
|
+
transcript: import_mobx_state_tree21.types.optional(import_mobx_state_tree21.types.string, ""),
|
|
3153
|
+
userDefinedFields: import_mobx_state_tree21.types.optional(import_mobx_state_tree21.types.frozen(), null),
|
|
3154
|
+
newStartDate: import_mobx_state_tree21.types.optional(import_mobx_state_tree21.types.maybeNull(import_mobx_state_tree21.types.string), null),
|
|
3155
|
+
newEndDate: import_mobx_state_tree21.types.optional(import_mobx_state_tree21.types.maybeNull(import_mobx_state_tree21.types.string), null),
|
|
3156
|
+
oldStartDate: import_mobx_state_tree21.types.optional(import_mobx_state_tree21.types.maybeNull(import_mobx_state_tree21.types.string), null),
|
|
3157
|
+
oldEndDate: import_mobx_state_tree21.types.optional(import_mobx_state_tree21.types.maybeNull(import_mobx_state_tree21.types.string), null)
|
|
3114
3158
|
}).actions((self) => ({
|
|
3115
3159
|
/** GET /activitylog/get – pass companyKey in opts (required). */
|
|
3116
3160
|
async get(opts = {}) {
|
|
@@ -3386,7 +3430,7 @@ var AuthModel = {
|
|
|
3386
3430
|
* GET Auth/AuthorizationUrl — OAuth URL to open in a popup when user picks a provider.
|
|
3387
3431
|
* @param {string} participantId
|
|
3388
3432
|
* @param {string|number} emailProvider — google, gmail, 1, outlook, microsoft, 2
|
|
3389
|
-
* @param {{ host?: string }} [opts]
|
|
3433
|
+
* @param {{ host?: string, authorizedByParticipantId?: string }} [opts]
|
|
3390
3434
|
* @returns {Promise<{ status: string, data?: object, message?: string }>}
|
|
3391
3435
|
*/
|
|
3392
3436
|
async getAuthorizationUrl(participantId, emailProvider, opts = {}) {
|
|
@@ -3396,6 +3440,9 @@ var AuthModel = {
|
|
|
3396
3440
|
email_provider: String(emailProvider)
|
|
3397
3441
|
};
|
|
3398
3442
|
if (opts.host) q.host = opts.host;
|
|
3443
|
+
if (opts.authorizedByParticipantId) {
|
|
3444
|
+
q.authorized_by_participant_id = String(opts.authorizedByParticipantId);
|
|
3445
|
+
}
|
|
3399
3446
|
const res = await reqGet("/Auth/AuthorizationUrl", q);
|
|
3400
3447
|
if (res.status === "success" && res.data) {
|
|
3401
3448
|
res.data = mapAuthorizationUrlFromApi(res.data);
|
|
@@ -3510,6 +3557,7 @@ function createRootStore(initialState = {}) {
|
|
|
3510
3557
|
AssignmentMethod,
|
|
3511
3558
|
AttendeeStatus,
|
|
3512
3559
|
AuthModel,
|
|
3560
|
+
AuthorizationSource,
|
|
3513
3561
|
AvailabilityDetailModel,
|
|
3514
3562
|
AvailabilityModel,
|
|
3515
3563
|
CALENDAR_AUTH_MESSAGE_TYPE,
|
package/dist/index.mjs
CHANGED
|
@@ -298,6 +298,11 @@ var EmailProvider = {
|
|
|
298
298
|
Microsoft: 2,
|
|
299
299
|
Default: 3
|
|
300
300
|
};
|
|
301
|
+
var AuthorizationSource = {
|
|
302
|
+
None: 0,
|
|
303
|
+
Direct: 1,
|
|
304
|
+
Email: 2
|
|
305
|
+
};
|
|
301
306
|
var LocationType = {
|
|
302
307
|
Physical: 0,
|
|
303
308
|
Video: 1,
|
|
@@ -1488,7 +1493,11 @@ var ParticipantModel = types11.model("Participant", {
|
|
|
1488
1493
|
provider: types11.optional(types11.number, 0),
|
|
1489
1494
|
createdOn: types11.optional(types11.maybeNull(types11.string), null),
|
|
1490
1495
|
modifiedOn: types11.optional(types11.maybeNull(types11.string), null),
|
|
1491
|
-
isDeleted: types11.optional(types11.boolean, false)
|
|
1496
|
+
isDeleted: types11.optional(types11.boolean, false),
|
|
1497
|
+
authorizationError: types11.optional(types11.string, ""),
|
|
1498
|
+
authorizedByParticipantId: types11.optional(types11.maybeNull(types11.string), null),
|
|
1499
|
+
authorizationSource: types11.optional(types11.maybeNull(types11.number), null),
|
|
1500
|
+
authorizedOn: types11.optional(types11.maybeNull(types11.string), null)
|
|
1492
1501
|
}).actions((self) => {
|
|
1493
1502
|
const { reqGet, reqPost } = createRequestHelpers(self, getEnv3);
|
|
1494
1503
|
return {
|
|
@@ -1582,7 +1591,20 @@ function mapParticipantFromApi(d) {
|
|
|
1582
1591
|
createdOn: pick2("createdOn", "CreatedOn", "created_on") ?? null,
|
|
1583
1592
|
modifiedOn: pick2("modifiedOn", "ModifiedOn", "modified_on") ?? null,
|
|
1584
1593
|
isDeleted: Boolean(pick2("isDeleted", "IsDeleted", "is_deleted")),
|
|
1585
|
-
authorizationError: pick2("authorizationError", "AuthorizationError", "authorization_error") ?? ""
|
|
1594
|
+
authorizationError: pick2("authorizationError", "AuthorizationError", "authorization_error") ?? "",
|
|
1595
|
+
authorizedByParticipantId: (() => {
|
|
1596
|
+
const v = pick2(
|
|
1597
|
+
"authorizedByParticipantId",
|
|
1598
|
+
"AuthorizedByParticipantId",
|
|
1599
|
+
"authorized_by_participant_id"
|
|
1600
|
+
);
|
|
1601
|
+
return v != null && v !== "" ? String(v) : null;
|
|
1602
|
+
})(),
|
|
1603
|
+
authorizationSource: (() => {
|
|
1604
|
+
const v = pick2("authorizationSource", "AuthorizationSource", "authorization_source");
|
|
1605
|
+
return v != null && v !== "" ? Number(v) : null;
|
|
1606
|
+
})(),
|
|
1607
|
+
authorizedOn: pick2("authorizedOn", "AuthorizedOn", "authorized_on") ?? null
|
|
1586
1608
|
};
|
|
1587
1609
|
}
|
|
1588
1610
|
function mapFromApi2(d) {
|
|
@@ -2913,23 +2935,20 @@ var Lead_default = LeadModel;
|
|
|
2913
2935
|
|
|
2914
2936
|
// src/models/appointment/ActivityLog.js
|
|
2915
2937
|
import { types as types21 } from "mobx-state-tree";
|
|
2916
|
-
var ActivityLogDetailModel = types21.model("ActivityLogDetail", {
|
|
2917
|
-
key: types21.optional(types21.string, ""),
|
|
2918
|
-
value: types21.optional(types21.string, "")
|
|
2919
|
-
});
|
|
2920
2938
|
function mapActivityLogFromApi(d) {
|
|
2921
2939
|
if (!d) return d;
|
|
2922
2940
|
const pick2 = (...keys) => keys.reduce((v, k) => v ?? d[k], void 0);
|
|
2923
|
-
const
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
}))
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2941
|
+
const userDefinedFieldsRaw = pick2("userDefinedFields", "UserDefinedFields");
|
|
2942
|
+
let userDefinedFields = null;
|
|
2943
|
+
if (userDefinedFieldsRaw && typeof userDefinedFieldsRaw === "object" && !Array.isArray(userDefinedFieldsRaw)) {
|
|
2944
|
+
userDefinedFields = { ...userDefinedFieldsRaw };
|
|
2945
|
+
} else if (typeof userDefinedFieldsRaw === "string" && userDefinedFieldsRaw.trim()) {
|
|
2946
|
+
try {
|
|
2947
|
+
userDefinedFields = JSON.parse(userDefinedFieldsRaw);
|
|
2948
|
+
} catch {
|
|
2949
|
+
userDefinedFields = null;
|
|
2950
|
+
}
|
|
2951
|
+
}
|
|
2933
2952
|
return {
|
|
2934
2953
|
id: pick2("id", "Id") ?? null,
|
|
2935
2954
|
activityLogId: pick2("activityLogId", "ActivityLogId", "activity_log_id") ?? "new",
|
|
@@ -2942,14 +2961,24 @@ function mapActivityLogFromApi(d) {
|
|
|
2942
2961
|
isPartialData: pick2("isPartialData", "IsPartialData", "is_partial_data") ?? false,
|
|
2943
2962
|
userEmail: pick2("userEmail", "UserEmail", "user_email") ?? "",
|
|
2944
2963
|
createdOn: pick2("createdOn", "CreatedOn", "created_on") ?? null,
|
|
2945
|
-
|
|
2946
|
-
|
|
2964
|
+
appointmentId: pick2("appointmentId", "AppointmentId", "appointment_id") ?? null,
|
|
2965
|
+
title: pick2("title", "Title") ?? "",
|
|
2966
|
+
startDate: pick2("startDate", "StartDate", "start_date") ?? null,
|
|
2967
|
+
endDate: pick2("endDate", "EndDate", "end_date") ?? null,
|
|
2968
|
+
timeZone: pick2("timeZone", "TimeZone", "time_zone") ?? "",
|
|
2969
|
+
source: pick2("source", "Source") ?? "",
|
|
2970
|
+
meetingWith: pick2("meetingWith", "MeetingWith", "meeting_with") ?? "",
|
|
2971
|
+
handledBy: pick2("handledBy", "HandledBy", "handled_by") ?? "",
|
|
2972
|
+
location: pick2("location", "Location") ?? "",
|
|
2973
|
+
summary: pick2("summary", "Summary") ?? "",
|
|
2974
|
+
transcript: pick2("transcript", "Transcript") ?? "",
|
|
2975
|
+
userDefinedFields,
|
|
2976
|
+
newStartDate: pick2("newStartDate", "NewStartDate", "new_start_date") ?? null,
|
|
2977
|
+
newEndDate: pick2("newEndDate", "NewEndDate", "new_end_date") ?? null,
|
|
2978
|
+
oldStartDate: pick2("oldStartDate", "OldStartDate", "old_start_date") ?? null,
|
|
2979
|
+
oldEndDate: pick2("oldEndDate", "OldEndDate", "old_end_date") ?? null
|
|
2947
2980
|
};
|
|
2948
2981
|
}
|
|
2949
|
-
function pickDetail(row, ...keys) {
|
|
2950
|
-
if (!row) return void 0;
|
|
2951
|
-
return keys.reduce((v, k) => v ?? row[k], void 0);
|
|
2952
|
-
}
|
|
2953
2982
|
function normalizeActivityTypeIds(raw) {
|
|
2954
2983
|
if (raw == null) return null;
|
|
2955
2984
|
const values = Array.isArray(raw) ? raw : [raw];
|
|
@@ -3031,8 +3060,22 @@ var ActivityLogModel = types21.model("ActivityLog", {
|
|
|
3031
3060
|
isPartialData: types21.optional(types21.boolean, false),
|
|
3032
3061
|
userEmail: types21.optional(types21.string, ""),
|
|
3033
3062
|
createdOn: types21.optional(types21.maybeNull(types21.string), null),
|
|
3034
|
-
|
|
3035
|
-
|
|
3063
|
+
appointmentId: types21.optional(types21.maybeNull(types21.number), null),
|
|
3064
|
+
title: types21.optional(types21.string, ""),
|
|
3065
|
+
startDate: types21.optional(types21.maybeNull(types21.string), null),
|
|
3066
|
+
endDate: types21.optional(types21.maybeNull(types21.string), null),
|
|
3067
|
+
timeZone: types21.optional(types21.string, ""),
|
|
3068
|
+
source: types21.optional(types21.string, ""),
|
|
3069
|
+
meetingWith: types21.optional(types21.string, ""),
|
|
3070
|
+
handledBy: types21.optional(types21.string, ""),
|
|
3071
|
+
location: types21.optional(types21.string, ""),
|
|
3072
|
+
summary: types21.optional(types21.string, ""),
|
|
3073
|
+
transcript: types21.optional(types21.string, ""),
|
|
3074
|
+
userDefinedFields: types21.optional(types21.frozen(), null),
|
|
3075
|
+
newStartDate: types21.optional(types21.maybeNull(types21.string), null),
|
|
3076
|
+
newEndDate: types21.optional(types21.maybeNull(types21.string), null),
|
|
3077
|
+
oldStartDate: types21.optional(types21.maybeNull(types21.string), null),
|
|
3078
|
+
oldEndDate: types21.optional(types21.maybeNull(types21.string), null)
|
|
3036
3079
|
}).actions((self) => ({
|
|
3037
3080
|
/** GET /activitylog/get – pass companyKey in opts (required). */
|
|
3038
3081
|
async get(opts = {}) {
|
|
@@ -3308,7 +3351,7 @@ var AuthModel = {
|
|
|
3308
3351
|
* GET Auth/AuthorizationUrl — OAuth URL to open in a popup when user picks a provider.
|
|
3309
3352
|
* @param {string} participantId
|
|
3310
3353
|
* @param {string|number} emailProvider — google, gmail, 1, outlook, microsoft, 2
|
|
3311
|
-
* @param {{ host?: string }} [opts]
|
|
3354
|
+
* @param {{ host?: string, authorizedByParticipantId?: string }} [opts]
|
|
3312
3355
|
* @returns {Promise<{ status: string, data?: object, message?: string }>}
|
|
3313
3356
|
*/
|
|
3314
3357
|
async getAuthorizationUrl(participantId, emailProvider, opts = {}) {
|
|
@@ -3318,6 +3361,9 @@ var AuthModel = {
|
|
|
3318
3361
|
email_provider: String(emailProvider)
|
|
3319
3362
|
};
|
|
3320
3363
|
if (opts.host) q.host = opts.host;
|
|
3364
|
+
if (opts.authorizedByParticipantId) {
|
|
3365
|
+
q.authorized_by_participant_id = String(opts.authorizedByParticipantId);
|
|
3366
|
+
}
|
|
3321
3367
|
const res = await reqGet("/Auth/AuthorizationUrl", q);
|
|
3322
3368
|
if (res.status === "success" && res.data) {
|
|
3323
3369
|
res.data = mapAuthorizationUrlFromApi(res.data);
|
|
@@ -3431,6 +3477,7 @@ export {
|
|
|
3431
3477
|
AssignmentMethod,
|
|
3432
3478
|
AttendeeStatus,
|
|
3433
3479
|
Auth_default as AuthModel,
|
|
3480
|
+
AuthorizationSource,
|
|
3434
3481
|
AvailabilityDetail_default as AvailabilityDetailModel,
|
|
3435
3482
|
Availability_default as AvailabilityModel,
|
|
3436
3483
|
CALENDAR_AUTH_MESSAGE_TYPE,
|