Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions packages/pieces/community/qonto/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"extends": [
"../../../../.eslintrc.base.json"
],
"ignorePatterns": [
"!**/*"
],
"overrides": [
{
"files": [
"*.ts",
"*.tsx",
"*.js",
"*.jsx"
],
"rules": {}
},
{
"files": [
"*.ts",
"*.tsx"
],
"rules": {}
},
{
"files": [
"*.js",
"*.jsx"
],
"rules": {}
}
]
}
7 changes: 7 additions & 0 deletions packages/pieces/community/qonto/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# pieces-qonto

This library was generated with [Nx](https://nx.dev).

## Building

Run `nx build pieces-qonto` to build the library.
4 changes: 4 additions & 0 deletions packages/pieces/community/qonto/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "@activepieces/piece-qonto",
"version": "0.0.1"
}
45 changes: 45 additions & 0 deletions packages/pieces/community/qonto/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "pieces-qonto",
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/pieces/community/qonto/src",
"projectType": "library",
"release": {
"version": {
"generatorOptions": {
"packageRoot": "dist/{projectRoot}",
"currentVersionResolver": "git-tag"
}
}
},
"tags": [],
"targets": {
"build": {
"executor": "@nx/js:tsc",
"outputs": [
"{options.outputPath}"
],
"options": {
"outputPath": "dist/packages/pieces/community/qonto",
"tsConfig": "packages/pieces/community/qonto/tsconfig.lib.json",
"packageJson": "packages/pieces/community/qonto/package.json",
"main": "packages/pieces/community/qonto/src/index.ts",
"assets": [
"packages/pieces/community/qonto/*.md"
],
"buildableProjectDepsInPackageJsonType": "dependencies",
"updateBuildableProjectDepsInPackageJson": true
}
},
"nx-release-publish": {
"options": {
"packageRoot": "dist/{projectRoot}"
}
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": [
"{options.outputFile}"
]
}
}
}
33 changes: 33 additions & 0 deletions packages/pieces/community/qonto/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { createPiece, PieceAuth, OAuth2PropertyValue } from "@activepieces/pieces-framework";
import { createCustomApiCallAction } from '@activepieces/pieces-common';

export const qontoAuth = PieceAuth.OAuth2({
description: 'Connect to your Qonto account',
authUrl: 'https://oauth.qonto.com/oauth2/auth',
tokenUrl: 'https://oauth.qonto.com/oauth2/token',
required: true,
scope: [ // Scopes are predefined here. Ideally, it should be dynamic based on each configuration because the scopes need to be registered in advance on Qonto's side
'organization.read',
'team.read',
'membership.read',
'membership.write'
],
});

export const qonto = createPiece({
displayName: "Qonto",
auth: qontoAuth,
minimumSupportedRelease: '0.0.1',
logoUrl: "https://cdn.activepieces.com/pieces/qonto.png",
authors: ["valentin-mourtialon"],
actions: [
createCustomApiCallAction({
baseUrl: () => 'https://thirdparty.qonto.com/v2/',
auth: qontoAuth,
authMapping: async (auth) => ({
Authorization: `Bearer ${(auth as OAuth2PropertyValue).access_token}`,
}),
}),
],
triggers: [],
});
19 changes: 19 additions & 0 deletions packages/pieces/community/qonto/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"extends": "../../../../tsconfig.base.json",
"compilerOptions": {
"module": "commonjs",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noPropertyAccessFromIndexSignature": true
},
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.lib.json"
}
]
}
11 changes: 11 additions & 0 deletions packages/pieces/community/qonto/tsconfig.lib.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "commonjs",
"outDir": "../../../../dist/out-tsc",
"declaration": true,
"types": ["node"]
},
"exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"],
"include": ["src/**/*.ts"]
}
3 changes: 3 additions & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,9 @@
"@activepieces/piece-qdrant": [
"packages/pieces/community/qdrant/src/index.ts"
],
"@activepieces/piece-qonto": [
"packages/pieces/community/qonto/src/index.ts"
],
"@activepieces/piece-qrcode": [
"packages/pieces/community/qrcode/src/index.ts"
],
Expand Down
Loading