File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import {
2- ICredentialType ,
3- INodeProperties ,
2+ IAuthenticateGeneric ,
3+ ICredentialTestRequest ,
4+ ICredentialType ,
5+ INodeProperties ,
46} from 'n8n-workflow' ;
57
68export class JigsawStackApi implements ICredentialType {
79 name = 'jigsawStackApi' ;
810 displayName = 'JigsawStack API' ;
911 documentationUrl = 'https://jigsawstack.com/docs' ;
12+
1013 properties : INodeProperties [ ] = [
1114 {
1215 displayName : 'API Key' ,
@@ -19,4 +22,27 @@ export class JigsawStackApi implements ICredentialType {
1922 required : true ,
2023 } ,
2124 ] ;
22- }
25+
26+ authenticate : IAuthenticateGeneric = {
27+ type : 'generic' ,
28+ properties : {
29+ headers : {
30+ 'x-api-key' : '={{$credentials.apiKey}}' ,
31+ accept : 'application/json' ,
32+ 'Content-Type' : 'application/json' ,
33+ } ,
34+ } ,
35+ } ;
36+
37+ test : ICredentialTestRequest = {
38+ request : {
39+ method : 'POST' ,
40+ url : 'https://api.jigsawstack.com/v1/ai/translate' ,
41+ body : {
42+ text : [ 'Hello' ] ,
43+ target_language : 'zh' ,
44+ } ,
45+ json : true ,
46+ } ,
47+ } ;
48+ }
Original file line number Diff line number Diff line change 11{
22 "name" : " n8n-nodes-jigsawstack" ,
3- "version" : " 0.0.9 " ,
3+ "version" : " 0.0.10 " ,
44 "description" : " JigsawStack API integration for n8n" ,
55 "keywords" : [
66 " n8n-community-node-package" ,
You can’t perform that action at this time.
0 commit comments