n8n-nodes-microsoft-teams-bot 1.0.6 → 1.0.8
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/credentials/TeamsBotApi.credentials.d.ts +3 -1
- package/dist/credentials/TeamsBotApi.credentials.js +40 -9
- package/dist/credentials/TeamsBotApi.credentials.js.map +1 -1
- package/dist/nodes/TeamsBot/TeamsBot.node.d.ts +4 -8
- package/dist/nodes/TeamsBot/TeamsBot.node.js +131 -64
- package/dist/nodes/TeamsBot/TeamsBot.node.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import type { ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
1
|
+
import type { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
2
|
export declare class TeamsBotApi implements ICredentialType {
|
|
3
3
|
name: string;
|
|
4
4
|
displayName: string;
|
|
5
5
|
documentationUrl: string;
|
|
6
|
+
authenticate: IAuthenticateGeneric;
|
|
7
|
+
test: ICredentialTestRequest;
|
|
6
8
|
properties: INodeProperties[];
|
|
7
9
|
}
|
|
@@ -6,14 +6,42 @@ class TeamsBotApi {
|
|
|
6
6
|
this.name = 'teamsBotApi';
|
|
7
7
|
this.displayName = 'Teams Bot API';
|
|
8
8
|
this.documentationUrl = 'https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-authentication';
|
|
9
|
+
// Authentication configuration for Bot Framework API
|
|
10
|
+
this.authenticate = {
|
|
11
|
+
type: 'generic',
|
|
12
|
+
properties: {
|
|
13
|
+
headers: {
|
|
14
|
+
Authorization: '={{$credentials.botToken}}',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
// Basic test - validates Bot Framework credentials
|
|
19
|
+
// Complex testing (Bot Framework + Graph API) is done via testedBy in the node
|
|
20
|
+
this.test = {
|
|
21
|
+
request: {
|
|
22
|
+
baseURL: 'https://login.microsoftonline.com/botframework.com/oauth2/v2.0',
|
|
23
|
+
url: '/token',
|
|
24
|
+
method: 'POST',
|
|
25
|
+
headers: {
|
|
26
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
27
|
+
},
|
|
28
|
+
body: {
|
|
29
|
+
grant_type: 'client_credentials',
|
|
30
|
+
client_id: '={{$credentials.botId}}',
|
|
31
|
+
client_secret: '={{$credentials.botSecret}}',
|
|
32
|
+
scope: 'https://api.botframework.com/.default',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
};
|
|
9
36
|
this.properties = [
|
|
37
|
+
// ===== Section 1: Bot Framework SDK v4 Authentication =====
|
|
10
38
|
{
|
|
11
39
|
displayName: 'Bot ID (Microsoft App ID)',
|
|
12
40
|
name: 'botId',
|
|
13
41
|
type: 'string',
|
|
14
42
|
default: '',
|
|
15
43
|
required: true,
|
|
16
|
-
description: 'The Microsoft App ID
|
|
44
|
+
description: 'The Microsoft App ID from your Azure Bot Service or Bot Channel Registration. Used for Bot Framework SDK v4 authentication to send messages and cards. Note: This can be the same as the Graph API Client ID below if using a single Azure AD app registration for both services (recommended for simpler setup).',
|
|
17
45
|
},
|
|
18
46
|
{
|
|
19
47
|
displayName: 'Bot Secret',
|
|
@@ -24,7 +52,7 @@ class TeamsBotApi {
|
|
|
24
52
|
},
|
|
25
53
|
default: '',
|
|
26
54
|
required: true,
|
|
27
|
-
description: 'The
|
|
55
|
+
description: 'The client secret for your Bot Framework app registration. Used for Bot Framework SDK v4 authentication. Note: This can be the same as the Graph API Client Secret below if using a single Azure AD app registration.',
|
|
28
56
|
},
|
|
29
57
|
{
|
|
30
58
|
displayName: 'Service URL',
|
|
@@ -61,16 +89,17 @@ class TeamsBotApi {
|
|
|
61
89
|
allowCustomValue: true
|
|
62
90
|
},
|
|
63
91
|
default: 'https://smba.trafficmanager.net/amer/',
|
|
64
|
-
description: 'The service URL for Bot Framework API. Region-specific URLs are required for v3 endpoints.
|
|
92
|
+
description: 'The regional service URL for Bot Framework API. Region-specific URLs are required for v3 endpoints. Select the URL matching your Microsoft Teams tenant region.',
|
|
65
93
|
placeholder: 'https://smba.trafficmanager.net/amer/',
|
|
66
94
|
required: true,
|
|
67
95
|
},
|
|
96
|
+
// ===== Section 2: Microsoft Graph API Authentication =====
|
|
68
97
|
{
|
|
69
98
|
displayName: 'Azure AD App (Client) ID',
|
|
70
99
|
name: 'clientId',
|
|
71
100
|
type: 'string',
|
|
72
101
|
default: '',
|
|
73
|
-
description: 'The
|
|
102
|
+
description: 'The Application (Client) ID from your Azure AD app registration for Graph API operations. Used for bot installation and Graph API queries. Note: This can be the same as the Bot ID above if using a single Azure AD app registration for both services (recommended for simpler setup).',
|
|
74
103
|
required: true,
|
|
75
104
|
},
|
|
76
105
|
{
|
|
@@ -78,7 +107,7 @@ class TeamsBotApi {
|
|
|
78
107
|
name: 'tenantId',
|
|
79
108
|
type: 'string',
|
|
80
109
|
default: '',
|
|
81
|
-
description: 'The
|
|
110
|
+
description: 'The Directory (Tenant) ID from your Azure AD app registration. Required for Graph API authentication. Find this in the Azure Portal under your app registration\'s Overview page.',
|
|
82
111
|
required: true,
|
|
83
112
|
},
|
|
84
113
|
{
|
|
@@ -89,23 +118,25 @@ class TeamsBotApi {
|
|
|
89
118
|
password: true,
|
|
90
119
|
},
|
|
91
120
|
default: '',
|
|
92
|
-
description: 'The client secret
|
|
121
|
+
description: 'The client secret for your Graph API app registration. Used for Graph API authentication. Note: This can be the same as the Bot Secret above if using a single Azure AD app registration.',
|
|
93
122
|
required: true,
|
|
94
123
|
},
|
|
124
|
+
// ===== Section 3: Teams App Configuration =====
|
|
95
125
|
{
|
|
96
126
|
displayName: 'Teams App ID',
|
|
97
127
|
name: 'teamsAppId',
|
|
98
128
|
type: 'string',
|
|
99
129
|
default: '',
|
|
100
|
-
description: 'The ID of your Microsoft Teams app package. Required for bot installation operations. This is different from the Bot ID/App ID and is found in your Teams app manifest.',
|
|
130
|
+
description: 'The ID of your Microsoft Teams app package. Required for bot installation operations. This is different from the Bot ID/App ID and is found in your Teams app manifest.json file. Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
|
|
101
131
|
required: true,
|
|
102
132
|
},
|
|
133
|
+
// ===== Section 4: Optional - Encryption Certificates =====
|
|
103
134
|
{
|
|
104
135
|
displayName: 'Certificate Thumbprint',
|
|
105
136
|
name: 'certificateThumbprint',
|
|
106
137
|
type: 'string',
|
|
107
138
|
default: '',
|
|
108
|
-
description: 'Optional:
|
|
139
|
+
description: 'Optional: Required only if using encrypted Graph API webhook notifications with \'includeResourceData: true\'. Leave empty for standard operations. This is the SHA-1 thumbprint of your X.509 certificate.',
|
|
109
140
|
},
|
|
110
141
|
{
|
|
111
142
|
displayName: 'Certificate (PEM Format)',
|
|
@@ -115,7 +146,7 @@ class TeamsBotApi {
|
|
|
115
146
|
multiline: true,
|
|
116
147
|
},
|
|
117
148
|
default: '',
|
|
118
|
-
description: 'Optional:
|
|
149
|
+
description: 'Optional: Required only if using encrypted Graph API webhook notifications. Leave empty for standard operations. Paste your X.509 certificate in PEM format (including BEGIN/END CERTIFICATE lines).',
|
|
119
150
|
},
|
|
120
151
|
];
|
|
121
152
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TeamsBotApi.credentials.js","sourceRoot":"","sources":["../../credentials/TeamsBotApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,WAAW;IAAxB;QACC,SAAI,GAAG,aAAa,CAAC;QACrB,gBAAW,GAAG,eAAe,CAAC;QAC9B,qBAAgB,GAAG,0GAA0G,CAAC;
|
|
1
|
+
{"version":3,"file":"TeamsBotApi.credentials.js","sourceRoot":"","sources":["../../credentials/TeamsBotApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,WAAW;IAAxB;QACC,SAAI,GAAG,aAAa,CAAC;QACrB,gBAAW,GAAG,eAAe,CAAC;QAC9B,qBAAgB,GAAG,0GAA0G,CAAC;QAE9H,qDA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;gBAC7B,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,6MAA6M;aAC1N;YACD;gBACC,WAAW,EAAE,0BAA0B;gBACvC,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,SAAS,EAAE,IAAI;iBACf;gBACD,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,sMAAsM;aACnN;SACD,CAAC;IAGH,CAAC;CAAA;AAxJD,kCAwJC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IExecuteFunctions, INodeType, INodeTypeDescription, INodeTypeBaseDescription, INodeExecutionData } from 'n8n-workflow';
|
|
1
|
+
import type { IExecuteFunctions, ICredentialTestFunctions, ICredentialsDecrypted, INodeCredentialTestResult, INodeType, INodeTypeDescription, INodeTypeBaseDescription, INodeExecutionData } from 'n8n-workflow';
|
|
2
2
|
import * as listSearch from './methods/listSearch';
|
|
3
3
|
export declare class TeamsBot implements INodeType {
|
|
4
4
|
description: INodeTypeDescription;
|
|
@@ -9,13 +9,9 @@ export declare class TeamsBot implements INodeType {
|
|
|
9
9
|
private getCardBuilderFields;
|
|
10
10
|
methods: {
|
|
11
11
|
listSearch: typeof listSearch;
|
|
12
|
+
credentialTest: {
|
|
13
|
+
teamsBotApiTest(this: ICredentialTestFunctions, credential: ICredentialsDecrypted): Promise<INodeCredentialTestResult>;
|
|
14
|
+
};
|
|
12
15
|
};
|
|
13
16
|
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
14
17
|
}
|
|
15
|
-
/**
|
|
16
|
-
* Test the Teams Bot API credentials
|
|
17
|
-
*/
|
|
18
|
-
export declare function testTeamsBotApiAuth(this: IExecuteFunctions): Promise<{
|
|
19
|
-
status: 'Error' | 'OK';
|
|
20
|
-
message: string;
|
|
21
|
-
}>;
|
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
26
|
+
exports.TeamsBot = void 0;
|
|
27
27
|
const router_1 = require("./actions/router");
|
|
28
28
|
const listSearch = __importStar(require("./methods/listSearch"));
|
|
29
29
|
const message_description_1 = require("./descriptions/message.description");
|
|
@@ -33,6 +33,135 @@ class TeamsBot {
|
|
|
33
33
|
constructor(baseDescription) {
|
|
34
34
|
this.methods = {
|
|
35
35
|
listSearch,
|
|
36
|
+
credentialTest: {
|
|
37
|
+
async teamsBotApiTest(credential) {
|
|
38
|
+
const credentials = credential.data;
|
|
39
|
+
if (!credentials) {
|
|
40
|
+
return {
|
|
41
|
+
status: 'Error',
|
|
42
|
+
message: 'No credentials provided',
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
// Basic validation of required fields
|
|
46
|
+
const { botId, botSecret, serviceUrl, clientId, tenantId, clientSecret, teamsAppId } = credentials;
|
|
47
|
+
if (!botId || !botSecret || !serviceUrl || !clientId || !tenantId || !clientSecret || !teamsAppId) {
|
|
48
|
+
return {
|
|
49
|
+
status: 'Error',
|
|
50
|
+
message: 'All credential fields are required. Please ensure Bot ID, Bot Secret, Service URL, Client ID, Tenant ID, Client Secret, and Teams App ID are all filled in.',
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
// Enhanced format validation with better error messages
|
|
54
|
+
const guidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{3}-[0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
55
|
+
const serviceUrlRegex = /^https:\/\/smba\.trafficmanager\.net\/[a-z]+\/$/;
|
|
56
|
+
if (!guidRegex.test(String(botId))) {
|
|
57
|
+
return {
|
|
58
|
+
status: 'Error',
|
|
59
|
+
message: 'Bot ID must be a valid GUID (format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). Find this in your Azure Bot Service or Bot Channel Registration.',
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
if (!guidRegex.test(String(clientId))) {
|
|
63
|
+
return {
|
|
64
|
+
status: 'Error',
|
|
65
|
+
message: 'Client ID must be a valid GUID (format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). Find this in your Azure AD app registration Overview page.',
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
if (!guidRegex.test(String(tenantId))) {
|
|
69
|
+
return {
|
|
70
|
+
status: 'Error',
|
|
71
|
+
message: 'Tenant ID must be a valid GUID (format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). Find this in your Azure AD app registration Overview page.',
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
if (!serviceUrlRegex.test(String(serviceUrl))) {
|
|
75
|
+
return {
|
|
76
|
+
status: 'Error',
|
|
77
|
+
message: 'Service URL must match Bot Framework pattern: https://smba.trafficmanager.net/{region}/ where region is amer, emea, apac, in, or teams.',
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
// Test Bot Framework SDK v4 authentication
|
|
81
|
+
try {
|
|
82
|
+
const botFrameworkTokenUrl = 'https://login.microsoftonline.com/botframework.com/oauth2/v2.0/token';
|
|
83
|
+
const botFrameworkBody = new URLSearchParams();
|
|
84
|
+
botFrameworkBody.append('grant_type', 'client_credentials');
|
|
85
|
+
botFrameworkBody.append('client_id', String(botId));
|
|
86
|
+
botFrameworkBody.append('client_secret', String(botSecret));
|
|
87
|
+
botFrameworkBody.append('scope', 'https://api.botframework.com/.default');
|
|
88
|
+
const botFrameworkResponse = await this.helpers.request({
|
|
89
|
+
method: 'POST',
|
|
90
|
+
url: botFrameworkTokenUrl,
|
|
91
|
+
headers: {
|
|
92
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
93
|
+
},
|
|
94
|
+
body: botFrameworkBody.toString(),
|
|
95
|
+
json: true,
|
|
96
|
+
});
|
|
97
|
+
if (!botFrameworkResponse.access_token || botFrameworkResponse.error) {
|
|
98
|
+
const errorMsg = botFrameworkResponse.error_description || botFrameworkResponse.error || 'Unknown error';
|
|
99
|
+
return {
|
|
100
|
+
status: 'Error',
|
|
101
|
+
message: `Bot Framework SDK v4 authentication failed: ${errorMsg}. Verify your Bot ID and Bot Secret in Azure Bot Service or Bot Channel Registration.`,
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
// Validate token type
|
|
105
|
+
if (botFrameworkResponse.token_type && botFrameworkResponse.token_type.toLowerCase() !== 'bearer') {
|
|
106
|
+
return {
|
|
107
|
+
status: 'Error',
|
|
108
|
+
message: `Bot Framework SDK v4 authentication returned unexpected token type: ${botFrameworkResponse.token_type}. Expected 'Bearer'.`,
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
catch (botFrameworkError) {
|
|
113
|
+
const errorMessage = botFrameworkError instanceof Error ? botFrameworkError.message : String(botFrameworkError);
|
|
114
|
+
return {
|
|
115
|
+
status: 'Error',
|
|
116
|
+
message: `Bot Framework SDK v4 authentication failed: ${errorMessage}. Verify your Bot ID and Bot Secret are correct and that your Azure Bot Service or Bot Channel Registration is properly configured.`,
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
// Test Graph API authentication
|
|
120
|
+
try {
|
|
121
|
+
const graphTokenUrl = `https://login.microsoftonline.com/${tenantId}/oauth2/v2.0/token`;
|
|
122
|
+
const graphBody = new URLSearchParams();
|
|
123
|
+
graphBody.append('grant_type', 'client_credentials');
|
|
124
|
+
graphBody.append('client_id', String(clientId));
|
|
125
|
+
graphBody.append('client_secret', String(clientSecret));
|
|
126
|
+
graphBody.append('scope', 'https://graph.microsoft.com/.default');
|
|
127
|
+
const graphResponse = await this.helpers.request({
|
|
128
|
+
method: 'POST',
|
|
129
|
+
url: graphTokenUrl,
|
|
130
|
+
headers: {
|
|
131
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
132
|
+
},
|
|
133
|
+
body: graphBody.toString(),
|
|
134
|
+
json: true,
|
|
135
|
+
});
|
|
136
|
+
if (!graphResponse.access_token || graphResponse.error) {
|
|
137
|
+
const errorMsg = graphResponse.error_description || graphResponse.error || 'Unknown error';
|
|
138
|
+
return {
|
|
139
|
+
status: 'Error',
|
|
140
|
+
message: `Graph API authentication failed: ${errorMsg}. Verify your Client ID, Tenant ID, and Client Secret in your Azure AD app registration.`,
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
// Validate token type
|
|
144
|
+
if (graphResponse.token_type && graphResponse.token_type.toLowerCase() !== 'bearer') {
|
|
145
|
+
return {
|
|
146
|
+
status: 'Error',
|
|
147
|
+
message: `Graph API authentication returned unexpected token type: ${graphResponse.token_type}. Expected 'Bearer'.`,
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
catch (graphError) {
|
|
152
|
+
const errorMessage = graphError instanceof Error ? graphError.message : String(graphError);
|
|
153
|
+
return {
|
|
154
|
+
status: 'Error',
|
|
155
|
+
message: `Graph API authentication failed: ${errorMessage}. Verify your Client ID, Tenant ID, and Client Secret are correct and that your Azure AD app registration has the required permissions.`,
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
// If all validations and connectivity tests pass
|
|
159
|
+
return {
|
|
160
|
+
status: 'OK',
|
|
161
|
+
message: '✓ Credentials validated successfully. Bot Framework SDK v4 authentication: OK. Graph API authentication: OK.',
|
|
162
|
+
};
|
|
163
|
+
},
|
|
164
|
+
},
|
|
36
165
|
};
|
|
37
166
|
const nodeDesc = this.getNodeDescription();
|
|
38
167
|
this.description = {
|
|
@@ -59,7 +188,7 @@ class TeamsBot {
|
|
|
59
188
|
{
|
|
60
189
|
name: 'teamsBotApi',
|
|
61
190
|
required: true,
|
|
62
|
-
testedBy: '
|
|
191
|
+
testedBy: 'teamsBotApiTest',
|
|
63
192
|
},
|
|
64
193
|
],
|
|
65
194
|
properties: [
|
|
@@ -383,66 +512,4 @@ class TeamsBot {
|
|
|
383
512
|
}
|
|
384
513
|
}
|
|
385
514
|
exports.TeamsBot = TeamsBot;
|
|
386
|
-
/**
|
|
387
|
-
* Test the Teams Bot API credentials
|
|
388
|
-
*/
|
|
389
|
-
async function testTeamsBotApiAuth() {
|
|
390
|
-
try {
|
|
391
|
-
// Get credentials
|
|
392
|
-
const credentials = await this.getCredentials('teamsBotApi');
|
|
393
|
-
if (!credentials) {
|
|
394
|
-
return {
|
|
395
|
-
status: 'Error',
|
|
396
|
-
message: 'No credentials provided',
|
|
397
|
-
};
|
|
398
|
-
}
|
|
399
|
-
// Basic validation of required fields
|
|
400
|
-
const { botId, botSecret, serviceUrl, clientId, tenantId, clientSecret, teamsAppId } = credentials;
|
|
401
|
-
if (!botId || !botSecret || !serviceUrl || !clientId || !tenantId || !clientSecret || !teamsAppId) {
|
|
402
|
-
return {
|
|
403
|
-
status: 'Error',
|
|
404
|
-
message: 'All credential fields are required',
|
|
405
|
-
};
|
|
406
|
-
}
|
|
407
|
-
// Test basic format validation
|
|
408
|
-
const guidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
409
|
-
const serviceUrlRegex = /^https:\/\/smba\.trafficmanager\.net\/[a-z]+\/$/;
|
|
410
|
-
if (!guidRegex.test(String(botId))) {
|
|
411
|
-
return {
|
|
412
|
-
status: 'Error',
|
|
413
|
-
message: 'Bot ID must be a valid GUID format',
|
|
414
|
-
};
|
|
415
|
-
}
|
|
416
|
-
if (!guidRegex.test(String(clientId))) {
|
|
417
|
-
return {
|
|
418
|
-
status: 'Error',
|
|
419
|
-
message: 'Client ID must be a valid GUID format',
|
|
420
|
-
};
|
|
421
|
-
}
|
|
422
|
-
if (!guidRegex.test(String(tenantId))) {
|
|
423
|
-
return {
|
|
424
|
-
status: 'Error',
|
|
425
|
-
message: 'Tenant ID must be a valid GUID format',
|
|
426
|
-
};
|
|
427
|
-
}
|
|
428
|
-
if (!serviceUrlRegex.test(String(serviceUrl))) {
|
|
429
|
-
return {
|
|
430
|
-
status: 'Error',
|
|
431
|
-
message: 'Service URL must be a valid Bot Framework service URL',
|
|
432
|
-
};
|
|
433
|
-
}
|
|
434
|
-
// If all validations pass
|
|
435
|
-
return {
|
|
436
|
-
status: 'OK',
|
|
437
|
-
message: 'Credentials are valid',
|
|
438
|
-
};
|
|
439
|
-
}
|
|
440
|
-
catch (error) {
|
|
441
|
-
return {
|
|
442
|
-
status: 'Error',
|
|
443
|
-
message: `Credential test failed: ${error instanceof Error ? error.message : 'Unknown error'}`,
|
|
444
|
-
};
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
exports.testTeamsBotApiAuth = testTeamsBotApiAuth;
|
|
448
515
|
//# sourceMappingURL=TeamsBot.node.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TeamsBot.node.js","sourceRoot":"","sources":["../../../nodes/TeamsBot/TeamsBot.node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"TeamsBot.node.js","sourceRoot":"","sources":["../../../nodes/TeamsBot/TeamsBot.node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,6CAA0C;AAC1C,iEAAmD;AACnD,4EAAmE;AACnE,sEAA6D;AAC7D,gFAA4K;AAE5K,MAAa,QAAQ;IAGpB,YAAY,eAAyC;QA8VrD,YAAO,GAAG;YACT,UAAU;YACV,cAAc,EAAE;gBACf,KAAK,CAAC,eAAe,CAEpB,UAAiC;oBAEjC,MAAM,WAAW,GAAG,UAAU,CAAC,IAAI,CAAC;oBAEpC,IAAI,CAAC,WAAW,EAAE;wBACjB,OAAO;4BACN,MAAM,EAAE,OAAO;4BACf,OAAO,EAAE,yBAAyB;yBAClC,CAAC;qBACF;oBAED,sCAAsC;oBACtC,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,GAAG,WAAW,CA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