n8n-nodes-feishu-lark
Version:
n8n custom nodes for n8n to interact with Feishu/Lark, including Lark Bot, Lark MCP, and Lark Trigger.
87 lines • 3.53 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.LarkOAuth2Api = void 0;
class LarkOAuth2Api {
constructor() {
this.name = "larkOAuth2Api";
this.displayName = 'Lark OAuth2 API';
this.extends = ['oAuth2Api'];
this.icon = 'file:lark_icon.svg';
this.documentationUrl = 'https://open.feishu.cn/document/authentication-management/access-token/obtain-oauth-code';
this.properties = [
{
displayName: 'Grant Type',
name: 'grantType',
type: 'hidden',
default: 'pkce',
},
{
displayName: 'Base URL',
name: 'baseUrl',
type: 'options',
options: [
{
name: `${"https://open.feishu.cn"}`,
value: `${"https://open.feishu.cn"}`,
description: 'Feishu Open Platform base URL(China)',
},
{
name: `${"https://open.larksuite.com"}`,
value: `${"https://open.larksuite.com"}`,
description: 'Larksuite Open Platform base URL(Global)',
},
],
default: [],
required: true,
},
{
displayName: `Up to 50 scope permissions can be requested from the user at once.Please always include offline_access.<a target="_blank" href="https://open.feishu.cn/document/authentication-management/access-token/obtain-oauth-code?#bc6d1214">More Details</a>`,
name: 'suggestion',
type: 'notice',
default: '',
},
{
displayName: 'Scope',
name: 'authScope',
type: 'string',
hint: 'Format: offline_access,contact:contact,bitable:app',
default: 'offline_access',
required: true,
},
{
displayName: 'Authorization URL',
name: 'authUrl',
type: 'hidden',
default: '={{$self["baseUrl"] === "https://open.feishu.cn" ? "https://accounts.feishu.cn/open-apis/authen/v1/authorize" : "https://accounts.larksuite.com/open-apis/authen/v1/authorize"}}',
required: true,
},
{
displayName: 'Access Token URL',
name: 'accessTokenUrl',
type: 'hidden',
default: '={{$self["baseUrl"] === "https://open.feishu.cn" ? "https://open.feishu.cn/open-apis/authen/v2/oauth/token" : "https://open.larksuite.com/open-apis/authen/v2/oauth/token"}}',
required: true,
},
{
displayName: 'Scope',
name: 'scope',
type: 'hidden',
default: '={{$self["authScope"].replace(/,/g, " ").trim()}}',
},
{
displayName: 'Auth URI Query Parameters',
name: 'authQueryParameters',
type: 'hidden',
default: '',
},
{
displayName: 'Authentication',
name: 'authentication',
type: 'hidden',
default: 'header',
},
];
}
}
exports.LarkOAuth2Api = LarkOAuth2Api;
//# sourceMappingURL=LarkOAuth2Api.credentials.js.map