@twentyhq/teams 1.1.2 → 1.2.1
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 +378 -162
- 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 = isNonEmptyArray2;
|
|
127
|
-
var
|
|
127
|
+
var isNonEmptyString13 = (term) => {
|
|
128
128
|
return primitives_1.isString(term) && term.length > 0;
|
|
129
129
|
};
|
|
130
|
-
exports.isNonEmptyString =
|
|
130
|
+
exports.isNonEmptyString = isNonEmptyString13;
|
|
131
131
|
var isNumberOrNaN = (term) => {
|
|
132
132
|
return typeof term === "number";
|
|
133
133
|
};
|
|
@@ -193,7 +193,7 @@ var require_build = __commonJS({
|
|
|
193
193
|
});
|
|
194
194
|
|
|
195
195
|
// src/features/transcripts/logic-functions/teams-sync-transcript.ts
|
|
196
|
-
var
|
|
196
|
+
var import_guards14 = __toESM(require_build());
|
|
197
197
|
import { CoreApiClient } from "twenty-client-sdk/core";
|
|
198
198
|
|
|
199
199
|
// twenty-sdk-define-stub:__twenty-sdk-define-stub__
|
|
@@ -480,7 +480,7 @@ var GraphRequestError = class extends Error {
|
|
|
480
480
|
};
|
|
481
481
|
|
|
482
482
|
// src/features/transcripts/logic-functions/utils/fetch-graph-response.ts
|
|
483
|
-
var
|
|
483
|
+
var import_guards5 = __toESM(require_build());
|
|
484
484
|
|
|
485
485
|
// src/features/transcripts/logic-functions/constants/graph-request-max-attempts.ts
|
|
486
486
|
var GRAPH_REQUEST_MAX_ATTEMPTS = 4;
|
|
@@ -503,62 +503,93 @@ var resolveGraphUrlOrThrow = (url) => {
|
|
|
503
503
|
return resolvedUrl.toString();
|
|
504
504
|
};
|
|
505
505
|
|
|
506
|
-
// src/
|
|
506
|
+
// src/utils/parse-retry-after-ms.ts
|
|
507
|
+
var import_guards4 = __toESM(require_build());
|
|
508
|
+
var parseRetryAfterMs = (retryAfter) => {
|
|
509
|
+
if (!(0, import_guards4.isNonEmptyString)(retryAfter)) {
|
|
510
|
+
return void 0;
|
|
511
|
+
}
|
|
512
|
+
const retryAfterSeconds = Number(retryAfter);
|
|
513
|
+
if (Number.isFinite(retryAfterSeconds)) {
|
|
514
|
+
return Math.max(retryAfterSeconds * 1e3, 0);
|
|
515
|
+
}
|
|
516
|
+
const retryAtMs = Date.parse(retryAfter);
|
|
517
|
+
return Number.isNaN(retryAtMs) ? void 0 : Math.max(retryAtMs - Date.now(), 0);
|
|
518
|
+
};
|
|
519
|
+
|
|
520
|
+
// src/utils/sleep-for-milliseconds.ts
|
|
507
521
|
var sleepForMilliseconds = (milliseconds) => new Promise((resolve) => setTimeout(resolve, milliseconds));
|
|
508
522
|
|
|
523
|
+
// src/utils/fetch-with-retries.ts
|
|
524
|
+
var fetchWithRetries = async ({
|
|
525
|
+
sendRequest,
|
|
526
|
+
maxAttempts,
|
|
527
|
+
isRetryableStatus,
|
|
528
|
+
getRetryDelayMs,
|
|
529
|
+
retryAbortSignal
|
|
530
|
+
}) => {
|
|
531
|
+
const sendAttempt = async ({
|
|
532
|
+
attempt,
|
|
533
|
+
waitedMs
|
|
534
|
+
}) => {
|
|
535
|
+
const response = await sendRequest();
|
|
536
|
+
if (response.ok || !isRetryableStatus(response.status) || attempt + 1 >= maxAttempts) {
|
|
537
|
+
return response;
|
|
538
|
+
}
|
|
539
|
+
const delayMs = getRetryDelayMs({
|
|
540
|
+
attempt,
|
|
541
|
+
retryAfterMs: parseRetryAfterMs(response.headers.get("retry-after")),
|
|
542
|
+
waitedMs
|
|
543
|
+
});
|
|
544
|
+
if (!o(delayMs)) {
|
|
545
|
+
return response;
|
|
546
|
+
}
|
|
547
|
+
await sleepForMilliseconds(delayMs);
|
|
548
|
+
if (o(retryAbortSignal) && retryAbortSignal.aborted) {
|
|
549
|
+
return response;
|
|
550
|
+
}
|
|
551
|
+
await response.body?.cancel();
|
|
552
|
+
return sendAttempt({ attempt: attempt + 1, waitedMs: waitedMs + delayMs });
|
|
553
|
+
};
|
|
554
|
+
return sendAttempt({ attempt: 0, waitedMs: 0 });
|
|
555
|
+
};
|
|
556
|
+
|
|
509
557
|
// src/features/transcripts/logic-functions/utils/fetch-graph-response.ts
|
|
510
|
-
var
|
|
558
|
+
var fetchGraphResponse = async ({
|
|
511
559
|
accessToken,
|
|
512
560
|
url,
|
|
513
561
|
accept,
|
|
514
562
|
method,
|
|
515
|
-
body
|
|
516
|
-
attempt
|
|
563
|
+
body
|
|
517
564
|
}) => {
|
|
518
|
-
const
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
565
|
+
const resolvedUrl = resolveGraphUrlOrThrow(url);
|
|
566
|
+
const response = await fetchWithRetries({
|
|
567
|
+
sendRequest: () => fetch(resolvedUrl, {
|
|
568
|
+
method,
|
|
569
|
+
redirect: "error",
|
|
570
|
+
headers: {
|
|
571
|
+
Authorization: `Bearer ${accessToken}`,
|
|
572
|
+
Accept: accept,
|
|
573
|
+
...o(body) ? { "Content-Type": "application/json" } : {}
|
|
574
|
+
},
|
|
575
|
+
body: o(body) ? JSON.stringify(body) : void 0
|
|
576
|
+
}),
|
|
577
|
+
maxAttempts: GRAPH_REQUEST_MAX_ATTEMPTS,
|
|
578
|
+
isRetryableStatus: (status) => GRAPH_RETRYABLE_STATUSES.has(status),
|
|
579
|
+
getRetryDelayMs: ({ attempt, retryAfterMs }) => o(retryAfterMs) && retryAfterMs > 0 ? retryAfterMs : GRAPH_REQUEST_RETRY_BASE_DELAY_MILLISECONDS * 2 ** attempt
|
|
527
580
|
});
|
|
528
581
|
if (response.ok) {
|
|
529
582
|
return response;
|
|
530
583
|
}
|
|
531
|
-
if (GRAPH_RETRYABLE_STATUSES.has(response.status) && attempt + 1 < GRAPH_REQUEST_MAX_ATTEMPTS) {
|
|
532
|
-
const retryAfterSeconds = Number(response.headers.get("Retry-After"));
|
|
533
|
-
await sleepForMilliseconds(
|
|
534
|
-
retryAfterSeconds > 0 ? retryAfterSeconds * 1e3 : GRAPH_REQUEST_RETRY_BASE_DELAY_MILLISECONDS * 2 ** attempt
|
|
535
|
-
);
|
|
536
|
-
return fetchGraphResponseWithRetries({
|
|
537
|
-
accessToken,
|
|
538
|
-
url,
|
|
539
|
-
accept,
|
|
540
|
-
method,
|
|
541
|
-
body,
|
|
542
|
-
attempt: attempt + 1
|
|
543
|
-
});
|
|
544
|
-
}
|
|
545
584
|
const errorBody = await response.json().catch(() => ({}));
|
|
546
|
-
const innerErrorCode = (0,
|
|
547
|
-
const message = (0,
|
|
585
|
+
const innerErrorCode = (0, import_guards5.isNonEmptyString)(errorBody.error?.innerError?.code) ? errorBody.error.innerError.code : void 0;
|
|
586
|
+
const message = (0, import_guards5.isNonEmptyString)(errorBody.error?.message) ? errorBody.error.message : response.statusText;
|
|
548
587
|
throw new GraphRequestError({
|
|
549
|
-
message: `Microsoft Graph request failed (${response.status}${(0,
|
|
588
|
+
message: `Microsoft Graph request failed (${response.status}${(0, import_guards5.isNonEmptyString)(innerErrorCode) ? ` ${innerErrorCode}` : ""}): ${message}`,
|
|
550
589
|
status: response.status,
|
|
551
590
|
innerErrorCode
|
|
552
591
|
});
|
|
553
592
|
};
|
|
554
|
-
var fetchGraphResponse = ({
|
|
555
|
-
url,
|
|
556
|
-
...request
|
|
557
|
-
}) => fetchGraphResponseWithRetries({
|
|
558
|
-
...request,
|
|
559
|
-
url: resolveGraphUrlOrThrow(url),
|
|
560
|
-
attempt: 0
|
|
561
|
-
});
|
|
562
593
|
|
|
563
594
|
// src/features/transcripts/logic-functions/utils/fetch-graph-text.ts
|
|
564
595
|
var fetchGraphText = async ({
|
|
@@ -650,7 +681,7 @@ var fetchTeamsTranscriptData = async ({
|
|
|
650
681
|
};
|
|
651
682
|
|
|
652
683
|
// src/features/transcripts/logic-functions/utils/find-teams-transcript-calendar-event-id-or-throw.ts
|
|
653
|
-
var
|
|
684
|
+
var import_guards12 = __toESM(require_build());
|
|
654
685
|
|
|
655
686
|
// src/features/transcripts/logic-functions/constants/teams-occurrence-margin-milliseconds.ts
|
|
656
687
|
var TEAMS_OCCURRENCE_MARGIN_MILLISECONDS = 15 * 60 * 1e3;
|
|
@@ -680,7 +711,7 @@ var buildTeamsCalendarViewUrl = ({
|
|
|
680
711
|
};
|
|
681
712
|
|
|
682
713
|
// src/features/transcripts/logic-functions/utils/find-teams-calendar-event-ids-or-throw.ts
|
|
683
|
-
var
|
|
714
|
+
var import_guards8 = __toESM(require_build());
|
|
684
715
|
|
|
685
716
|
// src/features/transcripts/logic-functions/constants/teams-calendar-event-lookup-concurrency.ts
|
|
686
717
|
var TEAMS_CALENDAR_EVENT_LOOKUP_CONCURRENCY = 4;
|
|
@@ -695,7 +726,7 @@ var chunkIntoBatches = (items, batchSize) => Array.from(
|
|
|
695
726
|
);
|
|
696
727
|
|
|
697
728
|
// src/features/transcripts/logic-functions/utils/get-teams-calendar-event-ical-uid-or-throw.ts
|
|
698
|
-
var
|
|
729
|
+
var import_guards6 = __toESM(require_build());
|
|
699
730
|
|
|
700
731
|
// src/utils/to-error-message.ts
|
|
701
732
|
var toErrorMessage = (error) => error instanceof Error ? error.message : String(error);
|
|
@@ -710,7 +741,7 @@ var getTeamsCalendarEventICalUIdOrThrow = async ({
|
|
|
710
741
|
accessToken,
|
|
711
742
|
url: `me/events/${encodeURIComponent(eventId)}?$select=iCalUId`
|
|
712
743
|
});
|
|
713
|
-
return (0,
|
|
744
|
+
return (0, import_guards6.isNonEmptyString)(event.iCalUId) ? event.iCalUId : void 0;
|
|
714
745
|
} catch (error) {
|
|
715
746
|
if (!(error instanceof GraphRequestError)) {
|
|
716
747
|
throw error;
|
|
@@ -737,7 +768,7 @@ var groupCalendarEventIdsByKey = (entries) => {
|
|
|
737
768
|
};
|
|
738
769
|
|
|
739
770
|
// src/features/transcripts/logic-functions/utils/match-teams-calendar-event-ids.ts
|
|
740
|
-
var
|
|
771
|
+
var import_guards7 = __toESM(require_build());
|
|
741
772
|
var findUniqueCalendarEventId = (calendarEventIds) => calendarEventIds?.size === 1 ? [...calendarEventIds][0] : void 0;
|
|
742
773
|
var matchTeamsCalendarEventIds = ({
|
|
743
774
|
references,
|
|
@@ -754,7 +785,7 @@ var matchTeamsCalendarEventIds = ({
|
|
|
754
785
|
);
|
|
755
786
|
const calendarEventIdsByICalUid = groupCalendarEventIdsByKey(
|
|
756
787
|
calendarEvents.flatMap(
|
|
757
|
-
({ id, iCalUid }) => (0,
|
|
788
|
+
({ id, iCalUid }) => (0, import_guards7.isNonEmptyString)(iCalUid) ? [[iCalUid, id]] : []
|
|
758
789
|
)
|
|
759
790
|
);
|
|
760
791
|
return new Map(
|
|
@@ -778,7 +809,7 @@ var listAllNodesInBatchesOrThrow = async ({
|
|
|
778
809
|
do {
|
|
779
810
|
const connection = await fetchPage({ batch, after });
|
|
780
811
|
nodes.push(...connection?.edges.map((edge) => edge.node) ?? []);
|
|
781
|
-
after = connection?.pageInfo.hasNextPage && (0,
|
|
812
|
+
after = connection?.pageInfo.hasNextPage && (0, import_guards8.isNonEmptyString)(connection.pageInfo.endCursor) ? connection.pageInfo.endCursor : void 0;
|
|
782
813
|
} while (o(after));
|
|
783
814
|
}
|
|
784
815
|
return nodes;
|
|
@@ -810,7 +841,7 @@ var listCalendarChannelEventAssociationsOrThrow = ({
|
|
|
810
841
|
({
|
|
811
842
|
node
|
|
812
843
|
}) => {
|
|
813
|
-
if (!(0,
|
|
844
|
+
if (!(0, import_guards8.isNonEmptyString)(node.eventExternalId) || !(0, import_guards8.isNonEmptyString)(node.calendarEventId)) {
|
|
814
845
|
return [];
|
|
815
846
|
}
|
|
816
847
|
return [
|
|
@@ -916,7 +947,7 @@ var findTeamsCalendarEventIdsOrThrow = async ({
|
|
|
916
947
|
});
|
|
917
948
|
const fallbackICalUIds = [
|
|
918
949
|
...new Set(
|
|
919
|
-
iCalUIdFallbackReferences.map(({ iCalUId }) => iCalUId).filter(
|
|
950
|
+
iCalUIdFallbackReferences.map(({ iCalUId }) => iCalUId).filter(import_guards8.isNonEmptyString)
|
|
920
951
|
)
|
|
921
952
|
];
|
|
922
953
|
return matchTeamsCalendarEventIds({
|
|
@@ -930,12 +961,12 @@ var findTeamsCalendarEventIdsOrThrow = async ({
|
|
|
930
961
|
};
|
|
931
962
|
|
|
932
963
|
// src/features/transcripts/logic-functions/utils/is-transcript-during-occurrence.ts
|
|
933
|
-
var
|
|
964
|
+
var import_guards9 = __toESM(require_build());
|
|
934
965
|
var isTranscriptDuringOccurrence = ({
|
|
935
966
|
transcript,
|
|
936
967
|
occurrence
|
|
937
968
|
}) => {
|
|
938
|
-
if (!(0,
|
|
969
|
+
if (!(0, import_guards9.isNonEmptyString)(transcript.createdDateTime)) {
|
|
939
970
|
return false;
|
|
940
971
|
}
|
|
941
972
|
const createdMilliseconds = Date.parse(transcript.createdDateTime);
|
|
@@ -954,10 +985,10 @@ var findTeamsTranscriptCalendarReference = ({
|
|
|
954
985
|
};
|
|
955
986
|
|
|
956
987
|
// src/features/transcripts/logic-functions/utils/list-teams-calendar-page.ts
|
|
957
|
-
var
|
|
988
|
+
var import_guards11 = __toESM(require_build());
|
|
958
989
|
|
|
959
990
|
// src/features/transcripts/logic-functions/utils/to-teams-meeting-occurrence.ts
|
|
960
|
-
var
|
|
991
|
+
var import_guards10 = __toESM(require_build());
|
|
961
992
|
|
|
962
993
|
// src/features/transcripts/logic-functions/utils/parse-graph-utc-date-time.ts
|
|
963
994
|
var parseGraphUtcDateTime = (dateTimeTimeZone) => {
|
|
@@ -973,12 +1004,12 @@ var toTeamsMeetingOccurrence = (event) => {
|
|
|
973
1004
|
const joinWebUrl = event.onlineMeeting?.joinUrl;
|
|
974
1005
|
const startDateTime = parseGraphUtcDateTime(event.start);
|
|
975
1006
|
const endDateTime = parseGraphUtcDateTime(event.end);
|
|
976
|
-
if (!event.isOrganizer || event.isCancelled || event.onlineMeetingProvider !== "teamsForBusiness" || !(0,
|
|
1007
|
+
if (!event.isOrganizer || event.isCancelled || event.onlineMeetingProvider !== "teamsForBusiness" || !(0, import_guards10.isNonEmptyString)(joinWebUrl) || !(0, import_guards10.isNonEmptyString)(event.id) || !o(startDateTime) || !o(endDateTime)) {
|
|
977
1008
|
return void 0;
|
|
978
1009
|
}
|
|
979
|
-
const calendarReference = (0,
|
|
1010
|
+
const calendarReference = (0, import_guards10.isNonEmptyString)(event.seriesMasterId) ? { eventExternalId: event.seriesMasterId } : {
|
|
980
1011
|
eventExternalId: event.id,
|
|
981
|
-
...(0,
|
|
1012
|
+
...(0, import_guards10.isNonEmptyString)(event.iCalUId) ? { iCalUId: event.iCalUId } : {}
|
|
982
1013
|
};
|
|
983
1014
|
return { joinWebUrl, startDateTime, endDateTime, calendarReference };
|
|
984
1015
|
};
|
|
@@ -998,7 +1029,7 @@ var listTeamsCalendarPage = async ({
|
|
|
998
1029
|
});
|
|
999
1030
|
return {
|
|
1000
1031
|
occurrences,
|
|
1001
|
-
nextPageUrl: (0,
|
|
1032
|
+
nextPageUrl: (0, import_guards11.isNonEmptyString)(page["@odata.nextLink"]) ? page["@odata.nextLink"] : void 0
|
|
1002
1033
|
};
|
|
1003
1034
|
};
|
|
1004
1035
|
|
|
@@ -1070,7 +1101,7 @@ var findTeamsTranscriptCalendarEventIdOrThrow = async ({
|
|
|
1070
1101
|
meeting,
|
|
1071
1102
|
transcript
|
|
1072
1103
|
}) => {
|
|
1073
|
-
if (!(0,
|
|
1104
|
+
if (!(0, import_guards12.isNonEmptyString)(meeting.joinWebUrl) || !(0, import_guards12.isNonEmptyString)(transcript.createdDateTime)) {
|
|
1074
1105
|
return void 0;
|
|
1075
1106
|
}
|
|
1076
1107
|
const transcriptStartMilliseconds = Date.parse(transcript.createdDateTime);
|
|
@@ -1099,7 +1130,7 @@ var findTeamsTranscriptCalendarEventIdOrThrow = async ({
|
|
|
1099
1130
|
};
|
|
1100
1131
|
|
|
1101
1132
|
// src/features/transcripts/logic-functions/utils/map-teams-transcript-to-entries.ts
|
|
1102
|
-
var
|
|
1133
|
+
var import_guards13 = __toESM(require_build());
|
|
1103
1134
|
var isCueTimingLine = (line) => /^-?(?:\d+:)?\d{1,2}:\d{2}[.,]\d{1,3}\s+-->\s+-?(?:\d+:)?\d{1,2}:\d{2}[.,]\d{1,3}/.test(
|
|
1104
1135
|
line.trim()
|
|
1105
1136
|
);
|
|
@@ -1115,7 +1146,7 @@ var parseCueStartSeconds = (timingLine) => {
|
|
|
1115
1146
|
var splitIntoBlocks = (content) => {
|
|
1116
1147
|
const blocks = [[]];
|
|
1117
1148
|
for (const line of content.replace(/^/, "").split(/\r?\n/)) {
|
|
1118
|
-
if ((0,
|
|
1149
|
+
if ((0, import_guards13.isNonEmptyString)(line.trim())) {
|
|
1119
1150
|
blocks[blocks.length - 1].push(line);
|
|
1120
1151
|
} else {
|
|
1121
1152
|
blocks.push([]);
|
|
@@ -1158,12 +1189,12 @@ var toUtterance = ({
|
|
|
1158
1189
|
/<v(?:\.[^\s>]*)?\s+([^>]*)>/i.exec(cueText)?.[1] ?? ""
|
|
1159
1190
|
).trim();
|
|
1160
1191
|
const text = decodeHtmlEntities(stripCueTags(cueText)).replace(/\s+/g, " ").trim();
|
|
1161
|
-
if (!(0,
|
|
1192
|
+
if (!(0, import_guards13.isNonEmptyString)(text)) {
|
|
1162
1193
|
return void 0;
|
|
1163
1194
|
}
|
|
1164
1195
|
return {
|
|
1165
1196
|
startSeconds,
|
|
1166
|
-
speakerName: (0,
|
|
1197
|
+
speakerName: (0, import_guards13.isNonEmptyString)(speakerName) ? speakerName : void 0,
|
|
1167
1198
|
text
|
|
1168
1199
|
};
|
|
1169
1200
|
};
|
|
@@ -1345,7 +1376,7 @@ var teamsSyncTranscriptHandler = async (parameters, context) => {
|
|
|
1345
1376
|
return { success: false, error: "Teams transcripts are not enabled." };
|
|
1346
1377
|
}
|
|
1347
1378
|
const { meetingId, transcriptId } = parameters;
|
|
1348
|
-
if (!(0,
|
|
1379
|
+
if (!(0, import_guards14.isNonEmptyString)(meetingId) || !(0, import_guards14.isNonEmptyString)(transcriptId)) {
|
|
1349
1380
|
return {
|
|
1350
1381
|
success: false,
|
|
1351
1382
|
error: "meetingId and transcriptId are required."
|