@twentyhq/teams 1.1.2 → 1.2.0
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/dependencies/yarn.lock +723 -3
- package/manifest.json +46 -29
- package/package.json +4 -2
- package/src/features/chat/logic-functions/teams-activities-enqueue.mjs +366 -152
- package/src/features/chat/logic-functions/teams-activities-enqueue.mjs.map +4 -4
- package/src/features/chat/logic-functions/teams-activities-enqueue.ts +1 -1
- package/src/features/chat/logic-functions/teams-activities-resolver.mjs +500 -40
- package/src/features/chat/logic-functions/teams-activities-resolver.mjs.map +4 -4
- package/src/features/chat/logic-functions/teams-activities-resolver.ts +13 -2
- package/src/features/chat/logic-functions/teams-list-unlinked-users.mjs +95 -61
- package/src/features/chat/logic-functions/teams-list-unlinked-users.mjs.map +4 -4
- package/src/features/chat/logic-functions/teams-match-user-links.mjs +105 -86
- package/src/features/chat/logic-functions/teams-match-user-links.mjs.map +4 -4
- package/src/features/chat/logic-functions/teams-register-connection.mjs +119 -101
- package/src/features/chat/logic-functions/teams-register-connection.mjs.map +4 -4
- package/src/features/chat/logic-functions/teams-register-connection.ts +1 -1
- package/src/features/chat/logic-functions/teams-search-users.mjs +96 -62
- package/src/features/chat/logic-functions/teams-search-users.mjs.map +4 -4
- package/src/features/chat/logic-functions/teams-set-user-link.mjs +88 -54
- package/src/features/chat/logic-functions/teams-set-user-link.mjs.map +4 -4
- package/src/features/chat/logic-functions/teams-tenant-release.mjs +72 -41
- package/src/features/chat/logic-functions/teams-tenant-release.mjs.map +4 -4
- package/src/features/transcripts/logic-functions/teams-count-transcript-history.mjs +99 -68
- package/src/features/transcripts/logic-functions/teams-count-transcript-history.mjs.map +4 -4
- package/src/features/transcripts/logic-functions/teams-import-transcript-history.mjs +99 -68
- package/src/features/transcripts/logic-functions/teams-import-transcript-history.mjs.map +4 -4
- package/src/features/transcripts/logic-functions/teams-import-transcript.mjs +96 -65
- package/src/features/transcripts/logic-functions/teams-import-transcript.mjs.map +4 -4
- package/src/features/transcripts/logic-functions/teams-list-organizer-transcripts.mjs +89 -58
- package/src/features/transcripts/logic-functions/teams-list-organizer-transcripts.mjs.map +4 -4
- package/src/features/transcripts/logic-functions/teams-sync-transcript.mjs +96 -65
- package/src/features/transcripts/logic-functions/teams-sync-transcript.mjs.map +4 -4
- package/src/features/transcripts/logic-functions/teams-transcript-history-count.mjs +0 -1
- package/src/features/transcripts/logic-functions/teams-transcript-history-count.mjs.map +2 -2
- package/src/features/transcripts/logic-functions/teams-transcript-history-import.mjs +0 -1
- package/src/features/transcripts/logic-functions/teams-transcript-history-import.mjs.map +2 -2
- package/src/features/transcripts/logic-functions/teams-transcript-history-status.mjs +0 -1
- package/src/features/transcripts/logic-functions/teams-transcript-history-status.mjs.map +2 -2
- package/src/features/transcripts/logic-functions/teams-transcripts-webhook.mjs +104 -73
- package/src/features/transcripts/logic-functions/teams-transcripts-webhook.mjs.map +4 -4
- package/src/features/transcripts/logic-functions/teams-uninstall.mjs +72 -41
- package/src/features/transcripts/logic-functions/teams-uninstall.mjs.map +4 -4
- package/src/front-components/settings.front-component.mjs +113 -113
- package/src/front-components/settings.front-component.mjs.map +4 -4
- package/src/logic-functions/teams-health-check.mjs +46 -25
- package/src/logic-functions/teams-health-check.mjs.map +4 -4
- package/src/logic-functions/teams-health-check.ts +21 -6
- package/src/logic-functions/teams-post-install.mjs +1270 -0
- package/src/logic-functions/teams-post-install.mjs.map +7 -0
- package/src/logic-functions/teams-post-install.ts +15 -0
|
@@ -124,10 +124,10 @@ var require_convenience = __commonJS({
|
|
|
124
124
|
return structural_1.isArray(term) && term.length > 0;
|
|
125
125
|
};
|
|
126
126
|
exports.isNonEmptyArray = isNonEmptyArray3;
|
|
127
|
-
var
|
|
127
|
+
var isNonEmptyString14 = (term) => {
|
|
128
128
|
return primitives_1.isString(term) && term.length > 0;
|
|
129
129
|
};
|
|
130
|
-
exports.isNonEmptyString =
|
|
130
|
+
exports.isNonEmptyString = isNonEmptyString14;
|
|
131
131
|
var isNumberOrNaN = (term) => {
|
|
132
132
|
return typeof term === "number";
|
|
133
133
|
};
|
|
@@ -220,7 +220,7 @@ var TEAMS_COUNT_TRANSCRIPT_HISTORY_UNIVERSAL_IDENTIFIER = "1a853a42-2366-4344-b6
|
|
|
220
220
|
var TEAMS_IMPORT_TRANSCRIPT_HISTORY_TIMEOUT_SECONDS = 900;
|
|
221
221
|
|
|
222
222
|
// src/features/transcripts/logic-functions/utils/process-teams-transcript-history-page-or-throw.ts
|
|
223
|
-
var
|
|
223
|
+
var import_guards16 = __toESM(require_build());
|
|
224
224
|
import { CoreApiClient } from "twenty-client-sdk/core";
|
|
225
225
|
|
|
226
226
|
// node_modules/twenty-sdk/dist/logic-function/index.mjs
|
|
@@ -731,7 +731,7 @@ var getTeamsTranscriptHistoryPageTransition = ({
|
|
|
731
731
|
};
|
|
732
732
|
|
|
733
733
|
// src/features/transcripts/logic-functions/utils/import-teams-transcript-history-page-or-throw.ts
|
|
734
|
-
var
|
|
734
|
+
var import_guards11 = __toESM(require_build());
|
|
735
735
|
|
|
736
736
|
// src/features/transcripts/logic-functions/constants/teams-transcript-history-upsert-batch-size.ts
|
|
737
737
|
var TEAMS_TRANSCRIPT_HISTORY_UPSERT_BATCH_SIZE = 10;
|
|
@@ -772,7 +772,7 @@ var GRAPH_SPEAKER_ATTRIBUTION_NOT_ALLOWED_ERROR_CODE = "SpeakerAttributionNotAll
|
|
|
772
772
|
var GRAPH_UNATTRIBUTED_TRANSCRIPT_FORMAT = "application/vnd.microsoft.graph.transcript+text";
|
|
773
773
|
|
|
774
774
|
// src/features/transcripts/logic-functions/utils/fetch-graph-response.ts
|
|
775
|
-
var
|
|
775
|
+
var import_guards6 = __toESM(require_build());
|
|
776
776
|
|
|
777
777
|
// src/features/transcripts/logic-functions/constants/graph-request-max-attempts.ts
|
|
778
778
|
var GRAPH_REQUEST_MAX_ATTEMPTS = 4;
|
|
@@ -795,62 +795,93 @@ var resolveGraphUrlOrThrow = (url) => {
|
|
|
795
795
|
return resolvedUrl.toString();
|
|
796
796
|
};
|
|
797
797
|
|
|
798
|
-
// src/
|
|
798
|
+
// src/utils/parse-retry-after-ms.ts
|
|
799
|
+
var import_guards5 = __toESM(require_build());
|
|
800
|
+
var parseRetryAfterMs = (retryAfter) => {
|
|
801
|
+
if (!(0, import_guards5.isNonEmptyString)(retryAfter)) {
|
|
802
|
+
return void 0;
|
|
803
|
+
}
|
|
804
|
+
const retryAfterSeconds = Number(retryAfter);
|
|
805
|
+
if (Number.isFinite(retryAfterSeconds)) {
|
|
806
|
+
return Math.max(retryAfterSeconds * 1e3, 0);
|
|
807
|
+
}
|
|
808
|
+
const retryAtMs = Date.parse(retryAfter);
|
|
809
|
+
return Number.isNaN(retryAtMs) ? void 0 : Math.max(retryAtMs - Date.now(), 0);
|
|
810
|
+
};
|
|
811
|
+
|
|
812
|
+
// src/utils/sleep-for-milliseconds.ts
|
|
799
813
|
var sleepForMilliseconds = (milliseconds) => new Promise((resolve) => setTimeout(resolve, milliseconds));
|
|
800
814
|
|
|
815
|
+
// src/utils/fetch-with-retries.ts
|
|
816
|
+
var fetchWithRetries = async ({
|
|
817
|
+
sendRequest,
|
|
818
|
+
maxAttempts,
|
|
819
|
+
isRetryableStatus,
|
|
820
|
+
getRetryDelayMs,
|
|
821
|
+
retryAbortSignal
|
|
822
|
+
}) => {
|
|
823
|
+
const sendAttempt = async ({
|
|
824
|
+
attempt,
|
|
825
|
+
waitedMs
|
|
826
|
+
}) => {
|
|
827
|
+
const response = await sendRequest();
|
|
828
|
+
if (response.ok || !isRetryableStatus(response.status) || attempt + 1 >= maxAttempts) {
|
|
829
|
+
return response;
|
|
830
|
+
}
|
|
831
|
+
const delayMs = getRetryDelayMs({
|
|
832
|
+
attempt,
|
|
833
|
+
retryAfterMs: parseRetryAfterMs(response.headers.get("retry-after")),
|
|
834
|
+
waitedMs
|
|
835
|
+
});
|
|
836
|
+
if (!o(delayMs)) {
|
|
837
|
+
return response;
|
|
838
|
+
}
|
|
839
|
+
await sleepForMilliseconds(delayMs);
|
|
840
|
+
if (o(retryAbortSignal) && retryAbortSignal.aborted) {
|
|
841
|
+
return response;
|
|
842
|
+
}
|
|
843
|
+
await response.body?.cancel();
|
|
844
|
+
return sendAttempt({ attempt: attempt + 1, waitedMs: waitedMs + delayMs });
|
|
845
|
+
};
|
|
846
|
+
return sendAttempt({ attempt: 0, waitedMs: 0 });
|
|
847
|
+
};
|
|
848
|
+
|
|
801
849
|
// src/features/transcripts/logic-functions/utils/fetch-graph-response.ts
|
|
802
|
-
var
|
|
850
|
+
var fetchGraphResponse = async ({
|
|
803
851
|
accessToken,
|
|
804
852
|
url,
|
|
805
853
|
accept,
|
|
806
854
|
method,
|
|
807
|
-
body
|
|
808
|
-
attempt
|
|
855
|
+
body
|
|
809
856
|
}) => {
|
|
810
|
-
const
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
857
|
+
const resolvedUrl = resolveGraphUrlOrThrow(url);
|
|
858
|
+
const response = await fetchWithRetries({
|
|
859
|
+
sendRequest: () => fetch(resolvedUrl, {
|
|
860
|
+
method,
|
|
861
|
+
redirect: "error",
|
|
862
|
+
headers: {
|
|
863
|
+
Authorization: `Bearer ${accessToken}`,
|
|
864
|
+
Accept: accept,
|
|
865
|
+
...o(body) ? { "Content-Type": "application/json" } : {}
|
|
866
|
+
},
|
|
867
|
+
body: o(body) ? JSON.stringify(body) : void 0
|
|
868
|
+
}),
|
|
869
|
+
maxAttempts: GRAPH_REQUEST_MAX_ATTEMPTS,
|
|
870
|
+
isRetryableStatus: (status) => GRAPH_RETRYABLE_STATUSES.has(status),
|
|
871
|
+
getRetryDelayMs: ({ attempt, retryAfterMs }) => o(retryAfterMs) && retryAfterMs > 0 ? retryAfterMs : GRAPH_REQUEST_RETRY_BASE_DELAY_MILLISECONDS * 2 ** attempt
|
|
819
872
|
});
|
|
820
873
|
if (response.ok) {
|
|
821
874
|
return response;
|
|
822
875
|
}
|
|
823
|
-
if (GRAPH_RETRYABLE_STATUSES.has(response.status) && attempt + 1 < GRAPH_REQUEST_MAX_ATTEMPTS) {
|
|
824
|
-
const retryAfterSeconds = Number(response.headers.get("Retry-After"));
|
|
825
|
-
await sleepForMilliseconds(
|
|
826
|
-
retryAfterSeconds > 0 ? retryAfterSeconds * 1e3 : GRAPH_REQUEST_RETRY_BASE_DELAY_MILLISECONDS * 2 ** attempt
|
|
827
|
-
);
|
|
828
|
-
return fetchGraphResponseWithRetries({
|
|
829
|
-
accessToken,
|
|
830
|
-
url,
|
|
831
|
-
accept,
|
|
832
|
-
method,
|
|
833
|
-
body,
|
|
834
|
-
attempt: attempt + 1
|
|
835
|
-
});
|
|
836
|
-
}
|
|
837
876
|
const errorBody = await response.json().catch(() => ({}));
|
|
838
|
-
const innerErrorCode = (0,
|
|
839
|
-
const message = (0,
|
|
877
|
+
const innerErrorCode = (0, import_guards6.isNonEmptyString)(errorBody.error?.innerError?.code) ? errorBody.error.innerError.code : void 0;
|
|
878
|
+
const message = (0, import_guards6.isNonEmptyString)(errorBody.error?.message) ? errorBody.error.message : response.statusText;
|
|
840
879
|
throw new GraphRequestError({
|
|
841
|
-
message: `Microsoft Graph request failed (${response.status}${(0,
|
|
880
|
+
message: `Microsoft Graph request failed (${response.status}${(0, import_guards6.isNonEmptyString)(innerErrorCode) ? ` ${innerErrorCode}` : ""}): ${message}`,
|
|
842
881
|
status: response.status,
|
|
843
882
|
innerErrorCode
|
|
844
883
|
});
|
|
845
884
|
};
|
|
846
|
-
var fetchGraphResponse = ({
|
|
847
|
-
url,
|
|
848
|
-
...request
|
|
849
|
-
}) => fetchGraphResponseWithRetries({
|
|
850
|
-
...request,
|
|
851
|
-
url: resolveGraphUrlOrThrow(url),
|
|
852
|
-
attempt: 0
|
|
853
|
-
});
|
|
854
885
|
|
|
855
886
|
// src/features/transcripts/logic-functions/utils/fetch-graph-text.ts
|
|
856
887
|
var fetchGraphText = async ({
|
|
@@ -891,7 +922,7 @@ var downloadMeetingTranscriptContent = async ({
|
|
|
891
922
|
};
|
|
892
923
|
|
|
893
924
|
// src/features/transcripts/logic-functions/utils/find-teams-calendar-event-ids-or-throw.ts
|
|
894
|
-
var
|
|
925
|
+
var import_guards9 = __toESM(require_build());
|
|
895
926
|
|
|
896
927
|
// src/features/transcripts/logic-functions/constants/teams-calendar-event-lookup-concurrency.ts
|
|
897
928
|
var TEAMS_CALENDAR_EVENT_LOOKUP_CONCURRENCY = 4;
|
|
@@ -900,7 +931,7 @@ var TEAMS_CALENDAR_EVENT_LOOKUP_CONCURRENCY = 4;
|
|
|
900
931
|
var TWENTY_QUERY_MAX_RECORDS = 200;
|
|
901
932
|
|
|
902
933
|
// src/features/transcripts/logic-functions/utils/get-teams-calendar-event-ical-uid-or-throw.ts
|
|
903
|
-
var
|
|
934
|
+
var import_guards7 = __toESM(require_build());
|
|
904
935
|
|
|
905
936
|
// src/features/transcripts/logic-functions/utils/fetch-graph-json.ts
|
|
906
937
|
var fetchGraphJson = async ({
|
|
@@ -930,7 +961,7 @@ var getTeamsCalendarEventICalUIdOrThrow = async ({
|
|
|
930
961
|
accessToken,
|
|
931
962
|
url: `me/events/${encodeURIComponent(eventId)}?$select=iCalUId`
|
|
932
963
|
});
|
|
933
|
-
return (0,
|
|
964
|
+
return (0, import_guards7.isNonEmptyString)(event.iCalUId) ? event.iCalUId : void 0;
|
|
934
965
|
} catch (error) {
|
|
935
966
|
if (!(error instanceof GraphRequestError)) {
|
|
936
967
|
throw error;
|
|
@@ -957,7 +988,7 @@ var groupCalendarEventIdsByKey = (entries) => {
|
|
|
957
988
|
};
|
|
958
989
|
|
|
959
990
|
// src/features/transcripts/logic-functions/utils/match-teams-calendar-event-ids.ts
|
|
960
|
-
var
|
|
991
|
+
var import_guards8 = __toESM(require_build());
|
|
961
992
|
var findUniqueCalendarEventId = (calendarEventIds) => calendarEventIds?.size === 1 ? [...calendarEventIds][0] : void 0;
|
|
962
993
|
var matchTeamsCalendarEventIds = ({
|
|
963
994
|
references,
|
|
@@ -974,7 +1005,7 @@ var matchTeamsCalendarEventIds = ({
|
|
|
974
1005
|
);
|
|
975
1006
|
const calendarEventIdsByICalUid = groupCalendarEventIdsByKey(
|
|
976
1007
|
calendarEvents.flatMap(
|
|
977
|
-
({ id, iCalUid }) => (0,
|
|
1008
|
+
({ id, iCalUid }) => (0, import_guards8.isNonEmptyString)(iCalUid) ? [[iCalUid, id]] : []
|
|
978
1009
|
)
|
|
979
1010
|
);
|
|
980
1011
|
return new Map(
|
|
@@ -998,7 +1029,7 @@ var listAllNodesInBatchesOrThrow = async ({
|
|
|
998
1029
|
do {
|
|
999
1030
|
const connection = await fetchPage({ batch, after });
|
|
1000
1031
|
nodes.push(...connection?.edges.map((edge) => edge.node) ?? []);
|
|
1001
|
-
after = connection?.pageInfo.hasNextPage && (0,
|
|
1032
|
+
after = connection?.pageInfo.hasNextPage && (0, import_guards9.isNonEmptyString)(connection.pageInfo.endCursor) ? connection.pageInfo.endCursor : void 0;
|
|
1002
1033
|
} while (o(after));
|
|
1003
1034
|
}
|
|
1004
1035
|
return nodes;
|
|
@@ -1030,7 +1061,7 @@ var listCalendarChannelEventAssociationsOrThrow = ({
|
|
|
1030
1061
|
({
|
|
1031
1062
|
node
|
|
1032
1063
|
}) => {
|
|
1033
|
-
if (!(0,
|
|
1064
|
+
if (!(0, import_guards9.isNonEmptyString)(node.eventExternalId) || !(0, import_guards9.isNonEmptyString)(node.calendarEventId)) {
|
|
1034
1065
|
return [];
|
|
1035
1066
|
}
|
|
1036
1067
|
return [
|
|
@@ -1136,7 +1167,7 @@ var findTeamsCalendarEventIdsOrThrow = async ({
|
|
|
1136
1167
|
});
|
|
1137
1168
|
const fallbackICalUIds = [
|
|
1138
1169
|
...new Set(
|
|
1139
|
-
iCalUIdFallbackReferences.map(({ iCalUId }) => iCalUId).filter(
|
|
1170
|
+
iCalUIdFallbackReferences.map(({ iCalUId }) => iCalUId).filter(import_guards9.isNonEmptyString)
|
|
1140
1171
|
)
|
|
1141
1172
|
];
|
|
1142
1173
|
return matchTeamsCalendarEventIds({
|
|
@@ -1153,7 +1184,7 @@ var findTeamsCalendarEventIdsOrThrow = async ({
|
|
|
1153
1184
|
var isUnavailableTeamsTranscriptError = (error) => error instanceof GraphRequestError && (error.status === 404 || error.status === 403 && error.innerErrorCode !== GRAPH_ACCESS_TO_TRANSCRIPTS_DISABLED_ERROR_CODE);
|
|
1154
1185
|
|
|
1155
1186
|
// src/features/transcripts/logic-functions/utils/map-teams-transcript-to-entries.ts
|
|
1156
|
-
var
|
|
1187
|
+
var import_guards10 = __toESM(require_build());
|
|
1157
1188
|
var isCueTimingLine = (line) => /^-?(?:\d+:)?\d{1,2}:\d{2}[.,]\d{1,3}\s+-->\s+-?(?:\d+:)?\d{1,2}:\d{2}[.,]\d{1,3}/.test(
|
|
1158
1189
|
line.trim()
|
|
1159
1190
|
);
|
|
@@ -1169,7 +1200,7 @@ var parseCueStartSeconds = (timingLine) => {
|
|
|
1169
1200
|
var splitIntoBlocks = (content) => {
|
|
1170
1201
|
const blocks = [[]];
|
|
1171
1202
|
for (const line of content.replace(/^/, "").split(/\r?\n/)) {
|
|
1172
|
-
if ((0,
|
|
1203
|
+
if ((0, import_guards10.isNonEmptyString)(line.trim())) {
|
|
1173
1204
|
blocks[blocks.length - 1].push(line);
|
|
1174
1205
|
} else {
|
|
1175
1206
|
blocks.push([]);
|
|
@@ -1212,12 +1243,12 @@ var toUtterance = ({
|
|
|
1212
1243
|
/<v(?:\.[^\s>]*)?\s+([^>]*)>/i.exec(cueText)?.[1] ?? ""
|
|
1213
1244
|
).trim();
|
|
1214
1245
|
const text = decodeHtmlEntities(stripCueTags(cueText)).replace(/\s+/g, " ").trim();
|
|
1215
|
-
if (!(0,
|
|
1246
|
+
if (!(0, import_guards10.isNonEmptyString)(text)) {
|
|
1216
1247
|
return void 0;
|
|
1217
1248
|
}
|
|
1218
1249
|
return {
|
|
1219
1250
|
startSeconds,
|
|
1220
|
-
speakerName: (0,
|
|
1251
|
+
speakerName: (0, import_guards10.isNonEmptyString)(speakerName) ? speakerName : void 0,
|
|
1221
1252
|
text
|
|
1222
1253
|
};
|
|
1223
1254
|
};
|
|
@@ -1325,7 +1356,7 @@ var importTeamsTranscriptHistoryPageOrThrow = async ({
|
|
|
1325
1356
|
}
|
|
1326
1357
|
);
|
|
1327
1358
|
const transcriptEntries = o(transcriptContent) ? mapTeamsTranscriptToEntries(transcriptContent) : [];
|
|
1328
|
-
if (!(0,
|
|
1359
|
+
if (!(0, import_guards11.isNonEmptyArray)(transcriptEntries)) {
|
|
1329
1360
|
unavailableCount += 1;
|
|
1330
1361
|
continue;
|
|
1331
1362
|
}
|
|
@@ -1405,10 +1436,10 @@ var isTeamsMeetingOccurrenceStartingInWindow = ({
|
|
|
1405
1436
|
};
|
|
1406
1437
|
|
|
1407
1438
|
// src/features/transcripts/logic-functions/utils/list-teams-calendar-page.ts
|
|
1408
|
-
var
|
|
1439
|
+
var import_guards13 = __toESM(require_build());
|
|
1409
1440
|
|
|
1410
1441
|
// src/features/transcripts/logic-functions/utils/to-teams-meeting-occurrence.ts
|
|
1411
|
-
var
|
|
1442
|
+
var import_guards12 = __toESM(require_build());
|
|
1412
1443
|
|
|
1413
1444
|
// src/features/transcripts/logic-functions/utils/parse-graph-utc-date-time.ts
|
|
1414
1445
|
var parseGraphUtcDateTime = (dateTimeTimeZone) => {
|
|
@@ -1424,12 +1455,12 @@ var toTeamsMeetingOccurrence = (event) => {
|
|
|
1424
1455
|
const joinWebUrl = event.onlineMeeting?.joinUrl;
|
|
1425
1456
|
const startDateTime = parseGraphUtcDateTime(event.start);
|
|
1426
1457
|
const endDateTime = parseGraphUtcDateTime(event.end);
|
|
1427
|
-
if (!event.isOrganizer || event.isCancelled || event.onlineMeetingProvider !== "teamsForBusiness" || !(0,
|
|
1458
|
+
if (!event.isOrganizer || event.isCancelled || event.onlineMeetingProvider !== "teamsForBusiness" || !(0, import_guards12.isNonEmptyString)(joinWebUrl) || !(0, import_guards12.isNonEmptyString)(event.id) || !o(startDateTime) || !o(endDateTime)) {
|
|
1428
1459
|
return void 0;
|
|
1429
1460
|
}
|
|
1430
|
-
const calendarReference = (0,
|
|
1461
|
+
const calendarReference = (0, import_guards12.isNonEmptyString)(event.seriesMasterId) ? { eventExternalId: event.seriesMasterId } : {
|
|
1431
1462
|
eventExternalId: event.id,
|
|
1432
|
-
...(0,
|
|
1463
|
+
...(0, import_guards12.isNonEmptyString)(event.iCalUId) ? { iCalUId: event.iCalUId } : {}
|
|
1433
1464
|
};
|
|
1434
1465
|
return { joinWebUrl, startDateTime, endDateTime, calendarReference };
|
|
1435
1466
|
};
|
|
@@ -1449,12 +1480,12 @@ var listTeamsCalendarPage = async ({
|
|
|
1449
1480
|
});
|
|
1450
1481
|
return {
|
|
1451
1482
|
occurrences,
|
|
1452
|
-
nextPageUrl: (0,
|
|
1483
|
+
nextPageUrl: (0, import_guards13.isNonEmptyString)(page["@odata.nextLink"]) ? page["@odata.nextLink"] : void 0
|
|
1453
1484
|
};
|
|
1454
1485
|
};
|
|
1455
1486
|
|
|
1456
1487
|
// src/features/transcripts/logic-functions/utils/is-transcript-during-occurrence.ts
|
|
1457
|
-
var
|
|
1488
|
+
var import_guards14 = __toESM(require_build());
|
|
1458
1489
|
|
|
1459
1490
|
// src/features/transcripts/logic-functions/constants/teams-occurrence-margin-milliseconds.ts
|
|
1460
1491
|
var TEAMS_OCCURRENCE_MARGIN_MILLISECONDS = 15 * 60 * 1e3;
|
|
@@ -1464,7 +1495,7 @@ var isTranscriptDuringOccurrence = ({
|
|
|
1464
1495
|
transcript,
|
|
1465
1496
|
occurrence
|
|
1466
1497
|
}) => {
|
|
1467
|
-
if (!(0,
|
|
1498
|
+
if (!(0, import_guards14.isNonEmptyString)(transcript.createdDateTime)) {
|
|
1468
1499
|
return false;
|
|
1469
1500
|
}
|
|
1470
1501
|
const createdMilliseconds = Date.parse(transcript.createdDateTime);
|
|
@@ -1505,7 +1536,7 @@ var getMeetingByJoinUrl = async ({
|
|
|
1505
1536
|
};
|
|
1506
1537
|
|
|
1507
1538
|
// src/features/transcripts/logic-functions/utils/list-meeting-transcripts.ts
|
|
1508
|
-
var
|
|
1539
|
+
var import_guards15 = __toESM(require_build());
|
|
1509
1540
|
|
|
1510
1541
|
// src/features/transcripts/logic-functions/constants/max-graph-transcript-list-pages.ts
|
|
1511
1542
|
var MAX_GRAPH_TRANSCRIPT_LIST_PAGES = 200;
|
|
@@ -1525,7 +1556,7 @@ var listMeetingTranscriptPages = async ({
|
|
|
1525
1556
|
});
|
|
1526
1557
|
const transcripts = page.value ?? [];
|
|
1527
1558
|
const nextPageUrl = page["@odata.nextLink"];
|
|
1528
|
-
if (!(0,
|
|
1559
|
+
if (!(0, import_guards15.isNonEmptyString)(nextPageUrl)) {
|
|
1529
1560
|
return transcripts;
|
|
1530
1561
|
}
|
|
1531
1562
|
return [
|
|
@@ -1811,7 +1842,7 @@ var processTeamsTranscriptHistoryPageOrThrow = async ({
|
|
|
1811
1842
|
attempt,
|
|
1812
1843
|
nextPageUrl
|
|
1813
1844
|
} = payload;
|
|
1814
|
-
if (!(0,
|
|
1845
|
+
if (!(0, import_guards16.isNonEmptyString)(connectedAccountId) || !(0, import_guards16.isNonEmptyString)(runId) || !(0, import_guards16.isNonNegativeInteger)(chunkIndex) || !(0, import_guards16.isNonNegativeInteger)(pageIndex) || !(0, import_guards16.isNonNegativeInteger)(attempt) || o(nextPageUrl) && !(0, import_guards16.isNonEmptyString)(nextPageUrl)) {
|
|
1815
1846
|
return { success: false, error: "Invalid Teams transcript history job" };
|
|
1816
1847
|
}
|
|
1817
1848
|
if (!isTeamsTranscriptImportEnabled()) {
|
|
@@ -1827,7 +1858,7 @@ var processTeamsTranscriptHistoryPageOrThrow = async ({
|
|
|
1827
1858
|
chunkIndex,
|
|
1828
1859
|
pageIndex,
|
|
1829
1860
|
attempt,
|
|
1830
|
-
...(0,
|
|
1861
|
+
...(0, import_guards16.isNonEmptyString)(nextPageUrl) ? { nextPageUrl } : {}
|
|
1831
1862
|
};
|
|
1832
1863
|
try {
|
|
1833
1864
|
return await processPageOrThrow({ job, phase });
|