mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-08-13 22:37:29 +00:00
Scaffold LogicSRC and CommandBoard plugins
This commit is contained in:
parent
59927e140c
commit
5c9ea821f6
67 changed files with 5958 additions and 0 deletions
11
plugins/ugig/README.md
Normal file
11
plugins/ugig/README.md
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# uGig Plugin
|
||||
|
||||
uGig is the default CommandBoard.run plugin for jobs, gigs, candidates, agents, marketplace publishing, bid sync, and reputation sync.
|
||||
|
||||
Required environment:
|
||||
|
||||
```txt
|
||||
UGIG_API_URL
|
||||
UGIG_API_KEY
|
||||
UGIG_WEBHOOK_SECRET
|
||||
```
|
||||
18
plugins/ugig/package.json
Normal file
18
plugins/ugig/package.json
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"name": "@logicsrc/plugin-ugig",
|
||||
"version": "0.1.0",
|
||||
"description": "Default CommandBoard.run jobs, gigs, talent, and marketplace plugin.",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "tsc -p tsconfig.json",
|
||||
"test": "vitest run src --passWithNoTests"
|
||||
},
|
||||
"dependencies": {
|
||||
"@logicsrc/plugin-core": "file:../../packages/plugin-core"
|
||||
},
|
||||
"devDependencies": {
|
||||
"vitest": "^4.0.8"
|
||||
}
|
||||
}
|
||||
27
plugins/ugig/src/index.ts
Normal file
27
plugins/ugig/src/index.ts
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import type { PluginDefinition } from "@logicsrc/plugin-core";
|
||||
import { uGigManifest } from "./manifest.js";
|
||||
|
||||
export const uGigPlugin: PluginDefinition = {
|
||||
manifest: uGigManifest,
|
||||
configDefaults: {
|
||||
enabled: true,
|
||||
default_jobs_provider: true,
|
||||
api_url: "${UGIG_API_URL}",
|
||||
api_key: "${UGIG_API_KEY}",
|
||||
webhook_secret: "${UGIG_WEBHOOK_SECRET}",
|
||||
default_board: "/gigs"
|
||||
},
|
||||
routes: [
|
||||
{ method: "GET", path: "/api/plugins/ugig/jobs", capability: "jobs.import" },
|
||||
{ method: "POST", path: "/api/plugins/ugig/gigs", capability: "jobs.publish" },
|
||||
{ method: "POST", path: "/api/plugins/ugig/webhooks/gigs-sync", capability: "gigs.sync" }
|
||||
],
|
||||
events: [
|
||||
{ event: "task.created", capability: "tasks.publish_to_marketplace" },
|
||||
{ event: "task.approved", capability: "reputation.sync" }
|
||||
],
|
||||
permissions: ["jobs:read", "jobs:publish", "gigs:sync", "reputation:sync"],
|
||||
tuiPanels: [{ id: "ugig-status", title: "uGig Jobs" }]
|
||||
};
|
||||
|
||||
export { uGigManifest };
|
||||
21
plugins/ugig/src/manifest.ts
Normal file
21
plugins/ugig/src/manifest.ts
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import type { PluginManifest } from "@logicsrc/plugin-core";
|
||||
|
||||
export const uGigManifest: PluginManifest = {
|
||||
id: "ugig",
|
||||
name: "uGig",
|
||||
version: "1.0.0",
|
||||
type: ["jobs", "gigs", "marketplace"],
|
||||
default: true,
|
||||
capabilities: [
|
||||
"jobs.import",
|
||||
"jobs.publish",
|
||||
"gigs.sync",
|
||||
"candidates.link",
|
||||
"agents.link",
|
||||
"tasks.publish_to_marketplace",
|
||||
"bids.sync",
|
||||
"reputation.sync"
|
||||
],
|
||||
commands: ["jobs", "gigs", "publish"],
|
||||
env: ["UGIG_API_URL", "UGIG_API_KEY", "UGIG_WEBHOOK_SECRET"]
|
||||
};
|
||||
8
plugins/ugig/tsconfig.json
Normal file
8
plugins/ugig/tsconfig.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": ["src/**/*.ts"]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue