@ibracob.dev/n8n-nodes-fal 1.0.0

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.
Files changed (197) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +216 -0
  3. package/dist/credentials/FalApi.credentials.d.ts +10 -0
  4. package/dist/credentials/FalApi.credentials.d.ts.map +1 -0
  5. package/dist/credentials/FalApi.credentials.js +36 -0
  6. package/dist/credentials/FalApi.credentials.js.map +1 -0
  7. package/dist/credentials/fal-ai-logo.svg +3 -0
  8. package/dist/nodes/Fal/Fal.node.d.ts +6 -0
  9. package/dist/nodes/Fal/Fal.node.d.ts.map +1 -0
  10. package/dist/nodes/Fal/Fal.node.js +202 -0
  11. package/dist/nodes/Fal/Fal.node.js.map +1 -0
  12. package/dist/nodes/Fal/enums/index.d.ts +2 -0
  13. package/dist/nodes/Fal/enums/index.d.ts.map +1 -0
  14. package/dist/nodes/Fal/enums/index.js +18 -0
  15. package/dist/nodes/Fal/enums/index.js.map +1 -0
  16. package/dist/nodes/Fal/enums/queue-status.enum.d.ts +7 -0
  17. package/dist/nodes/Fal/enums/queue-status.enum.d.ts.map +1 -0
  18. package/dist/nodes/Fal/enums/queue-status.enum.js +11 -0
  19. package/dist/nodes/Fal/enums/queue-status.enum.js.map +1 -0
  20. package/dist/nodes/Fal/fal-ai-logo.svg +3 -0
  21. package/dist/nodes/Fal/interfaces/index.d.ts +3 -0
  22. package/dist/nodes/Fal/interfaces/index.d.ts.map +1 -0
  23. package/dist/nodes/Fal/interfaces/index.js +19 -0
  24. package/dist/nodes/Fal/interfaces/index.js.map +1 -0
  25. package/dist/nodes/Fal/interfaces/queue-status-response.interface.d.ts +14 -0
  26. package/dist/nodes/Fal/interfaces/queue-status-response.interface.d.ts.map +1 -0
  27. package/dist/nodes/Fal/interfaces/queue-status-response.interface.js +3 -0
  28. package/dist/nodes/Fal/interfaces/queue-status-response.interface.js.map +1 -0
  29. package/dist/nodes/Fal/interfaces/queue-submit-response.interface.d.ts +6 -0
  30. package/dist/nodes/Fal/interfaces/queue-submit-response.interface.d.ts.map +1 -0
  31. package/dist/nodes/Fal/interfaces/queue-submit-response.interface.js +3 -0
  32. package/dist/nodes/Fal/interfaces/queue-submit-response.interface.js.map +1 -0
  33. package/dist/nodes/Fal/resources/image-editing/description.d.ts +5 -0
  34. package/dist/nodes/Fal/resources/image-editing/description.d.ts.map +1 -0
  35. package/dist/nodes/Fal/resources/image-editing/description.js +178 -0
  36. package/dist/nodes/Fal/resources/image-editing/description.js.map +1 -0
  37. package/dist/nodes/Fal/resources/image-editing/execute/index.d.ts +3 -0
  38. package/dist/nodes/Fal/resources/image-editing/execute/index.d.ts.map +1 -0
  39. package/dist/nodes/Fal/resources/image-editing/execute/index.js +63 -0
  40. package/dist/nodes/Fal/resources/image-editing/execute/index.js.map +1 -0
  41. package/dist/nodes/Fal/resources/image-editing/index.d.ts +4 -0
  42. package/dist/nodes/Fal/resources/image-editing/index.d.ts.map +1 -0
  43. package/dist/nodes/Fal/resources/image-editing/index.js +41 -0
  44. package/dist/nodes/Fal/resources/image-editing/index.js.map +1 -0
  45. package/dist/nodes/Fal/resources/image-editing/models.d.ts +6 -0
  46. package/dist/nodes/Fal/resources/image-editing/models.d.ts.map +1 -0
  47. package/dist/nodes/Fal/resources/image-editing/models.js +31 -0
  48. package/dist/nodes/Fal/resources/image-editing/models.js.map +1 -0
  49. package/dist/nodes/Fal/resources/image-to-video/description.d.ts +5 -0
  50. package/dist/nodes/Fal/resources/image-to-video/description.d.ts.map +1 -0
  51. package/dist/nodes/Fal/resources/image-to-video/description.js +236 -0
  52. package/dist/nodes/Fal/resources/image-to-video/description.js.map +1 -0
  53. package/dist/nodes/Fal/resources/image-to-video/execute/index.d.ts +3 -0
  54. package/dist/nodes/Fal/resources/image-to-video/execute/index.d.ts.map +1 -0
  55. package/dist/nodes/Fal/resources/image-to-video/execute/index.js +64 -0
  56. package/dist/nodes/Fal/resources/image-to-video/execute/index.js.map +1 -0
  57. package/dist/nodes/Fal/resources/image-to-video/index.d.ts +4 -0
  58. package/dist/nodes/Fal/resources/image-to-video/index.d.ts.map +1 -0
  59. package/dist/nodes/Fal/resources/image-to-video/index.js +41 -0
  60. package/dist/nodes/Fal/resources/image-to-video/index.js.map +1 -0
  61. package/dist/nodes/Fal/resources/image-to-video/models.d.ts +6 -0
  62. package/dist/nodes/Fal/resources/image-to-video/models.d.ts.map +1 -0
  63. package/dist/nodes/Fal/resources/image-to-video/models.js +66 -0
  64. package/dist/nodes/Fal/resources/image-to-video/models.js.map +1 -0
  65. package/dist/nodes/Fal/resources/llm/description.d.ts +5 -0
  66. package/dist/nodes/Fal/resources/llm/description.d.ts.map +1 -0
  67. package/dist/nodes/Fal/resources/llm/description.js +132 -0
  68. package/dist/nodes/Fal/resources/llm/description.js.map +1 -0
  69. package/dist/nodes/Fal/resources/llm/execute/index.d.ts +3 -0
  70. package/dist/nodes/Fal/resources/llm/execute/index.d.ts.map +1 -0
  71. package/dist/nodes/Fal/resources/llm/execute/index.js +49 -0
  72. package/dist/nodes/Fal/resources/llm/execute/index.js.map +1 -0
  73. package/dist/nodes/Fal/resources/llm/index.d.ts +4 -0
  74. package/dist/nodes/Fal/resources/llm/index.d.ts.map +1 -0
  75. package/dist/nodes/Fal/resources/llm/index.js +41 -0
  76. package/dist/nodes/Fal/resources/llm/index.js.map +1 -0
  77. package/dist/nodes/Fal/resources/llm/models.d.ts +6 -0
  78. package/dist/nodes/Fal/resources/llm/models.d.ts.map +1 -0
  79. package/dist/nodes/Fal/resources/llm/models.js +136 -0
  80. package/dist/nodes/Fal/resources/llm/models.js.map +1 -0
  81. package/dist/nodes/Fal/resources/queue/description.d.ts +4 -0
  82. package/dist/nodes/Fal/resources/queue/description.d.ts.map +1 -0
  83. package/dist/nodes/Fal/resources/queue/description.js +149 -0
  84. package/dist/nodes/Fal/resources/queue/description.js.map +1 -0
  85. package/dist/nodes/Fal/resources/queue/execute/index.d.ts +3 -0
  86. package/dist/nodes/Fal/resources/queue/execute/index.d.ts.map +1 -0
  87. package/dist/nodes/Fal/resources/queue/execute/index.js +220 -0
  88. package/dist/nodes/Fal/resources/queue/execute/index.js.map +1 -0
  89. package/dist/nodes/Fal/resources/queue/index.d.ts +4 -0
  90. package/dist/nodes/Fal/resources/queue/index.d.ts.map +1 -0
  91. package/dist/nodes/Fal/resources/queue/index.js +9 -0
  92. package/dist/nodes/Fal/resources/queue/index.js.map +1 -0
  93. package/dist/nodes/Fal/resources/queue/models.d.ts +75 -0
  94. package/dist/nodes/Fal/resources/queue/models.d.ts.map +1 -0
  95. package/dist/nodes/Fal/resources/queue/models.js +12 -0
  96. package/dist/nodes/Fal/resources/queue/models.js.map +1 -0
  97. package/dist/nodes/Fal/resources/text-to-image/description.d.ts +5 -0
  98. package/dist/nodes/Fal/resources/text-to-image/description.d.ts.map +1 -0
  99. package/dist/nodes/Fal/resources/text-to-image/description.js +165 -0
  100. package/dist/nodes/Fal/resources/text-to-image/description.js.map +1 -0
  101. package/dist/nodes/Fal/resources/text-to-image/execute/index.d.ts +3 -0
  102. package/dist/nodes/Fal/resources/text-to-image/execute/index.d.ts.map +1 -0
  103. package/dist/nodes/Fal/resources/text-to-image/execute/index.js +64 -0
  104. package/dist/nodes/Fal/resources/text-to-image/execute/index.js.map +1 -0
  105. package/dist/nodes/Fal/resources/text-to-image/index.d.ts +4 -0
  106. package/dist/nodes/Fal/resources/text-to-image/index.d.ts.map +1 -0
  107. package/dist/nodes/Fal/resources/text-to-image/index.js +41 -0
  108. package/dist/nodes/Fal/resources/text-to-image/index.js.map +1 -0
  109. package/dist/nodes/Fal/resources/text-to-image/models.d.ts +6 -0
  110. package/dist/nodes/Fal/resources/text-to-image/models.d.ts.map +1 -0
  111. package/dist/nodes/Fal/resources/text-to-image/models.js +36 -0
  112. package/dist/nodes/Fal/resources/text-to-image/models.js.map +1 -0
  113. package/dist/nodes/Fal/resources/text-to-video/description.d.ts +5 -0
  114. package/dist/nodes/Fal/resources/text-to-video/description.d.ts.map +1 -0
  115. package/dist/nodes/Fal/resources/text-to-video/description.js +174 -0
  116. package/dist/nodes/Fal/resources/text-to-video/description.js.map +1 -0
  117. package/dist/nodes/Fal/resources/text-to-video/execute/index.d.ts +3 -0
  118. package/dist/nodes/Fal/resources/text-to-video/execute/index.d.ts.map +1 -0
  119. package/dist/nodes/Fal/resources/text-to-video/execute/index.js +57 -0
  120. package/dist/nodes/Fal/resources/text-to-video/execute/index.js.map +1 -0
  121. package/dist/nodes/Fal/resources/text-to-video/index.d.ts +4 -0
  122. package/dist/nodes/Fal/resources/text-to-video/index.d.ts.map +1 -0
  123. package/dist/nodes/Fal/resources/text-to-video/index.js +41 -0
  124. package/dist/nodes/Fal/resources/text-to-video/index.js.map +1 -0
  125. package/dist/nodes/Fal/resources/text-to-video/models.d.ts +6 -0
  126. package/dist/nodes/Fal/resources/text-to-video/models.d.ts.map +1 -0
  127. package/dist/nodes/Fal/resources/text-to-video/models.js +26 -0
  128. package/dist/nodes/Fal/resources/text-to-video/models.js.map +1 -0
  129. package/dist/nodes/Fal/resources/utility/description.d.ts +5 -0
  130. package/dist/nodes/Fal/resources/utility/description.d.ts.map +1 -0
  131. package/dist/nodes/Fal/resources/utility/description.js +101 -0
  132. package/dist/nodes/Fal/resources/utility/description.js.map +1 -0
  133. package/dist/nodes/Fal/resources/utility/execute/index.d.ts +3 -0
  134. package/dist/nodes/Fal/resources/utility/execute/index.d.ts.map +1 -0
  135. package/dist/nodes/Fal/resources/utility/execute/index.js +56 -0
  136. package/dist/nodes/Fal/resources/utility/execute/index.js.map +1 -0
  137. package/dist/nodes/Fal/resources/utility/index.d.ts +4 -0
  138. package/dist/nodes/Fal/resources/utility/index.d.ts.map +1 -0
  139. package/dist/nodes/Fal/resources/utility/index.js +41 -0
  140. package/dist/nodes/Fal/resources/utility/index.js.map +1 -0
  141. package/dist/nodes/Fal/resources/utility/models.d.ts +6 -0
  142. package/dist/nodes/Fal/resources/utility/models.d.ts.map +1 -0
  143. package/dist/nodes/Fal/resources/utility/models.js +31 -0
  144. package/dist/nodes/Fal/resources/utility/models.js.map +1 -0
  145. package/dist/nodes/Fal/resources/video-to-video/description.d.ts +5 -0
  146. package/dist/nodes/Fal/resources/video-to-video/description.d.ts.map +1 -0
  147. package/dist/nodes/Fal/resources/video-to-video/description.js +144 -0
  148. package/dist/nodes/Fal/resources/video-to-video/description.js.map +1 -0
  149. package/dist/nodes/Fal/resources/video-to-video/execute/index.d.ts +3 -0
  150. package/dist/nodes/Fal/resources/video-to-video/execute/index.d.ts.map +1 -0
  151. package/dist/nodes/Fal/resources/video-to-video/execute/index.js +47 -0
  152. package/dist/nodes/Fal/resources/video-to-video/execute/index.js.map +1 -0
  153. package/dist/nodes/Fal/resources/video-to-video/index.d.ts +4 -0
  154. package/dist/nodes/Fal/resources/video-to-video/index.d.ts.map +1 -0
  155. package/dist/nodes/Fal/resources/video-to-video/index.js +41 -0
  156. package/dist/nodes/Fal/resources/video-to-video/index.js.map +1 -0
  157. package/dist/nodes/Fal/resources/video-to-video/models.d.ts +6 -0
  158. package/dist/nodes/Fal/resources/video-to-video/models.d.ts.map +1 -0
  159. package/dist/nodes/Fal/resources/video-to-video/models.js +11 -0
  160. package/dist/nodes/Fal/resources/video-to-video/models.js.map +1 -0
  161. package/dist/nodes/Fal/resources/vision/description.d.ts +5 -0
  162. package/dist/nodes/Fal/resources/vision/description.d.ts.map +1 -0
  163. package/dist/nodes/Fal/resources/vision/description.js +146 -0
  164. package/dist/nodes/Fal/resources/vision/description.js.map +1 -0
  165. package/dist/nodes/Fal/resources/vision/execute/index.d.ts +3 -0
  166. package/dist/nodes/Fal/resources/vision/execute/index.d.ts.map +1 -0
  167. package/dist/nodes/Fal/resources/vision/execute/index.js +56 -0
  168. package/dist/nodes/Fal/resources/vision/execute/index.js.map +1 -0
  169. package/dist/nodes/Fal/resources/vision/index.d.ts +4 -0
  170. package/dist/nodes/Fal/resources/vision/index.d.ts.map +1 -0
  171. package/dist/nodes/Fal/resources/vision/index.js +41 -0
  172. package/dist/nodes/Fal/resources/vision/index.js.map +1 -0
  173. package/dist/nodes/Fal/resources/vision/models.d.ts +6 -0
  174. package/dist/nodes/Fal/resources/vision/models.d.ts.map +1 -0
  175. package/dist/nodes/Fal/resources/vision/models.js +46 -0
  176. package/dist/nodes/Fal/resources/vision/models.js.map +1 -0
  177. package/dist/nodes/Fal/resources/workflow/description.d.ts +4 -0
  178. package/dist/nodes/Fal/resources/workflow/description.d.ts.map +1 -0
  179. package/dist/nodes/Fal/resources/workflow/description.js +178 -0
  180. package/dist/nodes/Fal/resources/workflow/description.js.map +1 -0
  181. package/dist/nodes/Fal/resources/workflow/execute/index.d.ts +3 -0
  182. package/dist/nodes/Fal/resources/workflow/execute/index.d.ts.map +1 -0
  183. package/dist/nodes/Fal/resources/workflow/execute/index.js +120 -0
  184. package/dist/nodes/Fal/resources/workflow/execute/index.js.map +1 -0
  185. package/dist/nodes/Fal/resources/workflow/index.d.ts +4 -0
  186. package/dist/nodes/Fal/resources/workflow/index.d.ts.map +1 -0
  187. package/dist/nodes/Fal/resources/workflow/index.js +9 -0
  188. package/dist/nodes/Fal/resources/workflow/index.js.map +1 -0
  189. package/dist/nodes/Fal/resources/workflow/models.d.ts +65 -0
  190. package/dist/nodes/Fal/resources/workflow/models.d.ts.map +1 -0
  191. package/dist/nodes/Fal/resources/workflow/models.js +9 -0
  192. package/dist/nodes/Fal/resources/workflow/models.js.map +1 -0
  193. package/dist/nodes/Fal/utils/poll-queue.util.d.ts +9 -0
  194. package/dist/nodes/Fal/utils/poll-queue.util.d.ts.map +1 -0
  195. package/dist/nodes/Fal/utils/poll-queue.util.js +62 -0
  196. package/dist/nodes/Fal/utils/poll-queue.util.js.map +1 -0
  197. package/package.json +86 -0
@@ -0,0 +1,149 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.queueFields = exports.queueOperations = void 0;
4
+ exports.queueOperations = [
5
+ {
6
+ displayName: 'Operation',
7
+ name: 'operation',
8
+ type: 'options',
9
+ noDataExpression: true,
10
+ displayOptions: {
11
+ show: {
12
+ resource: ['queue'],
13
+ },
14
+ },
15
+ options: [
16
+ {
17
+ name: 'Submit Request',
18
+ value: 'submit',
19
+ description: 'Submit a request to the queue',
20
+ action: 'Submit request to queue',
21
+ },
22
+ {
23
+ name: 'Get Status',
24
+ value: 'getStatus',
25
+ description: 'Get the status of a queued request',
26
+ action: 'Get request status',
27
+ },
28
+ {
29
+ name: 'Get Response',
30
+ value: 'getResponse',
31
+ description: 'Get the response of a completed request',
32
+ action: 'Get request response',
33
+ },
34
+ {
35
+ name: 'Cancel Request',
36
+ value: 'cancel',
37
+ description: 'Cancel a queued request that has not started processing',
38
+ action: 'Cancel request',
39
+ },
40
+ {
41
+ name: 'Stream Status',
42
+ value: 'streamStatus',
43
+ description: 'Stream status updates until request completes',
44
+ action: 'Stream request status',
45
+ },
46
+ ],
47
+ default: 'submit',
48
+ },
49
+ ];
50
+ exports.queueFields = [
51
+ // Submit Request Fields
52
+ {
53
+ displayName: 'Model Endpoint',
54
+ name: 'modelEndpoint',
55
+ type: 'string',
56
+ displayOptions: {
57
+ show: {
58
+ resource: ['queue'],
59
+ operation: ['submit'],
60
+ },
61
+ },
62
+ default: 'fal-ai/flux/dev',
63
+ description: 'The model endpoint ID (e.g., fal-ai/flux/dev, fal-ai/fast-sdxl). See <a href="https://fal.ai/models" target="_blank">Fal Models</a>.',
64
+ required: true,
65
+ },
66
+ {
67
+ displayName: 'Input Parameters',
68
+ name: 'inputParameters',
69
+ type: 'json',
70
+ displayOptions: {
71
+ show: {
72
+ resource: ['queue'],
73
+ operation: ['submit'],
74
+ },
75
+ },
76
+ default: '{\n "prompt": "a beautiful sunset"\n}',
77
+ description: 'The input parameters for the model as JSON',
78
+ required: true,
79
+ },
80
+ // Request ID Field (for status, response, cancel, stream operations)
81
+ {
82
+ displayName: 'Request ID',
83
+ name: 'requestId',
84
+ type: 'string',
85
+ displayOptions: {
86
+ show: {
87
+ resource: ['queue'],
88
+ operation: ['getStatus', 'getResponse', 'cancel', 'streamStatus'],
89
+ },
90
+ },
91
+ default: '',
92
+ description: 'The request ID returned from submitting a request',
93
+ required: true,
94
+ },
95
+ {
96
+ displayName: 'Model Endpoint',
97
+ name: 'modelEndpoint',
98
+ type: 'string',
99
+ displayOptions: {
100
+ show: {
101
+ resource: ['queue'],
102
+ operation: ['getStatus', 'getResponse', 'cancel', 'streamStatus'],
103
+ },
104
+ },
105
+ default: 'fal-ai/flux/dev',
106
+ description: 'The model endpoint ID used when submitting the request',
107
+ required: true,
108
+ },
109
+ // Options
110
+ {
111
+ displayName: 'Options',
112
+ name: 'options',
113
+ type: 'collection',
114
+ placeholder: 'Add Option',
115
+ default: {},
116
+ displayOptions: {
117
+ show: {
118
+ resource: ['queue'],
119
+ },
120
+ },
121
+ options: [
122
+ {
123
+ displayName: 'Include Logs',
124
+ name: 'includeLogs',
125
+ type: 'boolean',
126
+ default: false,
127
+ description: 'Whether to include logs in the status response',
128
+ displayOptions: {
129
+ show: {
130
+ '/operation': ['getStatus', 'streamStatus'],
131
+ },
132
+ },
133
+ },
134
+ {
135
+ displayName: 'Webhook URL',
136
+ name: 'webhookUrl',
137
+ type: 'string',
138
+ default: '',
139
+ description: 'Optional webhook URL to receive the result when the request completes. If provided, fal will call this URL instead of requiring polling.',
140
+ displayOptions: {
141
+ show: {
142
+ '/operation': ['submit'],
143
+ },
144
+ },
145
+ },
146
+ ],
147
+ },
148
+ ];
149
+ //# sourceMappingURL=description.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"description.js","sourceRoot":"","sources":["../../../../../nodes/Fal/resources/queue/description.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAsB;IACjD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,C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B,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EACV,0IAA0I;gBAC3I,cAAc,EAAE;oBACf,IAAI,EAAE;wBACL,YAAY,EAAE,CAAC,QAAQ,CAAC;qBACxB;iBACD;aACD;SACD;KACD;CACD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function executeQueue(this: IExecuteFunctions, index: number): Promise<INodeExecutionData[]>;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../nodes/Fal/resources/queue/execute/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAe,MAAM,cAAc,CAAC;AAevF,wBAAsB,YAAY,CACjC,IAAI,EAAE,iBAAiB,EACvB,KAAK,EAAE,MAAM,GACX,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAiB/B"}
@@ -0,0 +1,220 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.executeQueue = executeQueue;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const models_1 = require("../models");
6
+ async function executeQueue(index) {
7
+ const operation = this.getNodeParameter('operation', index);
8
+ switch (operation) {
9
+ case models_1.QueueOperation.Submit:
10
+ return await submitRequest.call(this, index);
11
+ case models_1.QueueOperation.GetStatus:
12
+ return await getStatus.call(this, index);
13
+ case models_1.QueueOperation.GetResponse:
14
+ return await getResponse.call(this, index);
15
+ case models_1.QueueOperation.Cancel:
16
+ return await cancelRequest.call(this, index);
17
+ case models_1.QueueOperation.StreamStatus:
18
+ return await streamStatus.call(this, index);
19
+ default:
20
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unsupported operation: ${operation}`);
21
+ }
22
+ }
23
+ async function submitRequest(index) {
24
+ const params = this.getNodeParameter('', index);
25
+ const options = params.options || {};
26
+ let inputParameters;
27
+ try {
28
+ inputParameters = JSON.parse(params.inputParameters);
29
+ }
30
+ catch (error) {
31
+ const errorMessage = error instanceof Error ? error.message : String(error);
32
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Invalid input parameters JSON: ${errorMessage}`);
33
+ }
34
+ try {
35
+ let url = `/${params.modelEndpoint}`;
36
+ // Add webhook URL as query parameter if provided
37
+ if (options.webhookUrl) {
38
+ url += `?fal_webhook=${encodeURIComponent(options.webhookUrl)}`;
39
+ }
40
+ const response = (await this.helpers.httpRequestWithAuthentication.call(this, 'falApi', {
41
+ method: 'POST',
42
+ url,
43
+ body: inputParameters,
44
+ json: true,
45
+ }));
46
+ return [
47
+ {
48
+ json: {
49
+ request_id: response.request_id,
50
+ response_url: response.response_url,
51
+ status_url: response.status_url,
52
+ cancel_url: response.cancel_url,
53
+ ...(options.webhookUrl && {
54
+ webhook_url: options.webhookUrl,
55
+ message: 'Request queued. Results will be sent to the webhook URL.',
56
+ }),
57
+ },
58
+ },
59
+ ];
60
+ }
61
+ catch (error) {
62
+ const errorMessage = error instanceof Error ? error.message : String(error);
63
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Failed to submit request: ${errorMessage}`);
64
+ }
65
+ }
66
+ async function getStatus(index) {
67
+ const params = this.getNodeParameter('', index);
68
+ const options = params.options || {};
69
+ try {
70
+ let url = `/${params.modelEndpoint}/requests/${params.requestId}/status`;
71
+ // Add logs parameter if requested
72
+ if (options.includeLogs) {
73
+ url += '?logs=1';
74
+ }
75
+ const response = (await this.helpers.httpRequestWithAuthentication.call(this, 'falApi', {
76
+ method: 'GET',
77
+ url,
78
+ json: true,
79
+ }));
80
+ return [
81
+ {
82
+ json: response,
83
+ },
84
+ ];
85
+ }
86
+ catch (error) {
87
+ const errorMessage = error instanceof Error ? error.message : String(error);
88
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Failed to get status: ${errorMessage}`);
89
+ }
90
+ }
91
+ async function getResponse(index) {
92
+ const params = this.getNodeParameter('', index);
93
+ try {
94
+ const url = `/${params.modelEndpoint}/requests/${params.requestId}`;
95
+ const response = (await this.helpers.httpRequestWithAuthentication.call(this, 'falApi', {
96
+ method: 'GET',
97
+ url,
98
+ json: true,
99
+ }));
100
+ return [
101
+ {
102
+ json: {
103
+ status: response.status,
104
+ ...(response.logs && { logs: response.logs }),
105
+ response: response.response,
106
+ },
107
+ },
108
+ ];
109
+ }
110
+ catch (error) {
111
+ const errorMessage = error instanceof Error ? error.message : String(error);
112
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Failed to get response: ${errorMessage}`);
113
+ }
114
+ }
115
+ async function cancelRequest(index) {
116
+ const params = this.getNodeParameter('', index);
117
+ try {
118
+ const url = `/${params.modelEndpoint}/requests/${params.requestId}/cancel`;
119
+ const response = (await this.helpers.httpRequestWithAuthentication.call(this, 'falApi', {
120
+ method: 'PUT',
121
+ url,
122
+ json: true,
123
+ }));
124
+ return [
125
+ {
126
+ json: {
127
+ status: response.status,
128
+ message: response.status === 'CANCELLATION_REQUESTED'
129
+ ? 'Cancellation requested successfully. Note that the request may still be executed if it was very late in the queue process.'
130
+ : 'Request has already been completed and cannot be cancelled.',
131
+ },
132
+ },
133
+ ];
134
+ }
135
+ catch (error) {
136
+ const errorMessage = error instanceof Error ? error.message : String(error);
137
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Failed to cancel request: ${errorMessage}`);
138
+ }
139
+ }
140
+ async function streamStatus(index) {
141
+ const params = this.getNodeParameter('', index);
142
+ const options = params.options || {};
143
+ try {
144
+ let url = `https://queue.fal.run/${params.modelEndpoint}/requests/${params.requestId}/status/stream`;
145
+ // Add logs parameter if requested
146
+ if (options.includeLogs) {
147
+ url += '?logs=1';
148
+ }
149
+ const credentials = await this.getCredentials('falApi');
150
+ // Use fetch to handle Server-Sent Events
151
+ const response = await fetch(url, {
152
+ method: 'GET',
153
+ headers: {
154
+ Authorization: `Key ${credentials.apiKey}`,
155
+ Accept: 'text/event-stream',
156
+ },
157
+ });
158
+ if (!response.ok) {
159
+ const errorText = await response.text();
160
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Failed to stream status: ${response.status} ${errorText}`);
161
+ }
162
+ const statusUpdates = [];
163
+ let finalStatus = null;
164
+ // Parse Server-Sent Events
165
+ const reader = response.body?.getReader();
166
+ const decoder = new TextDecoder();
167
+ if (!reader) {
168
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Failed to read response stream');
169
+ }
170
+ let buffer = '';
171
+ while (true) {
172
+ const { done, value } = await reader.read();
173
+ if (done) {
174
+ break;
175
+ }
176
+ buffer += decoder.decode(value, { stream: true });
177
+ const lines = buffer.split('\n');
178
+ // Keep the last incomplete line in the buffer
179
+ buffer = lines.pop() || '';
180
+ for (const line of lines) {
181
+ if (line.startsWith('data: ')) {
182
+ const data = line.substring(6);
183
+ if (data.trim()) {
184
+ try {
185
+ const statusUpdate = JSON.parse(data);
186
+ statusUpdates.push(statusUpdate);
187
+ if (statusUpdate.status === 'COMPLETED') {
188
+ finalStatus = statusUpdate;
189
+ }
190
+ }
191
+ catch (parseError) {
192
+ // Ignore parse errors for ping messages or malformed data
193
+ }
194
+ }
195
+ }
196
+ }
197
+ // Break if we've received the final status
198
+ if (finalStatus) {
199
+ break;
200
+ }
201
+ }
202
+ return [
203
+ {
204
+ json: {
205
+ final_status: finalStatus || statusUpdates[statusUpdates.length - 1],
206
+ status_updates: statusUpdates,
207
+ total_updates: statusUpdates.length,
208
+ },
209
+ },
210
+ ];
211
+ }
212
+ catch (error) {
213
+ if (error instanceof n8n_workflow_1.NodeOperationError) {
214
+ throw error;
215
+ }
216
+ const errorMessage = error instanceof Error ? error.message : String(error);
217
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Failed to stream status: ${errorMessage}`);
218
+ }
219
+ }
220
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../nodes/Fal/resources/queue/exec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CACzC,WAAW,GAAG,YAAY,CAAC;4BAC5B,CAAC;wBACF,CAAC;wBAAC,OAAO,UAAU,EAAE,CAAC;4BACrB,0DAA0D;wBAC3D,CAAC;oBACF,CAAC;gBACF,CAAC;YACF,CAAC;YAED,2CAA2C;YAC3C,IAAI,WAAW,EAAE,CAAC;gBACjB,MAAM;YACP,CAAC;QACF,CAAC;QAED,OAAO;YACN;gBACC,IAAI,EAAE;oBACL,YAAY,EAAE,WAAW,IAAI,aAAa,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;oBACpE,cAAc,EAAE,aAAa;oBAC7B,aAAa,EAAE,aAAa,CAAC,MAAM;iBACnC;aACD;SACD,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,IAAI,KAAK,YAAY,iCAAkB,EAAE,CAAC;YACzC,MAAM,KAAK,CAAC;QACb,CAAC;QACD,MAAM,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5E,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,4BAA4B,YAAY,EAAE,CAAC,CAAC;IAC1F,CAAC;AACF,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { queueOperations, queueFields } from './description';
2
+ export { queueOperations, queueFields };
3
+ export { executeQueue } from './execute';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../nodes/Fal/resources/queue/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE7D,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.executeQueue = exports.queueFields = exports.queueOperations = void 0;
4
+ const description_1 = require("./description");
5
+ Object.defineProperty(exports, "queueOperations", { enumerable: true, get: function () { return description_1.queueOperations; } });
6
+ Object.defineProperty(exports, "queueFields", { enumerable: true, get: function () { return description_1.queueFields; } });
7
+ var execute_1 = require("./execute");
8
+ Object.defineProperty(exports, "executeQueue", { enumerable: true, get: function () { return execute_1.executeQueue; } });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Fal/resources/queue/index.ts"],"names":[],"mappings":";;;AAAA,+CAA6D;AAEpD,gGAFA,6BAAe,OAEA;AAAE,4FAFA,yBAAW,OAEA;AACrC,qCAAyC;AAAhC,uGAAA,YAAY,OAAA"}
@@ -0,0 +1,75 @@
1
+ export declare enum QueueOperation {
2
+ Submit = "submit",
3
+ GetStatus = "getStatus",
4
+ GetResponse = "getResponse",
5
+ Cancel = "cancel",
6
+ StreamStatus = "streamStatus"
7
+ }
8
+ export type QueueStatusType = 'IN_QUEUE' | 'IN_PROGRESS' | 'COMPLETED';
9
+ export type CancellationStatusType = 'CANCELLATION_REQUESTED' | 'ALREADY_COMPLETED';
10
+ export interface QueueSubmitParams {
11
+ modelEndpoint: string;
12
+ inputParameters: string;
13
+ options?: {
14
+ webhookUrl?: string;
15
+ };
16
+ }
17
+ export interface QueueStatusParams {
18
+ requestId: string;
19
+ modelEndpoint: string;
20
+ options?: {
21
+ includeLogs?: boolean;
22
+ };
23
+ }
24
+ export interface QueueResponseParams {
25
+ requestId: string;
26
+ modelEndpoint: string;
27
+ }
28
+ export interface QueueCancelParams {
29
+ requestId: string;
30
+ modelEndpoint: string;
31
+ }
32
+ export interface QueueStreamStatusParams {
33
+ requestId: string;
34
+ modelEndpoint: string;
35
+ options?: {
36
+ includeLogs?: boolean;
37
+ };
38
+ }
39
+ export interface QueueSubmitResponse {
40
+ request_id: string;
41
+ response_url: string;
42
+ status_url: string;
43
+ cancel_url: string;
44
+ }
45
+ export interface RequestLog {
46
+ message: string;
47
+ level: 'STDERR' | 'STDOUT' | 'ERROR' | 'INFO' | 'WARN' | 'DEBUG';
48
+ source?: string;
49
+ timestamp: string;
50
+ }
51
+ export interface QueueStatusResponseInQueue {
52
+ status: 'IN_QUEUE';
53
+ queue_position: number;
54
+ response_url: string;
55
+ }
56
+ export interface QueueStatusResponseInProgress {
57
+ status: 'IN_PROGRESS';
58
+ logs?: RequestLog[];
59
+ response_url: string;
60
+ }
61
+ export interface QueueStatusResponseCompleted {
62
+ status: 'COMPLETED';
63
+ logs?: RequestLog[];
64
+ response_url: string;
65
+ }
66
+ export type QueueStatusResponse = QueueStatusResponseInQueue | QueueStatusResponseInProgress | QueueStatusResponseCompleted;
67
+ export interface QueueResponseData {
68
+ status: 'COMPLETED';
69
+ logs?: RequestLog[];
70
+ response: Record<string, any>;
71
+ }
72
+ export interface QueueCancelResponse {
73
+ status: CancellationStatusType;
74
+ }
75
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../../nodes/Fal/resources/queue/models.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACzB,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,MAAM,WAAW;IACjB,YAAY,iBAAiB;CAC7B;AAED,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,aAAa,GAAG,WAAW,CAAC;AAEvE,MAAM,MAAM,sBAAsB,GAAG,wBAAwB,GAAG,mBAAmB,CAAC;AAEpF,MAAM,WAAW,iBAAiB;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE;QACT,UAAU,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACF;AAED,MAAM,WAAW,iBAAiB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,aA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C5B,0BAA0B,GAC1B,6BAA6B,GAC7B,4BAA4B,CAAC;AAEhC,MAAM,WAAW,iBAAiB;IACjC,MAAM,EAAE,WAAW,CAAC;IACpB,IAAI,CAAC,EAAE,UAAU,EAAE,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,mBAAmB;IACnC,MAAM,EAAE,sBAAsB,CAAC;CAC/B"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.QueueOperation = void 0;
4
+ var QueueOperation;
5
+ (function (QueueOperation) {
6
+ QueueOperation["Submit"] = "submit";
7
+ QueueOperation["GetStatus"] = "getStatus";
8
+ QueueOperation["GetResponse"] = "getResponse";
9
+ QueueOperation["Cancel"] = "cancel";
10
+ QueueOperation["StreamStatus"] = "streamStatus";
11
+ })(QueueOperation || (exports.QueueOperation = QueueOperation = {}));
12
+ //# sourceMappingURL=models.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../../../nodes/Fal/resources/queue/models.ts"],"names":[],"mappings":";;;AAAA,IAAY,cAMX;AAND,WAAY,cAAc;IACzB,mCAAiB,CAAA;IACjB,yCAAuB,CAAA;IACvB,6CAA2B,CAAA;IAC3B,mCAAiB,CAAA;IACjB,+CAA6B,CAAA;AAC9B,CAAC,EANW,cAAc,8BAAd,cAAc,QAMzB"}
@@ -0,0 +1,5 @@
1
+ import { INodeProperties } from 'n8n-workflow';
2
+ export declare const textToImageOperations: INodeProperties[];
3
+ export declare const textToImageFields: INodeProperties[];
4
+ export declare const description: INodeProperties[];
5
+ //# sourceMappingURL=description.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"description.d.ts","sourceRoot":"","sources":["../../../../../nodes/Fal/resources/text-to-image/description.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG/C,eAAO,MAAM,qBAAqB,EAAE,eAAe,EAqBlD,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,eAAe,EAyI9C,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,eAAe,EAAqD,CAAC"}