@openclaw/msteams 2026.9.8 → 2026.10.1-beta.2

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.
Files changed (25) hide show
  1. package/dist/.setup/{adapter.runtime-BiWeMKXE.cjs → adapter.runtime-D0HYByze.cjs} +9 -7
  2. package/dist/.setup/{approval-handler.runtime-D1s7UR3U.cjs → approval-handler.runtime-C-RJ3wXc.cjs} +3 -3
  3. package/dist/.setup/{channel-ByzS7QJ0.cjs → channel-BFhXodl2.cjs} +61 -75
  4. package/dist/.setup/{channel.runtime-Baz8XDFs.cjs → channel.runtime-D9jrw2SN.cjs} +22 -46
  5. package/dist/.setup/{channel.setup-DL8lcWT_.cjs → channel.setup-ss0TO-ap.cjs} +30 -36
  6. package/dist/.setup/{conversation-store-state-B7JuyZTm.cjs → conversation-store-state-f7V8CVNy.cjs} +62 -128
  7. package/dist/.setup/{monitor-BJ7IyH4y.cjs → monitor-DfSPCRkk.cjs} +71 -171
  8. package/dist/.setup/{oauth-DQjOnJ4l.cjs → oauth-CYxMYIOQ.cjs} +1 -1
  9. package/dist/.setup/{reaction-types-CQ4oSUe7.cjs → reaction-types-B-GEv57k.cjs} +1 -1
  10. package/dist/.setup/{resolve-allowlist-Pl_NQFYH.cjs → resolve-allowlist-Ct9yxQUw.cjs} +16 -134
  11. package/dist/.setup/{send-VUM7Sryb.cjs → send-7VV1iCai.cjs} +24 -70
  12. package/dist/.setup/{setup-plugin-api-Dyf8kF-l.cjs → setup-plugin-api-B0OFG32J.cjs} +1 -1
  13. package/dist/.setup/{thread-session--rw3BTal.cjs → thread-session-ClI-lSyG.cjs} +1 -1
  14. package/dist/.setup/token-config-DOt3XwVa.cjs +139 -0
  15. package/dist/api.cjs +2 -2
  16. package/dist/channel-plugin-api.cjs +1 -1
  17. package/dist/directory-contract-api.cjs +3 -2
  18. package/dist/doctor-backup-resources.cjs +21 -0
  19. package/dist/doctor-contract-api.cjs +37 -19
  20. package/dist/qa-runner-api.cjs +1 -1
  21. package/dist/runtime-api.cjs +0 -20
  22. package/dist/setup-entry.cjs +1 -1
  23. package/dist/setup-plugin-api.cjs +1 -1
  24. package/package.json +4 -4
  25. package/dist/.setup/delegated-state-u-ywZyZT.cjs +0 -70
@@ -1,11 +1,12 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_resolve_allowlist = require("./.setup/resolve-allowlist-Pl_NQFYH.cjs");
2
+ const require_resolve_allowlist = require("./.setup/resolve-allowlist-Ct9yxQUw.cjs");
3
+ const require_token_config = require("./.setup/token-config-DOt3XwVa.cjs");
3
4
  let openclaw_plugin_sdk_directory_runtime = require("openclaw/plugin-sdk/directory-runtime");
4
5
  const msteamsDirectoryContractPlugin = {
5
6
  id: "msteams",
6
7
  directory: {
7
8
  self: async ({ cfg }) => {
8
- const creds = require_resolve_allowlist.resolveMSTeamsCredentials(cfg.channels?.msteams);
9
+ const creds = require_token_config.resolveMSTeamsCredentials(cfg.channels?.msteams);
9
10
  return creds ? {
10
11
  kind: "user",
11
12
  id: creds.appId,
@@ -0,0 +1,21 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_rolldown_runtime = require("./.setup/rolldown-runtime-BloeesfJ.cjs");
3
+ let node_path = require("node:path");
4
+ node_path = require_rolldown_runtime.__toESM(node_path, 1);
5
+ //#region extensions/msteams/doctor-backup-resources.ts
6
+ function stateFileArchiveDirectory(filePath) {
7
+ return `${filePath}.archives`;
8
+ }
9
+ function stateFileBackupResources(stateDir, filename) {
10
+ const filePath = node_path.default.join(stateDir, filename);
11
+ return [{
12
+ path: filePath,
13
+ kind: "file"
14
+ }, {
15
+ path: stateFileArchiveDirectory(filePath),
16
+ kind: "directory"
17
+ }];
18
+ }
19
+ //#endregion
20
+ exports.stateFileArchiveDirectory = stateFileArchiveDirectory;
21
+ exports.stateFileBackupResources = stateFileBackupResources;
@@ -1,12 +1,13 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_rolldown_runtime = require("./.setup/rolldown-runtime-BloeesfJ.cjs");
3
- const require_delegated_state = require("./.setup/delegated-state-u-ywZyZT.cjs");
3
+ const require_token_config = require("./.setup/token-config-DOt3XwVa.cjs");
4
+ const require_doctor_backup_resources = require("./doctor-backup-resources.cjs");
4
5
  let openclaw_plugin_sdk_string_coerce_runtime = require("openclaw/plugin-sdk/string-coerce-runtime");
5
6
  let openclaw_plugin_sdk_error_runtime = require("openclaw/plugin-sdk/error-runtime");
6
- let node_fs_promises = require("node:fs/promises");
7
- node_fs_promises = require_rolldown_runtime.__toESM(node_fs_promises, 1);
8
7
  let node_path = require("node:path");
9
8
  node_path = require_rolldown_runtime.__toESM(node_path, 1);
9
+ let node_fs_promises = require("node:fs/promises");
10
+ node_fs_promises = require_rolldown_runtime.__toESM(node_fs_promises, 1);
10
11
  let openclaw_plugin_sdk_session_store_paths = require("openclaw/plugin-sdk/session-store-paths");
11
12
  //#region packages/normalization-core/src/record-coerce.ts
12
13
  /** Type guard for non-array object records at browser-safe boundaries. */
@@ -108,6 +109,12 @@ function createLegacyWebhookListenerDoctorContract(params) {
108
109
  };
109
110
  const prefix = `channels.${params.channelKey}`;
110
111
  return {
112
+ historicalWebhookListener: {
113
+ channelId: params.channelKey,
114
+ port: params.defaultPort,
115
+ preserveAuthoredActivation: params.preserveAuthoredActivation,
116
+ ...params.defaultHost === void 0 ? {} : { host: params.defaultHost }
117
+ },
111
118
  legacyConfigRules: [{
112
119
  path: ["channels", params.channelKey],
113
120
  message: `${prefix} webhook listeners moved to Gateway routes. Run "openclaw doctor --fix" to preserve explicitly configured listener settings as legacyWebhook.`,
@@ -170,8 +177,10 @@ const webhookMigration = createLegacyWebhookListenerDoctorContract({
170
177
  defaultPort: 3978,
171
178
  webhookKey: "webhook",
172
179
  portKey: "port",
173
- hostKey: null
180
+ hostKey: null,
181
+ preserveAuthoredActivation: true
174
182
  });
183
+ const { historicalWebhookListener } = webhookMigration;
175
184
  const streamingAliasMigration = (0, runtime_doctor_migrations_exports.defineChannelAliasMigration)({
176
185
  channelId: "msteams",
177
186
  streaming: { defaultMode: "partial" }
@@ -179,20 +188,25 @@ const streamingAliasMigration = (0, runtime_doctor_migrations_exports.defineChan
179
188
  const legacyConfigRules = [...webhookMigration.legacyConfigRules, ...streamingAliasMigration.legacyConfigRules];
180
189
  function normalizeCompatibilityConfig({ cfg }) {
181
190
  const webhook = webhookMigration.normalizeCompatibilityConfig({ cfg });
182
- return streamingAliasMigration.normalizeChannelConfig({
183
- cfg: webhook.config,
184
- changes: webhook.changes
185
- });
191
+ return {
192
+ ...streamingAliasMigration.normalizeChannelConfig({
193
+ cfg: webhook.config,
194
+ changes: webhook.changes
195
+ }),
196
+ historicalWebhookAccountIds: cfg.channels?.msteams === void 0 && !require_token_config.resolveMSTeamsCredentials() ? null : cfg.channels?.msteams?.enabled === false ? [] : [void 0]
197
+ };
186
198
  }
187
199
  //#endregion
188
200
  //#region extensions/msteams/doctor-contract-api.ts
189
201
  const MSTEAMS_PLUGIN_ID = "Microsoft Teams";
190
202
  function listAgentIds(config) {
191
203
  const ids = /* @__PURE__ */ new Set(["main"]);
192
- if ((0, openclaw_plugin_sdk_string_coerce_runtime.isRecord)(config.agents?.entries)) {
193
- for (const agentId of Object.keys(config.agents.entries)) if (agentId.trim()) ids.add(agentId.trim());
204
+ const agents = (0, openclaw_plugin_sdk_string_coerce_runtime.isRecord)(config) && (0, openclaw_plugin_sdk_string_coerce_runtime.isRecord)(config.agents) ? config.agents : void 0;
205
+ if ((0, openclaw_plugin_sdk_string_coerce_runtime.isRecord)(agents?.entries)) {
206
+ for (const agentId of Object.keys(agents.entries)) if (agentId.trim()) ids.add(agentId.trim());
194
207
  }
195
- for (const agent of config.agents?.list ?? []) if (typeof agent.id === "string" && agent.id.trim()) ids.add(agent.id.trim());
208
+ const legacyList = Object.prototype.propertyIsEnumerable.call(agents ?? {}, "list") && Array.isArray(agents?.list) ? agents.list : [];
209
+ for (const agent of legacyList) if ((0, openclaw_plugin_sdk_string_coerce_runtime.isRecord)(agent) && typeof agent.id === "string" && agent.id.trim()) ids.add(agent.id.trim());
196
210
  return [...ids];
197
211
  }
198
212
  function listCandidateStorePaths(params) {
@@ -225,6 +239,7 @@ function retiredJsonMigration(name, label, hasSource) {
225
239
  return {
226
240
  id: `msteams-${name}-json-to-plugin-state`,
227
241
  label: `Microsoft Teams ${label}`,
242
+ collectBackupResources: () => [],
228
243
  async detectLegacyState(params) {
229
244
  return await hasSource(params) ? { preview: [guidance] } : null;
230
245
  },
@@ -243,10 +258,11 @@ const stateMigrations = [
243
258
  {
244
259
  id: "msteams-delegated-token-json-to-plugin-state",
245
260
  label: "Microsoft Teams delegated OAuth token",
261
+ collectBackupResources: ({ stateDir }) => require_doctor_backup_resources.stateFileBackupResources(stateDir, require_token_config.MSTEAMS_DELEGATED_TOKEN_LEGACY_FILENAME),
246
262
  async detectLegacyState(params) {
247
- const filePath = node_path.default.join(params.stateDir, require_delegated_state.MSTEAMS_DELEGATED_TOKEN_LEGACY_FILENAME);
263
+ const filePath = node_path.default.join(params.stateDir, require_token_config.MSTEAMS_DELEGATED_TOKEN_LEGACY_FILENAME);
248
264
  try {
249
- return (await node_fs_promises.default.stat(filePath)).isFile() ? { preview: [`- ${MSTEAMS_PLUGIN_ID} delegated OAuth token -> plugin state (${require_delegated_state.MSTEAMS_DELEGATED_TOKEN_NAMESPACE})`] } : null;
265
+ return (await node_fs_promises.default.stat(filePath)).isFile() ? { preview: [`- ${MSTEAMS_PLUGIN_ID} delegated OAuth token -> plugin state (${require_token_config.MSTEAMS_DELEGATED_TOKEN_NAMESPACE})`] } : null;
250
266
  } catch {
251
267
  return null;
252
268
  }
@@ -254,10 +270,10 @@ const stateMigrations = [
254
270
  async migrateLegacyState(params) {
255
271
  const changes = [];
256
272
  const warnings = [];
257
- const filePath = node_path.default.join(params.stateDir, require_delegated_state.MSTEAMS_DELEGATED_TOKEN_LEGACY_FILENAME);
273
+ const filePath = node_path.default.join(params.stateDir, require_token_config.MSTEAMS_DELEGATED_TOKEN_LEGACY_FILENAME);
258
274
  let token;
259
275
  try {
260
- token = require_delegated_state.normalizeMSTeamsDelegatedTokens(JSON.parse(await node_fs_promises.default.readFile(filePath, "utf8")));
276
+ token = require_token_config.normalizeMSTeamsDelegatedTokens(JSON.parse(await node_fs_promises.default.readFile(filePath, "utf8")));
261
277
  } catch (error) {
262
278
  if (error.code === "ENOENT") return {
263
279
  changes,
@@ -277,11 +293,11 @@ const stateMigrations = [
277
293
  };
278
294
  }
279
295
  const store = params.context.openPluginStateKeyedStore({
280
- namespace: require_delegated_state.MSTEAMS_DELEGATED_TOKEN_NAMESPACE,
296
+ namespace: require_token_config.MSTEAMS_DELEGATED_TOKEN_NAMESPACE,
281
297
  maxEntries: 1,
282
298
  overflowPolicy: "reject-new"
283
299
  });
284
- const existing = await store.lookup(require_delegated_state.MSTEAMS_DELEGATED_TOKEN_KEY);
300
+ const existing = await store.lookup(require_token_config.MSTEAMS_DELEGATED_TOKEN_KEY);
285
301
  if (existing && JSON.stringify(existing) !== JSON.stringify(token)) {
286
302
  warnings.push(`Kept existing ${MSTEAMS_PLUGIN_ID} delegated OAuth token in plugin state; left differing legacy source in place`);
287
303
  return {
@@ -290,7 +306,7 @@ const stateMigrations = [
290
306
  };
291
307
  }
292
308
  if (!existing) try {
293
- await store.registerIfAbsent(require_delegated_state.MSTEAMS_DELEGATED_TOKEN_KEY, token);
309
+ await store.registerIfAbsent(require_token_config.MSTEAMS_DELEGATED_TOKEN_KEY, token);
294
310
  } catch (error) {
295
311
  warnings.push(`Failed importing ${MSTEAMS_PLUGIN_ID} delegated OAuth token: ${String(error)}; left legacy source in place`);
296
312
  return {
@@ -298,7 +314,7 @@ const stateMigrations = [
298
314
  warnings
299
315
  };
300
316
  }
301
- const persisted = require_delegated_state.normalizeMSTeamsDelegatedTokens(await store.lookup(require_delegated_state.MSTEAMS_DELEGATED_TOKEN_KEY));
317
+ const persisted = require_token_config.normalizeMSTeamsDelegatedTokens(await store.lookup(require_token_config.MSTEAMS_DELEGATED_TOKEN_KEY));
302
318
  if (!persisted || JSON.stringify(persisted) !== JSON.stringify(token)) {
303
319
  warnings.push(`Failed verifying ${MSTEAMS_PLUGIN_ID} delegated OAuth token in plugin state; left legacy source in place`);
304
320
  return {
@@ -309,6 +325,7 @@ const stateMigrations = [
309
325
  changes.push(`Migrated ${MSTEAMS_PLUGIN_ID} delegated OAuth token -> plugin state`);
310
326
  await (0, runtime_doctor_migrations_exports.archiveLegacyStateSource)({
311
327
  filePath,
328
+ archiveDirectory: require_doctor_backup_resources.stateFileArchiveDirectory(filePath),
312
329
  label: `${MSTEAMS_PLUGIN_ID} delegated OAuth token`,
313
330
  changes,
314
331
  warnings
@@ -322,6 +339,7 @@ const stateMigrations = [
322
339
  retiredJsonMigration("feedback-learnings", "feedback learnings", hasRetiredLearnings)
323
340
  ];
324
341
  //#endregion
342
+ exports.historicalWebhookListener = historicalWebhookListener;
325
343
  exports.legacyConfigRules = legacyConfigRules;
326
344
  exports.normalizeCompatibilityConfig = normalizeCompatibilityConfig;
327
345
  exports.stateMigrations = stateMigrations;
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  let openclaw_plugin_sdk_qa_runner_runtime = require("openclaw/plugin-sdk/qa-runner-runtime");
3
3
  //#region extensions/msteams/src/qa/cli.ts
4
4
  const DEFAULT_MSTEAMS_QA_SCENARIOS = ["channel-canary"];
5
- const loadMSTeamsQaAdapterRuntime = (0, openclaw_plugin_sdk_qa_runner_runtime.createLazyCliRuntimeLoader)(() => Promise.resolve().then(() => require("./.setup/adapter.runtime-BiWeMKXE.cjs")));
5
+ const loadMSTeamsQaAdapterRuntime = (0, openclaw_plugin_sdk_qa_runner_runtime.createLazyCliRuntimeLoader)(() => Promise.resolve().then(() => require("./.setup/adapter.runtime-D0HYByze.cjs")));
6
6
  async function runQaMSTeams(options) {
7
7
  await (0, openclaw_plugin_sdk_qa_runner_runtime.runLiveTransportQaSuiteCommand)({
8
8
  channelId: "msteams",
@@ -2,14 +2,12 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_runtime = require("./.setup/runtime-gZTAuFux.cjs");
3
3
  let openclaw_plugin_sdk_channel_outbound = require("openclaw/plugin-sdk/channel-outbound");
4
4
  let openclaw_plugin_sdk_channel_pairing = require("openclaw/plugin-sdk/channel-pairing");
5
- let openclaw_plugin_sdk_channel_policy = require("openclaw/plugin-sdk/channel-policy");
6
5
  let openclaw_plugin_sdk_allow_from = require("openclaw/plugin-sdk/allow-from");
7
6
  let openclaw_plugin_sdk_account_id = require("openclaw/plugin-sdk/account-id");
8
7
  let openclaw_plugin_sdk_channel_status = require("openclaw/plugin-sdk/channel-status");
9
8
  let openclaw_plugin_sdk_channel_targets = require("openclaw/plugin-sdk/channel-targets");
10
9
  let openclaw_plugin_sdk_dangerous_name_runtime = require("openclaw/plugin-sdk/dangerous-name-runtime");
11
10
  let openclaw_plugin_sdk_runtime_group_policy = require("openclaw/plugin-sdk/runtime-group-policy");
12
- let openclaw_plugin_sdk_file_lock = require("openclaw/plugin-sdk/file-lock");
13
11
  let openclaw_plugin_sdk_media_runtime = require("openclaw/plugin-sdk/media-runtime");
14
12
  let openclaw_plugin_sdk_account_helpers = require("openclaw/plugin-sdk/account-helpers");
15
13
  let openclaw_plugin_sdk_outbound_media = require("openclaw/plugin-sdk/outbound-media");
@@ -144,12 +142,6 @@ Object.defineProperty(exports, "normalizeStringEntries", {
144
142
  return openclaw_plugin_sdk_string_normalization_runtime.normalizeStringEntries;
145
143
  }
146
144
  });
147
- Object.defineProperty(exports, "resolveAllowlistMatchSimple", {
148
- enumerable: true,
149
- get: function() {
150
- return openclaw_plugin_sdk_allow_from.resolveAllowlistMatchSimple;
151
- }
152
- });
153
145
  Object.defineProperty(exports, "resolveChannelEntryMatchWithFallback", {
154
146
  enumerable: true,
155
147
  get: function() {
@@ -174,12 +166,6 @@ Object.defineProperty(exports, "resolveNestedAllowlistDecision", {
174
166
  return openclaw_plugin_sdk_channel_targets.resolveNestedAllowlistDecision;
175
167
  }
176
168
  });
177
- Object.defineProperty(exports, "resolveToolsBySender", {
178
- enumerable: true,
179
- get: function() {
180
- return openclaw_plugin_sdk_channel_policy.resolveToolsBySender;
181
- }
182
- });
183
169
  exports.setMSTeamsRuntime = require_runtime.setMSTeamsRuntime;
184
170
  Object.defineProperty(exports, "summarizeMapping", {
185
171
  enumerable: true,
@@ -187,9 +173,3 @@ Object.defineProperty(exports, "summarizeMapping", {
187
173
  return openclaw_plugin_sdk_allow_from.summarizeMapping;
188
174
  }
189
175
  });
190
- Object.defineProperty(exports, "withFileLock", {
191
- enumerable: true,
192
- get: function() {
193
- return openclaw_plugin_sdk_file_lock.withFileLock;
194
- }
195
- });
@@ -4,7 +4,7 @@ let node_url = require("node:url");
4
4
  var setup_entry_default = (0, openclaw_plugin_sdk_channel_entry_contract.defineBundledChannelSetupEntry)({
5
5
  importMetaUrl: require("url").pathToFileURL(__filename).href,
6
6
  plugin: {
7
- specifier: (0, node_url.fileURLToPath)(new URL(".setup/setup-plugin-api-Dyf8kF-l.cjs", require("url").pathToFileURL(__filename).href).href),
7
+ specifier: (0, node_url.fileURLToPath)(new URL(".setup/setup-plugin-api-B0OFG32J.cjs", require("url").pathToFileURL(__filename).href).href),
8
8
  exportName: "msteamsSetupPlugin"
9
9
  },
10
10
  secrets: {
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_channel_setup = require("./.setup/channel.setup-DL8lcWT_.cjs");
2
+ const require_channel_setup = require("./.setup/channel.setup-ss0TO-ap.cjs");
3
3
  exports.msteamsSetupPlugin = require_channel_setup.msteamsSetupPlugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/msteams",
3
- "version": "2026.9.8",
3
+ "version": "2026.10.1-beta.2",
4
4
  "description": "OpenClaw Microsoft Teams channel plugin for bot conversations.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,7 +22,7 @@
22
22
  "openclaw": "workspace:*"
23
23
  },
24
24
  "peerDependencies": {
25
- "openclaw": ">=2026.9.8"
25
+ "openclaw": ">=2026.10.1-beta.2"
26
26
  },
27
27
  "peerDependenciesMeta": {
28
28
  "openclaw": {
@@ -73,10 +73,10 @@
73
73
  "minHostVersion": ">=2026.4.10"
74
74
  },
75
75
  "compat": {
76
- "pluginApi": ">=2026.9.8"
76
+ "pluginApi": ">=2026.10.1-beta.2"
77
77
  },
78
78
  "build": {
79
- "openclawVersion": "2026.9.8",
79
+ "openclawVersion": "2026.10.1-beta.2",
80
80
  "runtimeFormat": "cjs"
81
81
  },
82
82
  "release": {
@@ -1,70 +0,0 @@
1
- const require_runtime = require("./runtime-gZTAuFux.cjs");
2
- //#region extensions/msteams/src/delegated-state.ts
3
- const MSTEAMS_DELEGATED_TOKEN_LEGACY_FILENAME = "msteams-delegated.json";
4
- const MSTEAMS_DELEGATED_TOKEN_NAMESPACE = "delegated-token";
5
- const MSTEAMS_DELEGATED_TOKEN_KEY = "current";
6
- function openDelegatedTokenStore(env) {
7
- return require_runtime.getMSTeamsRuntime().state.openKeyedStore({
8
- namespace: MSTEAMS_DELEGATED_TOKEN_NAMESPACE,
9
- maxEntries: 1,
10
- overflowPolicy: "reject-new",
11
- ...env ? { env } : {}
12
- });
13
- }
14
- function normalizeMSTeamsDelegatedTokens(value) {
15
- if (!value || typeof value !== "object") return null;
16
- const token = value;
17
- if (typeof token.accessToken !== "string" || !token.accessToken || typeof token.refreshToken !== "string" || !token.refreshToken || typeof token.expiresAt !== "number" || !Number.isFinite(token.expiresAt) || !Array.isArray(token.scopes) || !token.scopes.every((scope) => typeof scope === "string" && scope.length > 0)) return null;
18
- return {
19
- accessToken: token.accessToken,
20
- refreshToken: token.refreshToken,
21
- expiresAt: token.expiresAt,
22
- scopes: [...token.scopes],
23
- ...typeof token.userPrincipalName === "string" ? { userPrincipalName: token.userPrincipalName } : {}
24
- };
25
- }
26
- async function loadMSTeamsDelegatedTokens(env) {
27
- return normalizeMSTeamsDelegatedTokens(await openDelegatedTokenStore(env).lookup("current")) ?? void 0;
28
- }
29
- async function saveMSTeamsDelegatedTokens(tokens, env) {
30
- const normalized = normalizeMSTeamsDelegatedTokens(tokens);
31
- if (!normalized) throw new Error("Invalid Microsoft Teams delegated token payload");
32
- await openDelegatedTokenStore(env).register(MSTEAMS_DELEGATED_TOKEN_KEY, normalized);
33
- }
34
- //#endregion
35
- Object.defineProperty(exports, "MSTEAMS_DELEGATED_TOKEN_KEY", {
36
- enumerable: true,
37
- get: function() {
38
- return MSTEAMS_DELEGATED_TOKEN_KEY;
39
- }
40
- });
41
- Object.defineProperty(exports, "MSTEAMS_DELEGATED_TOKEN_LEGACY_FILENAME", {
42
- enumerable: true,
43
- get: function() {
44
- return MSTEAMS_DELEGATED_TOKEN_LEGACY_FILENAME;
45
- }
46
- });
47
- Object.defineProperty(exports, "MSTEAMS_DELEGATED_TOKEN_NAMESPACE", {
48
- enumerable: true,
49
- get: function() {
50
- return MSTEAMS_DELEGATED_TOKEN_NAMESPACE;
51
- }
52
- });
53
- Object.defineProperty(exports, "loadMSTeamsDelegatedTokens", {
54
- enumerable: true,
55
- get: function() {
56
- return loadMSTeamsDelegatedTokens;
57
- }
58
- });
59
- Object.defineProperty(exports, "normalizeMSTeamsDelegatedTokens", {
60
- enumerable: true,
61
- get: function() {
62
- return normalizeMSTeamsDelegatedTokens;
63
- }
64
- });
65
- Object.defineProperty(exports, "saveMSTeamsDelegatedTokens", {
66
- enumerable: true,
67
- get: function() {
68
- return saveMSTeamsDelegatedTokens;
69
- }
70
- });