n8n-nodes-smartgent
Version:
SmartGent custom nodes for n8n - AI-powered automation and intelligent workflow integrations including LiteLLM chat completions, SharePoint file monitoring, and enterprise search
86 lines • 3.35 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SmartgentMicrosoftSharePointApi = void 0;
class SmartgentMicrosoftSharePointApi {
constructor() {
this.name = 'smartgentMicrosoftSharePointApi';
this.displayName = 'Smartgent SharePoint API';
this.documentationUrl = 'https://docs.microsoft.com/en-us/graph/api/resources/sharepoint';
this.properties = [
{
displayName: 'Tenant ID',
name: 'tenantId',
type: 'string',
default: '',
required: true,
description: 'Your Azure AD tenant ID (directory ID)',
placeholder: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
},
{
displayName: 'Client ID',
name: 'clientId',
type: 'string',
default: '',
required: true,
description: 'The Application (client) ID from your app registration',
placeholder: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
},
{
displayName: 'Client Secret',
name: 'clientSecret',
type: 'string',
typeOptions: { password: true },
default: '',
required: true,
description: 'The client secret value from your app registration',
},
{
displayName: 'Site URL',
name: 'siteUrl',
type: 'string',
default: '',
required: true,
description: 'The SharePoint site URL (e.g., https://contoso.sharepoint.com/sites/sitename)',
placeholder: 'https://contoso.sharepoint.com/sites/sitename',
},
{
displayName: 'Token Endpoint (Optional)',
name: 'tokenEndpoint',
type: 'string',
typeOptions: { password: true },
default: '',
required: false,
description: 'Custom token endpoint URL. Leave empty to use default Microsoft endpoint.',
placeholder: 'https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/token',
},
];
this.authenticate = {
type: 'generic',
properties: {
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
},
},
};
this.test = {
request: {
baseURL: 'https://login.microsoftonline.com',
url: '={{$credentials.tenantId}}/v2.0/.well-known/openid-configuration',
method: 'GET',
},
rules: [
{
type: 'responseSuccessBody',
properties: {
key: 'authorization_endpoint',
value: '',
message: 'Connection successful! Tenant ID is valid and accessible.',
},
},
],
};
}
}
exports.SmartgentMicrosoftSharePointApi = SmartgentMicrosoftSharePointApi;
//# sourceMappingURL=SmartgentMicrosoftSharePointApi.credentials.js.map