mcard-js
Version:
MCard - Content-addressable storage with cryptographic hashing, handle resolution, and vector search for Node.js and browsers
210 lines • 6.57 kB
JavaScript
/**
* Vendor-provisioned SaaS resource types.
*
* Third-party services organized by category:
* - Identity/Auth: Google, GitHub, Meta/Facebook
* - Messaging: WhatsApp, Line, WeChat, Telegram, Slack
* - Collaboration: Trello, Miro, Figma, LinkedIn
* - Cloud: AWS, Azure, GCP
*/
export const VENDOR_TYPES = {
// =========================================================================
// Identity & Authentication Providers
// =========================================================================
google: {
name: 'google',
category: 'vendor',
uriTemplate: 'google://{service}/{resource}',
hashTemplate: 'google:{service}:{resource}:{projectId}',
defaultOptions: {
type: 'google',
service: 'oauth',
authEnvVar: 'GOOGLE_CLIENT_ID',
required: true
},
argNames: ['service', 'resource']
},
github: {
name: 'github',
category: 'vendor',
uriTemplate: 'github://{owner}/{repo}',
hashTemplate: 'github:{owner}:{repo}:{ref}',
defaultOptions: {
type: 'github',
ref: 'main',
authEnvVar: 'GITHUB_TOKEN',
required: true
},
argNames: ['owner', 'repo']
},
meta: {
name: 'meta',
category: 'vendor',
uriTemplate: 'meta://{appId}/{service}',
hashTemplate: 'meta:{appId}:{service}',
defaultOptions: {
type: 'meta',
service: 'graph',
authEnvVar: 'META_APP_SECRET',
required: true
},
argNames: ['appId', 'service']
},
// =========================================================================
// Messaging Platforms
// =========================================================================
whatsapp: {
name: 'whatsapp',
category: 'vendor',
uriTemplate: 'whatsapp://{phoneNumberId}',
hashTemplate: 'whatsapp:{phoneNumberId}:{businessId}',
defaultOptions: {
type: 'whatsapp',
apiVersion: 'v18.0',
authEnvVar: 'WHATSAPP_TOKEN',
required: true
},
argNames: ['phoneNumberId']
},
telegram: {
name: 'telegram',
category: 'vendor',
uriTemplate: 'telegram://{botId}',
hashTemplate: 'telegram:{botId}',
defaultOptions: {
type: 'telegram',
authEnvVar: 'TELEGRAM_BOT_TOKEN',
required: true
},
argNames: ['botId']
},
line: {
name: 'line',
category: 'vendor',
uriTemplate: 'line://{channelId}',
hashTemplate: 'line:{channelId}',
defaultOptions: {
type: 'line',
authEnvVar: 'LINE_CHANNEL_ACCESS_TOKEN',
required: true
},
argNames: ['channelId']
},
wechat: {
name: 'wechat',
category: 'vendor',
uriTemplate: 'wechat://{appId}',
hashTemplate: 'wechat:{appId}',
defaultOptions: {
type: 'wechat',
authEnvVar: 'WECHAT_APP_SECRET',
required: true
},
argNames: ['appId']
},
slack: {
name: 'slack',
category: 'vendor',
uriTemplate: 'slack://{workspace}/{channel}',
hashTemplate: 'slack:{workspace}:{channel}',
defaultOptions: {
type: 'slack',
authEnvVar: 'SLACK_BOT_TOKEN',
required: true
},
argNames: ['workspace', 'channel']
},
// =========================================================================
// Collaboration & Productivity
// =========================================================================
trello: {
name: 'trello',
category: 'vendor',
uriTemplate: 'trello://{boardId}',
hashTemplate: 'trello:{boardId}',
defaultOptions: {
type: 'trello',
authEnvVar: 'TRELLO_API_KEY',
required: true
},
argNames: ['boardId']
},
miro: {
name: 'miro',
category: 'vendor',
uriTemplate: 'miro://{boardId}',
hashTemplate: 'miro:{boardId}:{teamId}',
defaultOptions: {
type: 'miro',
authEnvVar: 'MIRO_ACCESS_TOKEN',
required: true
},
argNames: ['boardId']
},
figma: {
name: 'figma',
category: 'vendor',
uriTemplate: 'figma://{fileKey}',
hashTemplate: 'figma:{fileKey}:{nodeId}',
defaultOptions: {
type: 'figma',
nodeId: undefined,
authEnvVar: 'FIGMA_ACCESS_TOKEN',
required: true
},
argNames: ['fileKey']
},
linkedin: {
name: 'linkedin',
category: 'vendor',
uriTemplate: 'linkedin://{organizationId}',
hashTemplate: 'linkedin:{organizationId}',
defaultOptions: {
type: 'linkedin',
authEnvVar: 'LINKEDIN_ACCESS_TOKEN',
required: true
},
argNames: ['organizationId']
},
// =========================================================================
// Cloud Providers (Infrastructure)
// =========================================================================
aws: {
name: 'aws',
category: 'vendor',
uriTemplate: 'aws://{service}/{resource}',
hashTemplate: 'aws:{service}:{resource}:{region}',
defaultOptions: {
type: 'aws',
region: 'us-east-1',
authEnvVar: 'AWS_ACCESS_KEY_ID',
required: true
},
argNames: ['service', 'resource']
},
azure: {
name: 'azure',
category: 'vendor',
uriTemplate: 'azure://{subscription}/{resourceGroup}/{resource}',
hashTemplate: 'azure:{subscription}:{resourceGroup}:{resource}',
defaultOptions: {
type: 'azure',
authEnvVar: 'AZURE_CLIENT_ID',
required: true
},
argNames: ['subscription', 'resourceGroup', 'resource']
},
gcp: {
name: 'gcp',
category: 'vendor',
uriTemplate: 'gcp://{project}/{service}/{resource}',
hashTemplate: 'gcp:{project}:{service}:{resource}',
defaultOptions: {
type: 'gcp',
authEnvVar: 'GOOGLE_APPLICATION_CREDENTIALS',
required: true
},
argNames: ['project', 'service', 'resource']
}
};
//# sourceMappingURL=vendors.js.map