chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 13:34:48 +08:00
commit 77bb5bf71f
3762 changed files with 353249 additions and 0 deletions
@@ -0,0 +1,75 @@
import * as sdk from '@botpress/sdk'
const { z } = sdk
export const actions = {
createPost: {
title: 'Create Post',
description: 'Create a LinkedIn post with optional image or article link',
input: {
schema: z.object({
text: z
.string()
.min(1)
.max(3000)
.title('Post Text')
.describe('The text content of your LinkedIn post (required, max 3000 characters)'),
visibility: z
.enum(['PUBLIC', 'CONNECTIONS'])
.title('Visibility')
.describe('Who can see this post: PUBLIC (anyone) or CONNECTIONS (1st degree only)'),
imageUrl: z
.string()
.url()
.optional()
.title('Image URL')
.describe(
'URL of an image to attach (JPG, PNG, GIF, max 8MB). The image will be downloaded and uploaded to LinkedIn. If both imageUrl and articleUrl are provided, only the image will be used.'
),
articleUrl: z
.string()
.url()
.optional()
.title('Article URL')
.describe(
'URL of an article/link to share. LinkedIn will generate a preview card. Ignored if imageUrl is provided.'
),
articleTitle: z.string().optional().title('Article Title').describe('Custom title for the article preview.'),
articleDescription: z
.string()
.optional()
.title('Article Description')
.describe(
'Custom description for the article preview (optional - LinkedIn will scrape from URL if not provided)'
),
}),
},
output: {
schema: z.object({
postUrn: z
.string()
.title('Post URN')
.describe('The URN identifier of the created post (e.g., urn:li:ugcPost:123456)'),
postUrl: z.string().title('Post URL').describe('Direct link to view the post on LinkedIn'),
}),
},
},
deletePost: {
title: 'Delete Post',
description: 'Delete a LinkedIn post created by the authenticated user',
input: {
schema: z.object({
postUrn: z
.string()
.title('Post URN')
.describe('The URN of the post to delete (e.g., urn:li:ugcPost:123456 or urn:li:share:123456)'),
}),
},
output: {
schema: z.object({
success: z.boolean().title('Success').describe('Whether the post was successfully deleted'),
}),
},
},
} as const satisfies sdk.IntegrationDefinitionProps['actions']
@@ -0,0 +1,32 @@
import * as sdk from '@botpress/sdk'
const { z } = sdk
export const configuration = {
identifier: {
linkTemplateScript: 'linkTemplate.vrl',
required: true,
},
schema: z.object({}),
} as const satisfies sdk.IntegrationDefinitionProps['configuration']
export const configurations = {
manual: {
title: 'Manual Configuration',
description: 'Configure with your own LinkedIn Developer application',
schema: z.object({
clientId: z.string().min(1).title('Client ID').describe('Client ID from your LinkedIn Developer application'),
clientSecret: z
.string()
.min(1)
.secret()
.title('Client Secret')
.describe('Primary Client Secret from your LinkedIn Developer application'),
authorizationCode: z.string().min(1).secret().title('Authorization Code').describe('Authorization Code'),
}),
},
} as const satisfies sdk.IntegrationDefinitionProps['configurations']
export const identifier = {
extractScript: 'extract.vrl',
} as const satisfies sdk.IntegrationDefinitionProps['identifier']
@@ -0,0 +1,4 @@
export * from './secrets'
export * from './states'
export * from './configuration'
export * from './actions'
@@ -0,0 +1,12 @@
import { posthogHelper } from '@botpress/common'
import * as sdk from '@botpress/sdk'
export const secrets = {
CLIENT_ID: {
description: 'Botpress LinkedIn OAuth Client ID',
},
CLIENT_SECRET: {
description: 'Botpress LinkedIn OAuth Client Secret',
},
...posthogHelper.COMMON_SECRET_NAMES,
} as const satisfies sdk.IntegrationDefinitionProps['secrets']
@@ -0,0 +1,39 @@
import * as sdk from '@botpress/sdk'
const { z } = sdk
export const states = {
oauthCredentials: {
type: 'integration',
schema: z.object({
accessToken: z
.object({
token: z.string().secret(),
issuedAt: z.number(),
expiresAt: z.number(),
})
.title('Access Token')
.describe('The access token generated by LinkedIn'),
refreshToken: z
.object({
token: z.string().secret(),
issuedAt: z.number(),
expiresAt: z.number().optional(),
})
.optional()
.title('Refresh Token')
.describe('The refresh token generated by LinkedIn'),
grantedScopes: z.array(z.string()).title('Granted Scopes').describe('The scopes granted by the user'),
linkedInUserId: z.string().title('LinkedIn User ID').describe('The user ID of the authenticated user'),
}),
},
processedNotifications: {
type: 'integration',
schema: z.object({
notificationIds: z
.array(z.string())
.title('Notification IDs')
.describe('Rolling list of recently processed notification IDs to prevent duplicate processing'),
}),
},
} as const satisfies sdk.IntegrationDefinitionProps['states']