@gravity-platform/ingest 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/Abyssale/node/executor.d.ts +12 -0
- package/dist/Abyssale/node/executor.d.ts.map +1 -0
- package/dist/Abyssale/node/executor.js +72 -0
- package/dist/Abyssale/node/executor.js.map +1 -0
- package/dist/Abyssale/node/index.d.ts +10 -0
- package/dist/Abyssale/node/index.d.ts.map +1 -0
- package/dist/Abyssale/node/index.js +90 -0
- package/dist/Abyssale/node/index.js.map +1 -0
- package/dist/Abyssale/service/abyssaleService.d.ts +45 -0
- package/dist/Abyssale/service/abyssaleService.d.ts.map +1 -0
- package/dist/Abyssale/service/abyssaleService.js +360 -0
- package/dist/Abyssale/service/abyssaleService.js.map +1 -0
- package/dist/Abyssale/util/types.d.ts +62 -0
- package/dist/Abyssale/util/types.d.ts.map +1 -0
- package/dist/Abyssale/util/types.js +6 -0
- package/dist/Abyssale/util/types.js.map +1 -0
- package/dist/AirtableInsert/node/executor.d.ts +7 -0
- package/dist/AirtableInsert/node/executor.d.ts.map +1 -0
- package/dist/AirtableInsert/node/executor.js +32 -0
- package/dist/AirtableInsert/node/executor.js.map +1 -0
- package/dist/AirtableInsert/node/index.d.ts +10 -0
- package/dist/AirtableInsert/node/index.d.ts.map +1 -0
- package/dist/AirtableInsert/node/index.js +98 -0
- package/dist/AirtableInsert/node/index.js.map +1 -0
- package/dist/AirtableInsert/service/airtableInsertService.d.ts +8 -0
- package/dist/AirtableInsert/service/airtableInsertService.d.ts.map +1 -0
- package/dist/AirtableInsert/service/airtableInsertService.js +99 -0
- package/dist/AirtableInsert/service/airtableInsertService.js.map +1 -0
- package/dist/AirtableInsert/util/types.d.ts +15 -0
- package/dist/AirtableInsert/util/types.d.ts.map +1 -0
- package/dist/AirtableInsert/util/types.js +3 -0
- package/dist/AirtableInsert/util/types.js.map +1 -0
- package/dist/ApifyResults/node/executor.d.ts +32 -0
- package/dist/ApifyResults/node/executor.d.ts.map +1 -0
- package/dist/ApifyResults/node/executor.js +204 -0
- package/dist/ApifyResults/node/executor.js.map +1 -0
- package/dist/ApifyResults/node/index.d.ts +10 -0
- package/dist/ApifyResults/node/index.d.ts.map +1 -0
- package/dist/ApifyResults/node/index.js +79 -0
- package/dist/ApifyResults/node/index.js.map +1 -0
- package/dist/ApifyResults/service/apifyService.d.ts +10 -0
- package/dist/ApifyResults/service/apifyService.d.ts.map +1 -0
- package/dist/ApifyResults/service/apifyService.js +85 -0
- package/dist/ApifyResults/service/apifyService.js.map +1 -0
- package/dist/ApifyResults/util/types.d.ts +93 -0
- package/dist/ApifyResults/util/types.d.ts.map +1 -0
- package/dist/ApifyResults/util/types.js +6 -0
- package/dist/ApifyResults/util/types.js.map +1 -0
- package/dist/ApifyStarter/node/executor.d.ts +12 -0
- package/dist/ApifyStarter/node/executor.d.ts.map +1 -0
- package/dist/ApifyStarter/node/executor.js +97 -0
- package/dist/ApifyStarter/node/executor.js.map +1 -0
- package/dist/ApifyStarter/node/index.d.ts +10 -0
- package/dist/ApifyStarter/node/index.d.ts.map +1 -0
- package/dist/ApifyStarter/node/index.js +87 -0
- package/dist/ApifyStarter/node/index.js.map +1 -0
- package/dist/ApifyStarter/service/apifyActorService.d.ts +11 -0
- package/dist/ApifyStarter/service/apifyActorService.d.ts.map +1 -0
- package/dist/ApifyStarter/service/apifyActorService.js +104 -0
- package/dist/ApifyStarter/service/apifyActorService.js.map +1 -0
- package/dist/ApifyStarter/util/types.d.ts +23 -0
- package/dist/ApifyStarter/util/types.d.ts.map +1 -0
- package/dist/ApifyStarter/util/types.js +6 -0
- package/dist/ApifyStarter/util/types.js.map +1 -0
- package/dist/ApifyStarter/util/validation.d.ts +9 -0
- package/dist/ApifyStarter/util/validation.d.ts.map +1 -0
- package/dist/ApifyStarter/util/validation.js +59 -0
- package/dist/ApifyStarter/util/validation.js.map +1 -0
- package/dist/ApolloCompany/node/executor.d.ts +8 -0
- package/dist/ApolloCompany/node/executor.d.ts.map +1 -0
- package/dist/ApolloCompany/node/executor.js +38 -0
- package/dist/ApolloCompany/node/executor.js.map +1 -0
- package/dist/ApolloCompany/node/index.d.ts +10 -0
- package/dist/ApolloCompany/node/index.d.ts.map +1 -0
- package/dist/ApolloCompany/node/index.js +120 -0
- package/dist/ApolloCompany/node/index.js.map +1 -0
- package/dist/ApolloCompany/service/apolloSearchCompanyService.d.ts +7 -0
- package/dist/ApolloCompany/service/apolloSearchCompanyService.d.ts.map +1 -0
- package/dist/ApolloCompany/service/apolloSearchCompanyService.js +124 -0
- package/dist/ApolloCompany/service/apolloSearchCompanyService.js.map +1 -0
- package/dist/ApolloCompany/util/types.d.ts +46 -0
- package/dist/ApolloCompany/util/types.d.ts.map +1 -0
- package/dist/ApolloCompany/util/types.js +6 -0
- package/dist/ApolloCompany/util/types.js.map +1 -0
- package/dist/ApolloCompanyEnrich/node/executor.d.ts +8 -0
- package/dist/ApolloCompanyEnrich/node/executor.d.ts.map +1 -0
- package/dist/ApolloCompanyEnrich/node/executor.js +25 -0
- package/dist/ApolloCompanyEnrich/node/executor.js.map +1 -0
- package/dist/ApolloCompanyEnrich/node/index.d.ts +10 -0
- package/dist/ApolloCompanyEnrich/node/index.d.ts.map +1 -0
- package/dist/ApolloCompanyEnrich/node/index.js +67 -0
- package/dist/ApolloCompanyEnrich/node/index.js.map +1 -0
- package/dist/ApolloCompanyEnrich/service/apolloCompanyEnrichService.d.ts +9 -0
- package/dist/ApolloCompanyEnrich/service/apolloCompanyEnrichService.d.ts.map +1 -0
- package/dist/ApolloCompanyEnrich/service/apolloCompanyEnrichService.js +40 -0
- package/dist/ApolloCompanyEnrich/service/apolloCompanyEnrichService.js.map +1 -0
- package/dist/ApolloCompanyEnrich/util/types.d.ts +13 -0
- package/dist/ApolloCompanyEnrich/util/types.d.ts.map +1 -0
- package/dist/ApolloCompanyEnrich/util/types.js +6 -0
- package/dist/ApolloCompanyEnrich/util/types.js.map +1 -0
- package/dist/ApolloPeople/node/executor.d.ts +8 -0
- package/dist/ApolloPeople/node/executor.d.ts.map +1 -0
- package/dist/ApolloPeople/node/executor.js +41 -0
- package/dist/ApolloPeople/node/executor.js.map +1 -0
- package/dist/ApolloPeople/node/index.d.ts +10 -0
- package/dist/ApolloPeople/node/index.d.ts.map +1 -0
- package/dist/ApolloPeople/node/index.js +128 -0
- package/dist/ApolloPeople/node/index.js.map +1 -0
- package/dist/ApolloPeople/service/apolloSearchService.d.ts +6 -0
- package/dist/ApolloPeople/service/apolloSearchService.d.ts.map +1 -0
- package/dist/ApolloPeople/service/apolloSearchService.js +127 -0
- package/dist/ApolloPeople/service/apolloSearchService.js.map +1 -0
- package/dist/ApolloPeople/util/types.d.ts +70 -0
- package/dist/ApolloPeople/util/types.d.ts.map +1 -0
- package/dist/ApolloPeople/util/types.js +6 -0
- package/dist/ApolloPeople/util/types.js.map +1 -0
- package/dist/ApolloPeopleEnrich/node/executor.d.ts +8 -0
- package/dist/ApolloPeopleEnrich/node/executor.d.ts.map +1 -0
- package/dist/ApolloPeopleEnrich/node/executor.js +25 -0
- package/dist/ApolloPeopleEnrich/node/executor.js.map +1 -0
- package/dist/ApolloPeopleEnrich/node/index.d.ts +10 -0
- package/dist/ApolloPeopleEnrich/node/index.d.ts.map +1 -0
- package/dist/ApolloPeopleEnrich/node/index.js +116 -0
- package/dist/ApolloPeopleEnrich/node/index.js.map +1 -0
- package/dist/ApolloPeopleEnrich/service/apolloPeopleEnrichService.d.ts +10 -0
- package/dist/ApolloPeopleEnrich/service/apolloPeopleEnrichService.d.ts.map +1 -0
- package/dist/ApolloPeopleEnrich/service/apolloPeopleEnrichService.js +54 -0
- package/dist/ApolloPeopleEnrich/service/apolloPeopleEnrichService.js.map +1 -0
- package/dist/ApolloPeopleEnrich/util/types.d.ts +20 -0
- package/dist/ApolloPeopleEnrich/util/types.d.ts.map +1 -0
- package/dist/ApolloPeopleEnrich/util/types.js +6 -0
- package/dist/ApolloPeopleEnrich/util/types.js.map +1 -0
- package/dist/ApolloSearch/node/executor.d.ts +9 -0
- package/dist/ApolloSearch/node/executor.d.ts.map +1 -0
- package/dist/ApolloSearch/node/executor.js +51 -0
- package/dist/ApolloSearch/node/executor.js.map +1 -0
- package/dist/ApolloSearch/node/index.d.ts +10 -0
- package/dist/ApolloSearch/node/index.d.ts.map +1 -0
- package/dist/ApolloSearch/node/index.js +128 -0
- package/dist/ApolloSearch/node/index.js.map +1 -0
- package/dist/ApolloSearch/service/apolloSearchService.d.ts +6 -0
- package/dist/ApolloSearch/service/apolloSearchService.d.ts.map +1 -0
- package/dist/ApolloSearch/service/apolloSearchService.js +127 -0
- package/dist/ApolloSearch/service/apolloSearchService.js.map +1 -0
- package/dist/ApolloSearch/util/types.d.ts +70 -0
- package/dist/ApolloSearch/util/types.d.ts.map +1 -0
- package/dist/ApolloSearch/util/types.js +6 -0
- package/dist/ApolloSearch/util/types.js.map +1 -0
- package/dist/ApolloSearchCompany/node/executor.d.ts +9 -0
- package/dist/ApolloSearchCompany/node/executor.d.ts.map +1 -0
- package/dist/ApolloSearchCompany/node/executor.js +49 -0
- package/dist/ApolloSearchCompany/node/executor.js.map +1 -0
- package/dist/ApolloSearchCompany/node/index.d.ts +10 -0
- package/dist/ApolloSearchCompany/node/index.d.ts.map +1 -0
- package/dist/ApolloSearchCompany/node/index.js +128 -0
- package/dist/ApolloSearchCompany/node/index.js.map +1 -0
- package/dist/ApolloSearchCompany/service/apolloSearchCompanyService.d.ts +7 -0
- package/dist/ApolloSearchCompany/service/apolloSearchCompanyService.d.ts.map +1 -0
- package/dist/ApolloSearchCompany/service/apolloSearchCompanyService.js +98 -0
- package/dist/ApolloSearchCompany/service/apolloSearchCompanyService.js.map +1 -0
- package/dist/ApolloSearchCompany/util/types.d.ts +48 -0
- package/dist/ApolloSearchCompany/util/types.d.ts.map +1 -0
- package/dist/ApolloSearchCompany/util/types.js +6 -0
- package/dist/ApolloSearchCompany/util/types.js.map +1 -0
- package/dist/Document/node/executor.d.ts +22 -0
- package/dist/Document/node/executor.d.ts.map +1 -0
- package/dist/Document/node/executor.js +85 -0
- package/dist/Document/node/executor.js.map +1 -0
- package/dist/Document/node/index.d.ts +10 -0
- package/dist/Document/node/index.d.ts.map +1 -0
- package/dist/Document/node/index.js +58 -0
- package/dist/Document/node/index.js.map +1 -0
- package/dist/Document/service/documentCache.d.ts +11 -0
- package/dist/Document/service/documentCache.d.ts.map +1 -0
- package/dist/Document/service/documentCache.js +166 -0
- package/dist/Document/service/documentCache.js.map +1 -0
- package/dist/Document/util/types.d.ts +70 -0
- package/dist/Document/util/types.d.ts.map +1 -0
- package/dist/Document/util/types.js +6 -0
- package/dist/Document/util/types.js.map +1 -0
- package/dist/DocumentParser/node/executor.d.ts +12 -0
- package/dist/DocumentParser/node/executor.d.ts.map +1 -0
- package/dist/DocumentParser/node/executor.js +200 -0
- package/dist/DocumentParser/node/executor.js.map +1 -0
- package/dist/DocumentParser/node/index.d.ts +10 -0
- package/dist/DocumentParser/node/index.d.ts.map +1 -0
- package/dist/DocumentParser/node/index.js +66 -0
- package/dist/DocumentParser/node/index.js.map +1 -0
- package/dist/DocumentParser/service/docxParser.d.ts +12 -0
- package/dist/DocumentParser/service/docxParser.d.ts.map +1 -0
- package/dist/DocumentParser/service/docxParser.js +27 -0
- package/dist/DocumentParser/service/docxParser.js.map +1 -0
- package/dist/DocumentParser/service/fileTypeDetector.d.ts +19 -0
- package/dist/DocumentParser/service/fileTypeDetector.d.ts.map +1 -0
- package/dist/DocumentParser/service/fileTypeDetector.js +75 -0
- package/dist/DocumentParser/service/fileTypeDetector.js.map +1 -0
- package/dist/DocumentParser/service/index.d.ts +5 -0
- package/dist/DocumentParser/service/index.d.ts.map +1 -0
- package/dist/DocumentParser/service/index.js +14 -0
- package/dist/DocumentParser/service/index.js.map +1 -0
- package/dist/DocumentParser/service/pdfParser.d.ts +16 -0
- package/dist/DocumentParser/service/pdfParser.d.ts.map +1 -0
- package/dist/DocumentParser/service/pdfParser.js +30 -0
- package/dist/DocumentParser/service/pdfParser.js.map +1 -0
- package/dist/DocumentParser/service/txtParser.d.ts +11 -0
- package/dist/DocumentParser/service/txtParser.d.ts.map +1 -0
- package/dist/DocumentParser/service/txtParser.js +35 -0
- package/dist/DocumentParser/service/txtParser.js.map +1 -0
- package/dist/DocumentParser/util/hashUtils.d.ts +17 -0
- package/dist/DocumentParser/util/hashUtils.d.ts.map +1 -0
- package/dist/DocumentParser/util/hashUtils.js +34 -0
- package/dist/DocumentParser/util/hashUtils.js.map +1 -0
- package/dist/DocumentParser/util/types.d.ts +43 -0
- package/dist/DocumentParser/util/types.d.ts.map +1 -0
- package/dist/DocumentParser/util/types.js +6 -0
- package/dist/DocumentParser/util/types.js.map +1 -0
- package/dist/ElevenLabs/node/executor.d.ts +12 -0
- package/dist/ElevenLabs/node/executor.d.ts.map +1 -0
- package/dist/ElevenLabs/node/executor.js +65 -0
- package/dist/ElevenLabs/node/executor.js.map +1 -0
- package/dist/ElevenLabs/node/index.d.ts +10 -0
- package/dist/ElevenLabs/node/index.d.ts.map +1 -0
- package/dist/ElevenLabs/node/index.js +92 -0
- package/dist/ElevenLabs/node/index.js.map +1 -0
- package/dist/ElevenLabs/service/elevenlabsService.d.ts +27 -0
- package/dist/ElevenLabs/service/elevenlabsService.d.ts.map +1 -0
- package/dist/ElevenLabs/service/elevenlabsService.js +278 -0
- package/dist/ElevenLabs/service/elevenlabsService.js.map +1 -0
- package/dist/ElevenLabs/util/types.d.ts +43 -0
- package/dist/ElevenLabs/util/types.d.ts.map +1 -0
- package/dist/ElevenLabs/util/types.js +7 -0
- package/dist/ElevenLabs/util/types.js.map +1 -0
- package/dist/GoogleSheet/node/executor.d.ts +21 -0
- package/dist/GoogleSheet/node/executor.d.ts.map +1 -0
- package/dist/GoogleSheet/node/executor.js +156 -0
- package/dist/GoogleSheet/node/executor.js.map +1 -0
- package/dist/GoogleSheet/node/index.d.ts +10 -0
- package/dist/GoogleSheet/node/index.d.ts.map +1 -0
- package/dist/GoogleSheet/node/index.js +90 -0
- package/dist/GoogleSheet/node/index.js.map +1 -0
- package/dist/GoogleSheet/service/googleSheetsService.d.ts +10 -0
- package/dist/GoogleSheet/service/googleSheetsService.d.ts.map +1 -0
- package/dist/GoogleSheet/service/googleSheetsService.js +44 -0
- package/dist/GoogleSheet/service/googleSheetsService.js.map +1 -0
- package/dist/GoogleSheet/util/types.d.ts +39 -0
- package/dist/GoogleSheet/util/types.d.ts.map +1 -0
- package/dist/GoogleSheet/util/types.js +6 -0
- package/dist/GoogleSheet/util/types.js.map +1 -0
- package/dist/Hyperbrowser/node/executor.d.ts +12 -0
- package/dist/Hyperbrowser/node/executor.d.ts.map +1 -0
- package/dist/Hyperbrowser/node/executor.js +67 -0
- package/dist/Hyperbrowser/node/executor.js.map +1 -0
- package/dist/Hyperbrowser/node/index.d.ts +10 -0
- package/dist/Hyperbrowser/node/index.d.ts.map +1 -0
- package/dist/Hyperbrowser/node/index.js +93 -0
- package/dist/Hyperbrowser/node/index.js.map +1 -0
- package/dist/Hyperbrowser/service/hyperbrowserService.d.ts +38 -0
- package/dist/Hyperbrowser/service/hyperbrowserService.d.ts.map +1 -0
- package/dist/Hyperbrowser/service/hyperbrowserService.js +108 -0
- package/dist/Hyperbrowser/service/hyperbrowserService.js.map +1 -0
- package/dist/Hyperbrowser/util/types.d.ts +44 -0
- package/dist/Hyperbrowser/util/types.d.ts.map +1 -0
- package/dist/Hyperbrowser/util/types.js +6 -0
- package/dist/Hyperbrowser/util/types.js.map +1 -0
- package/dist/PlaidTransactions/node/executor.d.ts +10 -0
- package/dist/PlaidTransactions/node/executor.d.ts.map +1 -0
- package/dist/PlaidTransactions/node/executor.js +142 -0
- package/dist/PlaidTransactions/node/executor.js.map +1 -0
- package/dist/PlaidTransactions/node/index.d.ts +10 -0
- package/dist/PlaidTransactions/node/index.d.ts.map +1 -0
- package/dist/PlaidTransactions/node/index.js +120 -0
- package/dist/PlaidTransactions/node/index.js.map +1 -0
- package/dist/PlaidTransactions/service/plaidService.d.ts +12 -0
- package/dist/PlaidTransactions/service/plaidService.d.ts.map +1 -0
- package/dist/PlaidTransactions/service/plaidService.js +179 -0
- package/dist/PlaidTransactions/service/plaidService.js.map +1 -0
- package/dist/PlaidTransactions/util/types.d.ts +90 -0
- package/dist/PlaidTransactions/util/types.d.ts.map +1 -0
- package/dist/PlaidTransactions/util/types.js +6 -0
- package/dist/PlaidTransactions/util/types.js.map +1 -0
- package/dist/SearchWeb/node/executor.d.ts +12 -0
- package/dist/SearchWeb/node/executor.d.ts.map +1 -0
- package/dist/SearchWeb/node/executor.js +56 -0
- package/dist/SearchWeb/node/executor.js.map +1 -0
- package/dist/SearchWeb/node/index.d.ts +10 -0
- package/dist/SearchWeb/node/index.d.ts.map +1 -0
- package/dist/SearchWeb/node/index.js +114 -0
- package/dist/SearchWeb/node/index.js.map +1 -0
- package/dist/SearchWeb/service/searchWebService.d.ts +23 -0
- package/dist/SearchWeb/service/searchWebService.d.ts.map +1 -0
- package/dist/SearchWeb/service/searchWebService.js +146 -0
- package/dist/SearchWeb/service/searchWebService.js.map +1 -0
- package/dist/SearchWeb/util/types.d.ts +50 -0
- package/dist/SearchWeb/util/types.d.ts.map +1 -0
- package/dist/SearchWeb/util/types.js +6 -0
- package/dist/SearchWeb/util/types.js.map +1 -0
- package/dist/SpatialIngest/node/executor.d.ts +8 -0
- package/dist/SpatialIngest/node/executor.d.ts.map +1 -0
- package/dist/SpatialIngest/node/executor.js +58 -0
- package/dist/SpatialIngest/node/executor.js.map +1 -0
- package/dist/SpatialIngest/node/index.d.ts +10 -0
- package/dist/SpatialIngest/node/index.d.ts.map +1 -0
- package/dist/SpatialIngest/node/index.js +99 -0
- package/dist/SpatialIngest/node/index.js.map +1 -0
- package/dist/SpatialIngest/service/spatialIngestService.d.ts +29 -0
- package/dist/SpatialIngest/service/spatialIngestService.d.ts.map +1 -0
- package/dist/SpatialIngest/service/spatialIngestService.js +306 -0
- package/dist/SpatialIngest/service/spatialIngestService.js.map +1 -0
- package/dist/SpatialIngest/util/types.d.ts +26 -0
- package/dist/SpatialIngest/util/types.d.ts.map +1 -0
- package/dist/SpatialIngest/util/types.js +3 -0
- package/dist/SpatialIngest/util/types.js.map +1 -0
- package/dist/credentials/index.d.ts +141 -0
- package/dist/credentials/index.d.ts.map +1 -0
- package/dist/credentials/index.js +180 -0
- package/dist/credentials/index.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +104 -0
- package/dist/index.js.map +1 -0
- package/dist/shared/platform.d.ts +11 -0
- package/dist/shared/platform.d.ts.map +1 -0
- package/dist/shared/platform.js +21 -0
- package/dist/shared/platform.js.map +1 -0
- package/package.json +53 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PromiseNode, type NodeExecutionContext } from "@gravity-platform/plugin-base";
|
|
2
|
+
import { AbyssaleConfig, AbyssaleExecutorOutput } from "../util/types";
|
|
3
|
+
export declare class AbyssaleExecutor extends PromiseNode {
|
|
4
|
+
constructor();
|
|
5
|
+
protected executeNode(inputs: Record<string, any>, config: AbyssaleConfig, context: NodeExecutionContext): Promise<AbyssaleExecutorOutput>;
|
|
6
|
+
/**
|
|
7
|
+
* Build credential context from execution context
|
|
8
|
+
* Uses validateAndGetContext like other working nodes (BedrockClaude, OpenAIStream)
|
|
9
|
+
*/
|
|
10
|
+
private buildCredentialContext;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=executor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../../src/Abyssale/node/executor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACvF,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAKvE,qBAAa,gBAAiB,SAAQ,WAAW;;cAK/B,WAAW,CACzB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,sBAAsB,CAAC;IAiDlC;;;OAGG;IACH,OAAO,CAAC,sBAAsB;CAY/B"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AbyssaleExecutor = void 0;
|
|
4
|
+
const plugin_base_1 = require("@gravity-platform/plugin-base");
|
|
5
|
+
const abyssaleService_1 = require("../service/abyssaleService");
|
|
6
|
+
const NODE_TYPE = "Abyssale";
|
|
7
|
+
class AbyssaleExecutor extends plugin_base_1.PromiseNode {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(NODE_TYPE);
|
|
10
|
+
}
|
|
11
|
+
async executeNode(inputs, config, context) {
|
|
12
|
+
const logger = context.api?.createLogger?.("Abyssale") || this.logger;
|
|
13
|
+
logger.info("Starting Abyssale template render", {
|
|
14
|
+
nodeId: context.nodeId,
|
|
15
|
+
templateId: config.templateId,
|
|
16
|
+
formatName: config.formatName,
|
|
17
|
+
});
|
|
18
|
+
// Build credential context
|
|
19
|
+
const credentialContext = this.buildCredentialContext(context);
|
|
20
|
+
try {
|
|
21
|
+
// Route to appropriate API based on multiPage toggle
|
|
22
|
+
const result = config.multiPage
|
|
23
|
+
? await (0, abyssaleService_1.renderMultiPagePdf)(config, credentialContext, context.api)
|
|
24
|
+
: await (0, abyssaleService_1.renderTemplate)(config, credentialContext, context.api);
|
|
25
|
+
logger.info("Abyssale render completed", {
|
|
26
|
+
templateId: result.template.id,
|
|
27
|
+
templateName: result.template.name,
|
|
28
|
+
fileType: result.file.type,
|
|
29
|
+
cdnUrl: result.file.cdn_url,
|
|
30
|
+
});
|
|
31
|
+
// Return with __outputs wrapper
|
|
32
|
+
return {
|
|
33
|
+
__outputs: {
|
|
34
|
+
output: {
|
|
35
|
+
url: result.file.url,
|
|
36
|
+
cdnUrl: result.file.cdn_url,
|
|
37
|
+
fileType: result.file.type,
|
|
38
|
+
filename: result.file.filename,
|
|
39
|
+
width: result.format.width,
|
|
40
|
+
height: result.format.height,
|
|
41
|
+
templateId: result.template.id,
|
|
42
|
+
templateName: result.template.name,
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
logger.error("Abyssale render failed", {
|
|
49
|
+
templateId: config.templateId,
|
|
50
|
+
error: error instanceof Error ? error.message : "Unknown error",
|
|
51
|
+
});
|
|
52
|
+
throw error;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Build credential context from execution context
|
|
57
|
+
* Uses validateAndGetContext like other working nodes (BedrockClaude, OpenAIStream)
|
|
58
|
+
*/
|
|
59
|
+
buildCredentialContext(context) {
|
|
60
|
+
const { workflowId, executionId, nodeId } = this.validateAndGetContext(context);
|
|
61
|
+
return {
|
|
62
|
+
workflowId,
|
|
63
|
+
executionId,
|
|
64
|
+
nodeId,
|
|
65
|
+
nodeType: NODE_TYPE,
|
|
66
|
+
config: context.config,
|
|
67
|
+
credentials: context.credentials || {},
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
exports.AbyssaleExecutor = AbyssaleExecutor;
|
|
72
|
+
//# sourceMappingURL=executor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../src/Abyssale/node/executor.ts"],"names":[],"mappings":";;;AAAA,+DAAuF;AAEvF,gEAAgF;AAEhF,MAAM,SAAS,GAAG,UAAU,CAAC;AAE7B,MAAa,gBAAiB,SAAQ,yBAAW;IAC/C;QACE,KAAK,CAAC,SAAS,CAAC,CAAC;IACnB,CAAC;IAES,KAAK,CAAC,WAAW,CACzB,MAA2B,EAC3B,MAAsB,EACtB,OAA6B;QAE7B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AAM,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM;wBAC5B,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,EAAE;wBAC9B,YAAY,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI;qBACnC;iBACF;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,KAAK,CAAC,wBAAwB,EAAE;gBACrC,UAAU,EAAE,MAAM,CAAC,UAAU;gBAC7B,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;aAChE,CAAC,CAAC;YACH,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;IAED;;;OAGG;IACK,sBAAsB,CAAC,OAA6B;QAC1D,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;QAEhF,OAAO;YACL,UAAU;YACV,WAAW;YACX,MAAM;YACN,QAAQ,EAAE,SAAS;YACnB,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,EAAE;SACvC,CAAC;IACJ,CAAC;CACF;AA1ED,4CA0EC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type EnhancedNodeDefinition } from "@gravity-platform/plugin-base";
|
|
2
|
+
import { AbyssaleExecutor } from "./executor";
|
|
3
|
+
export declare const NODE_TYPE = "Abyssale";
|
|
4
|
+
declare function createNodeDefinition(): EnhancedNodeDefinition;
|
|
5
|
+
export declare const AbyssaleNode: {
|
|
6
|
+
definition: any;
|
|
7
|
+
executor: typeof AbyssaleExecutor;
|
|
8
|
+
};
|
|
9
|
+
export { createNodeDefinition };
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Abyssale/node/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC3F,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C,eAAO,MAAM,SAAS,aAAa,CAAC;AAEpC,iBAAS,oBAAoB,IAAI,sBAAsB,CAgFtD;AAID,eAAO,MAAM,YAAY;;;CAGxB,CAAC;AAEF,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AbyssaleNode = exports.NODE_TYPE = void 0;
|
|
4
|
+
exports.createNodeDefinition = createNodeDefinition;
|
|
5
|
+
const plugin_base_1 = require("@gravity-platform/plugin-base");
|
|
6
|
+
const executor_1 = require("./executor");
|
|
7
|
+
exports.NODE_TYPE = "Abyssale";
|
|
8
|
+
function createNodeDefinition() {
|
|
9
|
+
return {
|
|
10
|
+
packageVersion: "1.0.0",
|
|
11
|
+
type: exports.NODE_TYPE,
|
|
12
|
+
name: "Abyssale",
|
|
13
|
+
description: "Generate high-quality images and PDFs from Abyssale templates",
|
|
14
|
+
category: "Output",
|
|
15
|
+
logoUrl: "https://res.cloudinary.com/sonik/image/upload/v1768052235/gravity/icons/abyssale-picto-airtable.png",
|
|
16
|
+
color: "#6366F1",
|
|
17
|
+
inputs: [
|
|
18
|
+
{
|
|
19
|
+
name: "data",
|
|
20
|
+
type: plugin_base_1.NodeInputType.OBJECT,
|
|
21
|
+
description: "Data to populate template elements",
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
outputs: [
|
|
25
|
+
{
|
|
26
|
+
name: "output",
|
|
27
|
+
type: plugin_base_1.NodeInputType.OBJECT,
|
|
28
|
+
description: "Generated asset with url, cdnUrl, fileType, width, height",
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
configSchema: {
|
|
32
|
+
type: "object",
|
|
33
|
+
properties: {
|
|
34
|
+
templateId: {
|
|
35
|
+
type: "string",
|
|
36
|
+
title: "Template ID",
|
|
37
|
+
description: "Abyssale template UUID (from your Abyssale dashboard)",
|
|
38
|
+
},
|
|
39
|
+
multiPage: {
|
|
40
|
+
type: "boolean",
|
|
41
|
+
title: "Multi-Page PDF",
|
|
42
|
+
description: "Generate a multi-page PDF document",
|
|
43
|
+
default: false,
|
|
44
|
+
"ui:widget": "toggle",
|
|
45
|
+
},
|
|
46
|
+
pageCount: {
|
|
47
|
+
type: "number",
|
|
48
|
+
title: "Page Count",
|
|
49
|
+
description: "Number of pages in the template",
|
|
50
|
+
minimum: 1,
|
|
51
|
+
maximum: 50,
|
|
52
|
+
default: 2,
|
|
53
|
+
"ui:dependencies": {
|
|
54
|
+
multiPage: true,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
compressionLevel: {
|
|
58
|
+
type: "number",
|
|
59
|
+
title: "Compression Level",
|
|
60
|
+
description: "JPEG compression percentage (1-100)",
|
|
61
|
+
default: 80,
|
|
62
|
+
minimum: 1,
|
|
63
|
+
maximum: 100,
|
|
64
|
+
},
|
|
65
|
+
elements: {
|
|
66
|
+
type: "object",
|
|
67
|
+
title: "Elements",
|
|
68
|
+
description: "Map template layer names to values. JS: return { 'layer-name': { payload: input.text } }",
|
|
69
|
+
default: "",
|
|
70
|
+
"ui:field": "template",
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
required: ["templateId"],
|
|
74
|
+
},
|
|
75
|
+
credentials: [
|
|
76
|
+
{
|
|
77
|
+
name: "abyssaleCredential",
|
|
78
|
+
required: true,
|
|
79
|
+
displayName: "Abyssale",
|
|
80
|
+
description: "Abyssale API credentials",
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
const definition = createNodeDefinition();
|
|
86
|
+
exports.AbyssaleNode = {
|
|
87
|
+
definition,
|
|
88
|
+
executor: executor_1.AbyssaleExecutor,
|
|
89
|
+
};
|
|
90
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Abyssale/node/index.ts"],"names":[],"mappings":";;;AA8FS,oDAAoB;AA9F7B,+DAA2F;AAC3F,yCAA8C;AAEjC,QAAA,SAAS,GAAG,UAAU,CAAC;AAEpC,SAAS,oBAAoB;IAC3B,OAAO;QACL,cAAc,EAAE,OAAO;QACvB,IAAI,EAAE,iBAAS;QACf,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,+DAA+D;QAC5E,QAAQ,EAAE,QAAQ;QAClB,OAAO,EAAE,qGAAqG;QAC9G,KAAK,EAAE,SAAS;QAEhB,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,2BAAa,CAAC,MAAM;gBAC1B,WAAW,EAAE,oCAAoC;aAClD;SACF;QAED,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,2BAAa,CAAC,MAAM;gBAC1B,WAAW,EAAE,2DAA2D;aACzE;SACF;QAED,YAAY,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,aAAa;oBACpB,WAAW,EAAE,uDAAuD;iBACrE;gBACD,SAAS,EAAE;oBACT,IAAI,EAAE,SAAS;oBACf,KAAK,EAAE,gBAAgB;oBACvB,WAAW,EAAE,oCAAoC;oBACjD,OAAO,EAAE,KAAK;oBACd,WAAW,EAAE,QAAQ;iBACtB;gBACD,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,YAAY;oBACnB,WAAW,EAAE,iCAAiC;oBAC9C,OAAO,EAAE,CAAC;oBACV,OAAO,EAAE,EAAE;oBACX,OAAO,EAAE,CAAC;oBACV,iBAAiB,EAAE;wBACjB,SAAS,EAAE,IAAI;qBAChB;iBACF;gBACD,gBAAgB,EAAE;oBAChB,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,mBAAmB;oBAC1B,WAAW,EAAE,qCAAqC;oBAClD,OAAO,EAAE,EAAE;oBACX,OAAO,EAAE,CAAC;oBACV,OAAO,EAAE,GAAG;iBACb;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,UAAU;oBACjB,WAAW,EAAE,0FAA0F;oBACvG,OAAO,EAAE,EAAE;oBACX,UAAU,EAAE,UAAU;iBACvB;aACF;YACD,QAAQ,EAAE,CAAC,YAAY,CAAC;SACzB;QAED,WAAW,EAAE;YACX;gBACE,IAAI,EAAE,oBAAoB;gBAC1B,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,UAAU;gBACvB,WAAW,EAAE,0BAA0B;aACxC;SACF;KACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,GAAG,oBAAoB,EAAE,CAAC;AAE7B,QAAA,YAAY,GAAG;IAC1B,UAAU;IACV,QAAQ,EAAE,2BAAgB;CAC3B,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Abyssale API Service
|
|
3
|
+
* Handles API calls to Abyssale for template rendering
|
|
4
|
+
* Supports both static (sync) and printer/animated (async) templates
|
|
5
|
+
*/
|
|
6
|
+
import { AbyssaleConfig, AbyssaleOutput } from "../util/types";
|
|
7
|
+
export interface DesignDetails {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
type: string;
|
|
11
|
+
pages?: string[];
|
|
12
|
+
elements: Array<{
|
|
13
|
+
name: string;
|
|
14
|
+
type: string;
|
|
15
|
+
page?: string;
|
|
16
|
+
}>;
|
|
17
|
+
formats: Array<{
|
|
18
|
+
id: string;
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
}>;
|
|
22
|
+
}
|
|
23
|
+
export interface CredentialContext {
|
|
24
|
+
workflowId: string;
|
|
25
|
+
executionId: string;
|
|
26
|
+
nodeId: string;
|
|
27
|
+
nodeType: string;
|
|
28
|
+
config: any;
|
|
29
|
+
credentials?: Record<string, any>;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Render an Abyssale template with the given elements
|
|
33
|
+
* Automatically handles static (sync) vs printer/animated (async) templates
|
|
34
|
+
*/
|
|
35
|
+
export declare function renderTemplate(config: AbyssaleConfig, credentialContext: CredentialContext, api: any): Promise<AbyssaleOutput>;
|
|
36
|
+
/**
|
|
37
|
+
* Get design details including page structure
|
|
38
|
+
*/
|
|
39
|
+
export declare function getDesignDetails(templateId: string, apiKey: string): Promise<DesignDetails>;
|
|
40
|
+
/**
|
|
41
|
+
* Render a multi-page PDF from Abyssale template
|
|
42
|
+
* Replicates elements to all pages if flat elements provided
|
|
43
|
+
*/
|
|
44
|
+
export declare function renderMultiPagePdf(config: AbyssaleConfig, credentialContext: CredentialContext, api: any): Promise<AbyssaleOutput>;
|
|
45
|
+
//# sourceMappingURL=abyssaleService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abyssaleService.d.ts","sourceRoot":"","sources":["../../../src/Abyssale/service/abyssaleService.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAM/D,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/D,OAAO,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC/D;AAED,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,GAAG,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACnC;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,cAAc,EACtB,iBAAiB,EAAE,iBAAiB,EACpC,GAAG,EAAE,GAAG,GACP,OAAO,CAAC,cAAc,CAAC,CA8DzB;AA4GD;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CA6BjG;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,cAAc,EACtB,iBAAiB,EAAE,iBAAiB,EACpC,GAAG,EAAE,GAAG,GACP,OAAO,CAAC,cAAc,CAAC,CA4FzB"}
|
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Abyssale API Service
|
|
4
|
+
* Handles API calls to Abyssale for template rendering
|
|
5
|
+
* Supports both static (sync) and printer/animated (async) templates
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.renderTemplate = renderTemplate;
|
|
9
|
+
exports.getDesignDetails = getDesignDetails;
|
|
10
|
+
exports.renderMultiPagePdf = renderMultiPagePdf;
|
|
11
|
+
const ABYSSALE_API_BASE = "https://api.abyssale.com";
|
|
12
|
+
const POLL_INTERVAL_MS = 2000;
|
|
13
|
+
const MAX_POLL_ATTEMPTS = 60; // 2 minutes max
|
|
14
|
+
/**
|
|
15
|
+
* Render an Abyssale template with the given elements
|
|
16
|
+
* Automatically handles static (sync) vs printer/animated (async) templates
|
|
17
|
+
*/
|
|
18
|
+
async function renderTemplate(config, credentialContext, api) {
|
|
19
|
+
const credentials = await api.getNodeCredentials(credentialContext, "abyssaleCredential");
|
|
20
|
+
if (!credentials?.apiKey) {
|
|
21
|
+
throw new Error("Abyssale API key not found in credentials. Ensure abyssaleCredential is configured on the node.");
|
|
22
|
+
}
|
|
23
|
+
const { templateId, formatName, compressionLevel, elements } = config;
|
|
24
|
+
if (!templateId) {
|
|
25
|
+
throw new Error("Template ID is required");
|
|
26
|
+
}
|
|
27
|
+
// Parse elements if it's a string (from template field)
|
|
28
|
+
let parsedElements = {};
|
|
29
|
+
if (typeof elements === "string") {
|
|
30
|
+
try {
|
|
31
|
+
parsedElements = elements.trim() ? JSON.parse(elements) : {};
|
|
32
|
+
}
|
|
33
|
+
catch (e) {
|
|
34
|
+
throw new Error(`Invalid elements JSON: ${e}`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
else if (elements && typeof elements === "object") {
|
|
38
|
+
parsedElements = elements;
|
|
39
|
+
}
|
|
40
|
+
// Sanitize empty string payloads to spaces (Abyssale requires non-blank values)
|
|
41
|
+
parsedElements = sanitizeElements(parsedElements);
|
|
42
|
+
// Build request body
|
|
43
|
+
const requestBody = {
|
|
44
|
+
elements: parsedElements,
|
|
45
|
+
};
|
|
46
|
+
if (formatName) {
|
|
47
|
+
requestBody.template_format_name = formatName;
|
|
48
|
+
}
|
|
49
|
+
if (compressionLevel !== undefined) {
|
|
50
|
+
requestBody.file_compression_level = compressionLevel;
|
|
51
|
+
}
|
|
52
|
+
// Try sync endpoint first (for static templates)
|
|
53
|
+
const syncResponse = await fetch(`${ABYSSALE_API_BASE}/banner-builder/${templateId}/generate`, {
|
|
54
|
+
method: "POST",
|
|
55
|
+
headers: {
|
|
56
|
+
"Content-Type": "application/json",
|
|
57
|
+
"x-api-key": credentials.apiKey,
|
|
58
|
+
},
|
|
59
|
+
body: JSON.stringify(requestBody),
|
|
60
|
+
});
|
|
61
|
+
if (syncResponse.ok) {
|
|
62
|
+
return await syncResponse.json();
|
|
63
|
+
}
|
|
64
|
+
// Check if it's a "not static" error - need async endpoint
|
|
65
|
+
const errorText = await syncResponse.text();
|
|
66
|
+
if (errorText.includes("template_not_static") || errorText.includes("Use the /async endpoint")) {
|
|
67
|
+
return await renderTemplateAsync(templateId, requestBody, credentials.apiKey);
|
|
68
|
+
}
|
|
69
|
+
throw new Error(`Abyssale API error (${syncResponse.status}): ${errorText}`);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Render template using async endpoint (for printer/animated templates)
|
|
73
|
+
* Polls for completion and returns the result
|
|
74
|
+
*/
|
|
75
|
+
async function renderTemplateAsync(templateId, requestBody, apiKey) {
|
|
76
|
+
console.log("[Abyssale] Using async endpoint for printer template:", templateId);
|
|
77
|
+
// Start async generation
|
|
78
|
+
const asyncResponse = await fetch(`${ABYSSALE_API_BASE}/async/banner-builder/${templateId}/generate`, {
|
|
79
|
+
method: "POST",
|
|
80
|
+
headers: {
|
|
81
|
+
"Content-Type": "application/json",
|
|
82
|
+
"x-api-key": apiKey,
|
|
83
|
+
},
|
|
84
|
+
body: JSON.stringify(requestBody),
|
|
85
|
+
});
|
|
86
|
+
if (!asyncResponse.ok) {
|
|
87
|
+
const errorText = await asyncResponse.text();
|
|
88
|
+
throw new Error(`Abyssale async API error (${asyncResponse.status}): ${errorText}`);
|
|
89
|
+
}
|
|
90
|
+
const asyncResult = await asyncResponse.json();
|
|
91
|
+
const generationRequestId = asyncResult.generation_request_id;
|
|
92
|
+
console.log("[Abyssale] Async generation started, request ID:", generationRequestId);
|
|
93
|
+
if (!generationRequestId) {
|
|
94
|
+
throw new Error("No generation_request_id returned from async endpoint");
|
|
95
|
+
}
|
|
96
|
+
// Poll for completion using /generation-request/{id} endpoint
|
|
97
|
+
for (let attempt = 0; attempt < MAX_POLL_ATTEMPTS; attempt++) {
|
|
98
|
+
await sleep(POLL_INTERVAL_MS);
|
|
99
|
+
console.log(`[Abyssale] Polling attempt ${attempt + 1}/${MAX_POLL_ATTEMPTS}...`);
|
|
100
|
+
const statusResponse = await fetch(`${ABYSSALE_API_BASE}/generation-request/${generationRequestId}`, {
|
|
101
|
+
method: "GET",
|
|
102
|
+
headers: {
|
|
103
|
+
"x-api-key": apiKey,
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
if (!statusResponse.ok) {
|
|
107
|
+
const errorText = await statusResponse.text();
|
|
108
|
+
console.log(`[Abyssale] Poll failed (${statusResponse.status}):`, errorText);
|
|
109
|
+
throw new Error(`Abyssale status check error (${statusResponse.status}): ${errorText}`);
|
|
110
|
+
}
|
|
111
|
+
const statusResult = await statusResponse.json();
|
|
112
|
+
console.log(`[Abyssale] Poll result: is_finalized=${statusResult.is_finalized}`, JSON.stringify(statusResult, null, 2));
|
|
113
|
+
// Check if generation is complete (is_finalized = true)
|
|
114
|
+
if (statusResult.is_finalized) {
|
|
115
|
+
// Check for errors first
|
|
116
|
+
if (statusResult.errors?.length > 0 && (!statusResult.banners || statusResult.banners.length === 0)) {
|
|
117
|
+
const errorMessages = statusResult.errors.map((e) => e.reason).join("; ");
|
|
118
|
+
throw new Error(`Abyssale generation failed: ${errorMessages}`);
|
|
119
|
+
}
|
|
120
|
+
// Response may have "banners" array or direct file info
|
|
121
|
+
const banner = statusResult.banners?.[0] || statusResult;
|
|
122
|
+
const file = banner?.file || statusResult.file;
|
|
123
|
+
if (file) {
|
|
124
|
+
return {
|
|
125
|
+
id: generationRequestId,
|
|
126
|
+
file: {
|
|
127
|
+
type: file.type || "pdf",
|
|
128
|
+
url: file.url,
|
|
129
|
+
cdn_url: file.cdn_url || file.url,
|
|
130
|
+
filename: file.filename || `${generationRequestId}.pdf`,
|
|
131
|
+
},
|
|
132
|
+
format: banner?.format || statusResult.format || { id: "default", width: 0, height: 0 },
|
|
133
|
+
template: banner?.template ||
|
|
134
|
+
statusResult.template || {
|
|
135
|
+
id: templateId,
|
|
136
|
+
name: "",
|
|
137
|
+
type: "printer",
|
|
138
|
+
created_at: 0,
|
|
139
|
+
updated_at: 0,
|
|
140
|
+
},
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
throw new Error(`Abyssale generation timed out after ${(MAX_POLL_ATTEMPTS * POLL_INTERVAL_MS) / 1000} seconds`);
|
|
146
|
+
}
|
|
147
|
+
function sleep(ms) {
|
|
148
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Check if a string looks like a URL (for image layer detection)
|
|
152
|
+
*/
|
|
153
|
+
function isUrl(value) {
|
|
154
|
+
return value.startsWith("http://") || value.startsWith("https://") || value.startsWith("data:");
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Get design details including page structure
|
|
158
|
+
*/
|
|
159
|
+
async function getDesignDetails(templateId, apiKey) {
|
|
160
|
+
const response = await fetch(`${ABYSSALE_API_BASE}/designs/${templateId}`, {
|
|
161
|
+
method: "GET",
|
|
162
|
+
headers: {
|
|
163
|
+
"x-api-key": apiKey,
|
|
164
|
+
},
|
|
165
|
+
});
|
|
166
|
+
if (!response.ok) {
|
|
167
|
+
const errorText = await response.text();
|
|
168
|
+
throw new Error(`Failed to get design details (${response.status}): ${errorText}`);
|
|
169
|
+
}
|
|
170
|
+
const data = await response.json();
|
|
171
|
+
// Extract unique page keys from elements if present
|
|
172
|
+
const pageSet = new Set();
|
|
173
|
+
if (data.elements) {
|
|
174
|
+
for (const el of data.elements) {
|
|
175
|
+
if (el.page) {
|
|
176
|
+
pageSet.add(el.page);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
return {
|
|
181
|
+
...data,
|
|
182
|
+
pages: pageSet.size > 0 ? Array.from(pageSet).sort() : undefined,
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Render a multi-page PDF from Abyssale template
|
|
187
|
+
* Replicates elements to all pages if flat elements provided
|
|
188
|
+
*/
|
|
189
|
+
async function renderMultiPagePdf(config, credentialContext, api) {
|
|
190
|
+
const credentials = await api.getNodeCredentials(credentialContext, "abyssaleCredential");
|
|
191
|
+
if (!credentials?.apiKey) {
|
|
192
|
+
throw new Error("Abyssale API key not found in credentials.");
|
|
193
|
+
}
|
|
194
|
+
const { templateId, elements, pageCount } = config;
|
|
195
|
+
if (!templateId) {
|
|
196
|
+
throw new Error("Template ID is required");
|
|
197
|
+
}
|
|
198
|
+
// Parse elements
|
|
199
|
+
let parsedElements = {};
|
|
200
|
+
if (typeof elements === "string") {
|
|
201
|
+
try {
|
|
202
|
+
parsedElements = elements.trim() ? JSON.parse(elements) : {};
|
|
203
|
+
}
|
|
204
|
+
catch (e) {
|
|
205
|
+
throw new Error(`Invalid elements JSON: ${e}`);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
else if (elements && typeof elements === "object") {
|
|
209
|
+
parsedElements = elements;
|
|
210
|
+
}
|
|
211
|
+
let pagesPayload;
|
|
212
|
+
// Check if user already provided pages structure
|
|
213
|
+
if (parsedElements.pages && typeof parsedElements.pages === "object") {
|
|
214
|
+
// User provided { pages: { page_1: {...}, page_2: {...} } }
|
|
215
|
+
pagesPayload = parsedElements.pages;
|
|
216
|
+
// Sanitize each page's elements
|
|
217
|
+
for (const pageKey of Object.keys(pagesPayload)) {
|
|
218
|
+
pagesPayload[pageKey] = sanitizeElements(pagesPayload[pageKey]);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
// Flat elements - need to replicate to all pages
|
|
223
|
+
// First, try to get page count from design details
|
|
224
|
+
let numPages = pageCount || 1;
|
|
225
|
+
if (!pageCount) {
|
|
226
|
+
try {
|
|
227
|
+
const designDetails = await getDesignDetails(templateId, credentials.apiKey);
|
|
228
|
+
if (designDetails.pages && designDetails.pages.length > 0) {
|
|
229
|
+
numPages = designDetails.pages.length;
|
|
230
|
+
console.log(`[Abyssale] Detected ${numPages} pages from design`);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
catch (e) {
|
|
234
|
+
console.log(`[Abyssale] Could not fetch design details, using pageCount=${numPages}`);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
// Sanitize and replicate to all pages
|
|
238
|
+
const sanitizedElements = sanitizeElements(parsedElements);
|
|
239
|
+
pagesPayload = {};
|
|
240
|
+
for (let i = 1; i <= numPages; i++) {
|
|
241
|
+
pagesPayload[`page_${i}`] = { ...sanitizedElements };
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
console.log(`[Abyssale] Generating multi-page PDF with ${Object.keys(pagesPayload).length} pages`);
|
|
245
|
+
// Multi-page PDFs use /async/banner-builder/ endpoint with { pages: {...} }
|
|
246
|
+
const response = await fetch(`${ABYSSALE_API_BASE}/async/banner-builder/${templateId}/generate`, {
|
|
247
|
+
method: "POST",
|
|
248
|
+
headers: {
|
|
249
|
+
"Content-Type": "application/json",
|
|
250
|
+
"x-api-key": credentials.apiKey,
|
|
251
|
+
},
|
|
252
|
+
body: JSON.stringify({ pages: pagesPayload }),
|
|
253
|
+
});
|
|
254
|
+
if (!response.ok) {
|
|
255
|
+
const errorText = await response.text();
|
|
256
|
+
throw new Error(`Abyssale multi-page API error (${response.status}): ${errorText}`);
|
|
257
|
+
}
|
|
258
|
+
const result = await response.json();
|
|
259
|
+
// Multi-page printer templates return generation_request_id for async polling
|
|
260
|
+
if (result.generation_request_id) {
|
|
261
|
+
console.log(`[Abyssale] Multi-page generation started (async), request ID: ${result.generation_request_id}`);
|
|
262
|
+
return await pollForCompletion(result.generation_request_id, templateId, credentials.apiKey);
|
|
263
|
+
}
|
|
264
|
+
// If sync response (has file directly), return it
|
|
265
|
+
if (result.file) {
|
|
266
|
+
console.log(`[Abyssale] Multi-page generation completed (sync)`);
|
|
267
|
+
return result;
|
|
268
|
+
}
|
|
269
|
+
throw new Error("Unexpected response from Abyssale: no generation_request_id or file");
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Poll for async generation completion
|
|
273
|
+
*/
|
|
274
|
+
async function pollForCompletion(generationRequestId, templateId, apiKey) {
|
|
275
|
+
for (let attempt = 0; attempt < MAX_POLL_ATTEMPTS; attempt++) {
|
|
276
|
+
await sleep(POLL_INTERVAL_MS);
|
|
277
|
+
const statusResponse = await fetch(`${ABYSSALE_API_BASE}/generation-request/${generationRequestId}`, {
|
|
278
|
+
method: "GET",
|
|
279
|
+
headers: { "x-api-key": apiKey },
|
|
280
|
+
});
|
|
281
|
+
if (!statusResponse.ok) {
|
|
282
|
+
const errorText = await statusResponse.text();
|
|
283
|
+
throw new Error(`Abyssale status check error (${statusResponse.status}): ${errorText}`);
|
|
284
|
+
}
|
|
285
|
+
const statusResult = await statusResponse.json();
|
|
286
|
+
if (statusResult.is_finalized) {
|
|
287
|
+
if (statusResult.errors?.length > 0 && (!statusResult.banners || statusResult.banners.length === 0)) {
|
|
288
|
+
const errorMessages = statusResult.errors.map((e) => e.reason).join("; ");
|
|
289
|
+
throw new Error(`Abyssale generation failed: ${errorMessages}`);
|
|
290
|
+
}
|
|
291
|
+
const banner = statusResult.banners?.[0] || statusResult;
|
|
292
|
+
const file = banner?.file || statusResult.file;
|
|
293
|
+
if (file) {
|
|
294
|
+
return {
|
|
295
|
+
id: generationRequestId,
|
|
296
|
+
file: {
|
|
297
|
+
type: file.type || "pdf",
|
|
298
|
+
url: file.url,
|
|
299
|
+
cdn_url: file.cdn_url || file.url,
|
|
300
|
+
filename: file.filename || `${generationRequestId}.pdf`,
|
|
301
|
+
},
|
|
302
|
+
format: banner?.format || statusResult.format || { id: "default", width: 0, height: 0 },
|
|
303
|
+
template: banner?.template ||
|
|
304
|
+
statusResult.template || {
|
|
305
|
+
id: templateId,
|
|
306
|
+
name: "",
|
|
307
|
+
type: "multi-page",
|
|
308
|
+
created_at: 0,
|
|
309
|
+
updated_at: 0,
|
|
310
|
+
},
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
throw new Error(`Abyssale generation timed out after ${(MAX_POLL_ATTEMPTS * POLL_INTERVAL_MS) / 1000} seconds`);
|
|
316
|
+
}
|
|
317
|
+
function sanitizeElements(elements) {
|
|
318
|
+
const sanitized = {};
|
|
319
|
+
for (const [key, value] of Object.entries(elements)) {
|
|
320
|
+
if (value && typeof value === "object" && ("payload" in value || "image_url" in value)) {
|
|
321
|
+
// Already in correct format: { payload: "..." } or { image_url: "..." }
|
|
322
|
+
if ("image_url" in value) {
|
|
323
|
+
sanitized[key] = value;
|
|
324
|
+
}
|
|
325
|
+
else {
|
|
326
|
+
let payload = value.payload;
|
|
327
|
+
if (payload === "" || (typeof payload === "string" && payload.trim() === "")) {
|
|
328
|
+
payload = "_";
|
|
329
|
+
}
|
|
330
|
+
else if (typeof payload === "string") {
|
|
331
|
+
payload = payload.replace(/\\n/g, "\n");
|
|
332
|
+
}
|
|
333
|
+
sanitized[key] = { ...value, payload };
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
else if (typeof value === "string") {
|
|
337
|
+
if (isUrl(value)) {
|
|
338
|
+
// URL string - wrap as image_url for image layers
|
|
339
|
+
sanitized[key] = { image_url: value };
|
|
340
|
+
}
|
|
341
|
+
else {
|
|
342
|
+
// Text string - wrap in payload object
|
|
343
|
+
let payload = value;
|
|
344
|
+
if (payload === "" || payload.trim() === "") {
|
|
345
|
+
payload = "_";
|
|
346
|
+
}
|
|
347
|
+
else {
|
|
348
|
+
payload = payload.replace(/\\n/g, "\n");
|
|
349
|
+
}
|
|
350
|
+
sanitized[key] = { payload };
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
else if (value !== null && value !== undefined) {
|
|
354
|
+
// Other types (numbers, etc) - wrap in payload
|
|
355
|
+
sanitized[key] = { payload: String(value) };
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
return sanitized;
|
|
359
|
+
}
|
|
360
|
+
//# sourceMappingURL=abyssaleService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abyssaleService.js","sourceRoot":"","sources":["../../../src/Abyssale/service/abyssaleService.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AA8BH,wCAkEC;AA+GD,4CA6BC;AAMD,gDAgGC;AA9UD,MAAM,iBAAiB,GAAG,0BAA0B,CAAC;AACrD,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAC9B,MAAM,iBAAiB,GAAG,EAAE,CAAC,CAAC,gBAAgB;AAoB9C;;;GAGG;AACI,KAAK,UAAU,cAAc,CAClC,MAAsB,EACtB,iBAAoC,EACpC,GAAQ;IAER,MAAM,WAAW,GAAG,MAAM,GAAG,CAAC,kBAAkB,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,CAAC;IAE1F,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,iGAAiG,CAAC,CAAC;IACrH,CAAC;IAED,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,gBAAgB,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;IAEtE,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IAED,wDAAwD;IACxD,IAAI,cAAc,GAAwB,EAAE,CAAC;IAC7C,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;QACjC,IAAI,CAAC;YACH,cAAc,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/D,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,EAAE,CAAC,CAAC;QACjD,CAAC;IACH,CAAC;SAAM,IAAI,QAAQ,IAAI,OA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