n8n-nodes-prestashop8 1.2.5 → 2.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.
@@ -5,6 +5,7 @@ export declare class PrestaShop8 implements INodeType {
5
5
  loadOptions: {
6
6
  getOperations(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
7
7
  getRequiredFields(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
8
+ getAvailableFields(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
8
9
  };
9
10
  };
10
11
  execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
@@ -208,7 +208,7 @@ exports.PrestaShop8Description = {
208
208
  placeholder: '[id,name,price,reference]',
209
209
  description: 'PrestaShop field list format: [field1,field2,field3] or comma-separated: field1,field2,field3',
210
210
  },
211
- // Search Filters
211
+ // Search Filters - Images resource (custom filter only)
212
212
  {
213
213
  displayName: 'Search Filters',
214
214
  name: 'filters',
@@ -216,6 +216,7 @@ exports.PrestaShop8Description = {
216
216
  displayOptions: {
217
217
  show: {
218
218
  operation: ['search'],
219
+ resource: ['images'],
219
220
  },
220
221
  },
221
222
  default: {},
@@ -225,8 +226,8 @@ exports.PrestaShop8Description = {
225
226
  },
226
227
  options: [
227
228
  {
228
- name: 'filter',
229
- displayName: 'Filter',
229
+ name: 'customFilter',
230
+ displayName: 'Custom Filter',
230
231
  values: [
231
232
  {
232
233
  displayName: 'Field',
@@ -234,7 +235,85 @@ exports.PrestaShop8Description = {
234
235
  type: 'string',
235
236
  default: '',
236
237
  placeholder: 'name, reference, price, etc.',
237
- description: 'Name of field to filter. Examples: name, reference, price, active, id_manufacturer, etc.',
238
+ description: 'Name of field to filter.',
239
+ displayOptions: {
240
+ hide: {
241
+ operator: ['CUSTOM'],
242
+ },
243
+ },
244
+ },
245
+ {
246
+ displayName: 'Operator',
247
+ name: 'operator',
248
+ type: 'options',
249
+ options: types_1.FILTER_OPERATORS,
250
+ default: '=',
251
+ noDataExpression: true,
252
+ description: 'Comparison operator for filtering. Custom allows you to write your own filter expression.',
253
+ },
254
+ {
255
+ displayName: 'Value',
256
+ name: 'value',
257
+ type: 'string',
258
+ default: '',
259
+ placeholder: 'search value or interval',
260
+ description: 'Value to search for. For Equal/Not Equal: use "10,20" for intervals (becomes [10,20]).',
261
+ displayOptions: {
262
+ hide: {
263
+ operator: ['IS_EMPTY', 'IS_NOT_EMPTY', 'CUSTOM'],
264
+ },
265
+ },
266
+ },
267
+ {
268
+ displayName: 'Custom Filter Expression',
269
+ name: 'customFilterExpression',
270
+ type: 'string',
271
+ default: '',
272
+ placeholder: 'filter[name]=[Product]%',
273
+ description: 'Complete filter expression in PrestaShop format. Example: filter[name]=[Product]%, filter[price]=>[100], etc.',
274
+ displayOptions: {
275
+ show: {
276
+ operator: ['CUSTOM'],
277
+ },
278
+ },
279
+ },
280
+ ],
281
+ },
282
+ ],
283
+ description: 'PrestaShop filters to apply to the search. Enter field names directly.',
284
+ },
285
+ // Search Filters - Other resources (with 2 filter types)
286
+ {
287
+ displayName: 'Search Filters',
288
+ name: 'filters',
289
+ type: 'fixedCollection',
290
+ displayOptions: {
291
+ show: {
292
+ operation: ['search'],
293
+ },
294
+ hide: {
295
+ resource: ['images'],
296
+ },
297
+ },
298
+ default: {},
299
+ placeholder: 'Add Filter',
300
+ typeOptions: {
301
+ multipleValues: true,
302
+ },
303
+ options: [
304
+ {
305
+ name: 'standardFilter',
306
+ displayName: 'Standard Filter',
307
+ values: [
308
+ {
309
+ displayName: 'Field',
310
+ name: 'field',
311
+ type: 'options',
312
+ typeOptions: {
313
+ loadOptionsMethod: 'getAvailableFields',
314
+ },
315
+ default: '',
316
+ description: 'Select a field from the PrestaShop schema.',
238
317
  displayOptions: {
239
318
  hide: {
240
319
  operator: ['CUSTOM'],
@@ -265,7 +344,61 @@ exports.PrestaShop8Description = {
265
344
  },
266
345
  {
267
346
  displayName: 'Custom Filter Expression',
268
- name: 'customFilter',
347
+ name: 'customFilterExpression',
348
+ type: 'string',
349
+ default: '',
350
+ placeholder: 'filter[name]=[Product]%',
351
+ description: 'Complete filter expression in PrestaShop format. Example: filter[name]=[Product]%, filter[price]=>[100], etc.',
352
+ displayOptions: {
353
+ show: {
354
+ operator: ['CUSTOM'],
355
+ },
356
+ },
357
+ },
358
+ ],
359
+ },
360
+ {
361
+ name: 'customFilter',
362
+ displayName: 'Custom Filter',
363
+ values: [
364
+ {
365
+ displayName: 'Field',
366
+ name: 'field',
367
+ type: 'string',
368
+ default: '',
369
+ placeholder: 'name, reference, price, etc.',
370
+ description: 'Enter your custom field name.',
371
+ displayOptions: {
372
+ hide: {
373
+ operator: ['CUSTOM'],
374
+ },
375
+ },
376
+ },
377
+ {
378
+ displayName: 'Operator',
379
+ name: 'operator',
380
+ type: 'options',
381
+ options: types_1.FILTER_OPERATORS,
382
+ default: '=',
383
+ noDataExpression: true,
384
+ description: 'Comparison operator for filtering. Custom allows you to write your own filter expression.',
385
+ },
386
+ {
387
+ displayName: 'Value',
388
+ name: 'value',
389
+ type: 'string',
390
+ default: '',
391
+ placeholder: 'search value or interval',
392
+ description: 'Value to search for. Examples: "Product Name", "1" (active), "29.99" (price). For Equal/Not Equal: use "10,20" for intervals (becomes [10,20]).',
393
+ displayOptions: {
394
+ hide: {
395
+ operator: ['IS_EMPTY', 'IS_NOT_EMPTY', 'CUSTOM'],
396
+ },
397
+ },
398
+ },
399
+ {
400
+ displayName: 'Custom Filter Expression',
401
+ name: 'customFilterExpression',
269
402
  type: 'string',
270
403
  default: '',
271
404
  placeholder: 'filter[name]=[Product]%',
@@ -279,7 +412,7 @@ exports.PrestaShop8Description = {
279
412
  ],
280
413
  },
281
414
  ],
282
- description: 'PrestaShop filters to apply to the search',
415
+ description: 'PrestaShop filters to apply to the search. Choose "Standard Filter" to select from schema or "Custom Filter" to enter your own field name.',
283
416
  },
284
417
  // === REQUIRED FIELDS FOR PRODUCTS ===
285
418
  {
@@ -550,7 +683,7 @@ exports.PrestaShop8Description = {
550
683
  theme: 'info',
551
684
  },
552
685
  },
553
- // Additional Fields for Create operation
686
+ // Additional Fields for Create operation - Images resource (custom field only)
554
687
  {
555
688
  displayName: 'Additional Fields',
556
689
  name: 'fieldsToCreate',
@@ -558,6 +691,7 @@ exports.PrestaShop8Description = {
558
691
  displayOptions: {
559
692
  show: {
560
693
  operation: ['create'],
694
+ resource: ['images'],
561
695
  },
562
696
  },
563
697
  default: {},
@@ -568,8 +702,8 @@ exports.PrestaShop8Description = {
568
702
  },
569
703
  options: [
570
704
  {
571
- displayName: 'Field',
572
- name: 'field',
705
+ displayName: 'Custom Field',
706
+ name: 'customField',
573
707
  values: [
574
708
  {
575
709
  displayName: 'Name',
@@ -577,8 +711,8 @@ exports.PrestaShop8Description = {
577
711
  type: 'string',
578
712
  default: '',
579
713
  required: true,
580
- placeholder: 'Field name (e.g., name, price, active, name-1)',
581
- description: 'Name of the field to set. Use the required fields shown above. For multilingual fields, use format: fieldname-langid (e.g., name-1, description-2).',
714
+ placeholder: 'Field name',
715
+ description: 'Name of the field to set.',
582
716
  },
583
717
  {
584
718
  displayName: 'Value',
@@ -592,9 +726,127 @@ exports.PrestaShop8Description = {
592
726
  ],
593
727
  },
594
728
  ],
595
- description: 'Additional optional fields for the resource. Required fields are provided above as dedicated input fields.',
729
+ description: 'Additional optional fields for images. Enter field names directly.',
596
730
  },
597
- // Fields to Update (Key-Value pairs like Set node)
731
+ // Additional Fields for Create operation - Other resources (with 2 field types)
732
+ {
733
+ displayName: 'Additional Fields',
734
+ name: 'fieldsToCreate',
735
+ type: 'fixedCollection',
736
+ displayOptions: {
737
+ show: {
738
+ operation: ['create'],
739
+ },
740
+ hide: {
741
+ resource: ['images'],
742
+ },
743
+ },
744
+ default: {},
745
+ placeholder: 'Add field',
746
+ typeOptions: {
747
+ multipleValues: true,
748
+ sortable: true,
749
+ },
750
+ options: [
751
+ {
752
+ displayName: 'Standard Field',
753
+ name: 'standardField',
754
+ values: [
755
+ {
756
+ displayName: 'Name',
757
+ name: 'name',
758
+ type: 'options',
759
+ typeOptions: {
760
+ loadOptionsMethod: 'getAvailableFields',
761
+ },
762
+ default: '',
763
+ required: true,
764
+ description: 'Select a field from the PrestaShop schema.',
765
+ },
766
+ {
767
+ displayName: 'Value',
768
+ name: 'value',
769
+ type: 'string',
770
+ default: '',
771
+ required: true,
772
+ placeholder: 'Field value',
773
+ description: 'Value to set. Will be properly escaped for XML.',
774
+ },
775
+ ],
776
+ },
777
+ {
778
+ displayName: 'Custom Field',
779
+ name: 'customField',
780
+ values: [
781
+ {
782
+ displayName: 'Name',
783
+ name: 'name',
784
+ type: 'string',
785
+ default: '',
786
+ required: true,
787
+ placeholder: 'my_custom_field',
788
+ description: 'Enter your custom field name.',
789
+ },
790
+ {
791
+ displayName: 'Value',
792
+ name: 'value',
793
+ type: 'string',
794
+ default: '',
795
+ required: true,
796
+ placeholder: 'Field value',
797
+ description: 'Value to set. Will be properly escaped for XML.',
798
+ },
799
+ ],
800
+ },
801
+ ],
802
+ description: 'Additional optional fields for the resource. Choose "Standard Field" to select from schema or "Custom Field" to enter your own.',
803
+ },
804
+ // Fields to Update - Images resource (custom field only)
805
+ {
806
+ displayName: 'Fields to Update',
807
+ name: 'fieldsToUpdate',
808
+ type: 'fixedCollection',
809
+ displayOptions: {
810
+ show: {
811
+ operation: ['update'],
812
+ resource: ['images'],
813
+ },
814
+ },
815
+ default: {},
816
+ placeholder: 'Add field',
817
+ typeOptions: {
818
+ multipleValues: true,
819
+ sortable: true,
820
+ },
821
+ options: [
822
+ {
823
+ displayName: 'Custom Field',
824
+ name: 'customField',
825
+ values: [
826
+ {
827
+ displayName: 'Name',
828
+ name: 'name',
829
+ type: 'string',
830
+ default: '',
831
+ required: true,
832
+ placeholder: 'Field name',
833
+ description: 'Name of the field to update.',
834
+ },
835
+ {
836
+ displayName: 'Value',
837
+ name: 'value',
838
+ type: 'string',
839
+ default: '',
840
+ required: true,
841
+ placeholder: 'Field value',
842
+ description: 'Value to set. Will be properly escaped for XML.',
843
+ },
844
+ ],
845
+ },
846
+ ],
847
+ description: 'Fields to update for images. Enter field names directly.',
848
+ },
849
+ // Fields to Update - Other resources (with 2 field types)
598
850
  {
599
851
  displayName: 'Fields to Update',
600
852
  name: 'fieldsToUpdate',
@@ -603,6 +855,9 @@ exports.PrestaShop8Description = {
603
855
  show: {
604
856
  operation: ['update'],
605
857
  },
858
+ hide: {
859
+ resource: ['images'],
860
+ },
606
861
  },
607
862
  default: {},
608
863
  placeholder: 'Add field',
@@ -612,8 +867,34 @@ exports.PrestaShop8Description = {
612
867
  },
613
868
  options: [
614
869
  {
615
- displayName: 'Field',
616
- name: 'field',
870
+ displayName: 'Standard Field',
871
+ name: 'standardField',
872
+ values: [
873
+ {
874
+ displayName: 'Name',
875
+ name: 'name',
876
+ type: 'options',
877
+ typeOptions: {
878
+ loadOptionsMethod: 'getAvailableFields',
879
+ },
880
+ default: '',
881
+ required: true,
882
+ description: 'Select a field from the PrestaShop schema.',
883
+ },
884
+ {
885
+ displayName: 'Value',
886
+ name: 'value',
887
+ type: 'string',
888
+ default: '',
889
+ required: true,
890
+ placeholder: 'Field value',
891
+ description: 'Value to set. Will be properly escaped for XML.',
892
+ },
893
+ ],
894
+ },
895
+ {
896
+ displayName: 'Custom Field',
897
+ name: 'customField',
617
898
  values: [
618
899
  {
619
900
  displayName: 'Name',
@@ -621,8 +902,8 @@ exports.PrestaShop8Description = {
621
902
  type: 'string',
622
903
  default: '',
623
904
  required: true,
624
- placeholder: 'Field name (e.g., width, price, name, name-1)',
625
- description: 'Name of the field to update. For multilingual fields, use format: fieldname-langid (e.g., name-1 for name in language ID 1, description-2 for description in language ID 2).',
905
+ placeholder: 'my_custom_field',
906
+ description: 'Enter your custom field name.',
626
907
  },
627
908
  {
628
909
  displayName: 'Value',
@@ -636,7 +917,7 @@ exports.PrestaShop8Description = {
636
917
  ],
637
918
  },
638
919
  ],
639
- description: 'Fields to update in the resource. Add multiple field/value pairs as needed. For multilingual fields (names, descriptions), use format: fieldname-langid (e.g., name-1, name-2 for different languages).',
920
+ description: 'Fields to update in the resource. Choose "Standard Field" to select from schema or "Custom Field" to enter your own. For multilingual fields, use format: fieldname-langid (e.g., name-1, name-2).',
640
921
  },
641
922
  // Options
642
923
  {