ToolJet/server/migrations/1775060000000-AddSpecFilesMapToPlugins.ts
Akshay 8ef5f0682d
Feature: Add QuickBooks Online marketplace plugin (#15903)
* feat: add QuickBooks Online marketplace plugin

Add a QuickBooks Online Accounting API plugin with OAuth2 authentication,
86 API operations via OpenAPI spec, and @spec/ convention for DB-stored
spec files. Includes server-side spec hosting infrastructure and a fix
for duplicate footer rendering on marketplace OAuth2 datasource config pages.

* chore: update submodule pointers

* fix: use parent transaction for spec file DB operations

storeSpecFiles and updateSpecFilesForReload were wrapping each file
insert/update in a separate dbTransactionWrap call, creating independent
transactions instead of participating in the outer install/upgrade
transaction. This could leave orphan File entities if the plugin save
failed. Now uses the parent manager directly.

* fix: use sandbox API URL, remove testConnection, add state param

- Default to sandbox-quickbooks.api.intuit.com (development apps require it)
- Remove testConnection and customTesting (OAuth flow validates connection)
- Add state parameter to auth URL (required by QuickBooks)
- Add access_token validation guard in run()
- Preserve existing refresh_token if provider doesn't reissue
- Remove environment dropdown and company_id from manifest
- Add debug logging for OAuth flow tracing

* Chore: Migrate all OpenAPI plugins from external URLs to @spec/ convention (#15904)

* chore: migrate all OpenAPI plugins from external URLs to @spec/ convention

Downloads 78 OpenAPI spec files from external URLs (7 plugins from
adishM98/base-repo-testing personal repo, 2 from official provider repos,
1 from S3) and stores them locally in openapi-specs/ directories. Updates
all operations.json files to use @spec/<kind>/<name> references, which
are resolved to DB-stored specs at install time.

Eliminates runtime dependency on external GitHub repos for spec rendering.

* chore: remove one-time spec migration script

* POST string body

---------

Co-authored-by: Rudhra Deep Biswas <rudra21ultra@gmail.com>
Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2026-05-13 09:16:38 +05:30

19 lines
548 B
TypeScript

import { MigrationInterface, QueryRunner, TableColumn } from 'typeorm';
export class AddSpecFilesMapToPlugins1775060000000 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.addColumn(
'plugins',
new TableColumn({
name: 'spec_files_map',
type: 'jsonb',
isNullable: true,
default: null,
})
);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.dropColumn('plugins', 'spec_files_map');
}
}