@posty5/n8n-nodes-posty5 4.2.0 → 5.1.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 (178) hide show
  1. package/README.md +364 -16
  2. package/dist/credentials/Posty5Api.credentials.d.ts +4 -0
  3. package/dist/credentials/Posty5Api.credentials.d.ts.map +1 -1
  4. package/dist/credentials/Posty5Api.credentials.js +30 -4
  5. package/dist/credentials/Posty5Api.credentials.js.map +1 -1
  6. package/dist/nodes/Posty5FormSubmission/Posty5FormSubmission.node.d.ts.map +1 -1
  7. package/dist/nodes/Posty5FormSubmission/Posty5FormSubmission.node.js +6 -2
  8. package/dist/nodes/Posty5FormSubmission/Posty5FormSubmission.node.js.map +1 -1
  9. package/dist/nodes/Posty5HtmlHosting/Posty5HtmlHosting.node.d.ts.map +1 -1
  10. package/dist/nodes/Posty5HtmlHosting/Posty5HtmlHosting.node.js +14 -3
  11. package/dist/nodes/Posty5HtmlHosting/Posty5HtmlHosting.node.js.map +1 -1
  12. package/dist/nodes/Posty5QrCode/Posty5QrCode.node.d.ts +8 -0
  13. package/dist/nodes/Posty5QrCode/Posty5QrCode.node.d.ts.map +1 -1
  14. package/dist/nodes/Posty5QrCode/Posty5QrCode.node.js +885 -190
  15. package/dist/nodes/Posty5QrCode/Posty5QrCode.node.js.map +1 -1
  16. package/dist/nodes/Posty5QrCode/helpers.d.ts +12 -0
  17. package/dist/nodes/Posty5QrCode/helpers.d.ts.map +1 -0
  18. package/dist/nodes/Posty5QrCode/helpers.js +56 -0
  19. package/dist/nodes/Posty5QrCode/helpers.js.map +1 -0
  20. package/dist/nodes/Posty5ShortLink/Posty5ShortLink.node.d.ts +8 -0
  21. package/dist/nodes/Posty5ShortLink/Posty5ShortLink.node.d.ts.map +1 -1
  22. package/dist/nodes/Posty5ShortLink/Posty5ShortLink.node.js +389 -78
  23. package/dist/nodes/Posty5ShortLink/Posty5ShortLink.node.js.map +1 -1
  24. package/dist/nodes/Posty5ShortLink/helpers.d.ts +12 -0
  25. package/dist/nodes/Posty5ShortLink/helpers.d.ts.map +1 -0
  26. package/dist/nodes/Posty5ShortLink/helpers.js +46 -0
  27. package/dist/nodes/Posty5ShortLink/helpers.js.map +1 -0
  28. package/dist/nodes/Posty5SocialPublisherPost/Posty5SocialPublisherPost.node.d.ts.map +1 -1
  29. package/dist/nodes/Posty5SocialPublisherPost/Posty5SocialPublisherPost.node.js +143 -52
  30. package/dist/nodes/Posty5SocialPublisherPost/Posty5SocialPublisherPost.node.js.map +1 -1
  31. package/dist/nodes/Posty5Store/Posty5Store.node.d.ts +17 -0
  32. package/dist/nodes/Posty5Store/Posty5Store.node.d.ts.map +1 -0
  33. package/dist/nodes/Posty5Store/Posty5Store.node.js +230 -0
  34. package/dist/nodes/Posty5Store/Posty5Store.node.js.map +1 -0
  35. package/dist/nodes/Posty5Store/descriptions/fulfilment-group.description.d.ts +4 -0
  36. package/dist/nodes/Posty5Store/descriptions/fulfilment-group.description.d.ts.map +1 -0
  37. package/dist/nodes/Posty5Store/descriptions/fulfilment-group.description.js +55 -0
  38. package/dist/nodes/Posty5Store/descriptions/fulfilment-group.description.js.map +1 -0
  39. package/dist/nodes/Posty5Store/descriptions/order.description.d.ts +4 -0
  40. package/dist/nodes/Posty5Store/descriptions/order.description.d.ts.map +1 -0
  41. package/dist/nodes/Posty5Store/descriptions/order.description.js +91 -0
  42. package/dist/nodes/Posty5Store/descriptions/order.description.js.map +1 -0
  43. package/dist/nodes/Posty5Store/descriptions/product-link.description.d.ts +4 -0
  44. package/dist/nodes/Posty5Store/descriptions/product-link.description.d.ts.map +1 -0
  45. package/dist/nodes/Posty5Store/descriptions/product-link.description.js +48 -0
  46. package/dist/nodes/Posty5Store/descriptions/product-link.description.js.map +1 -0
  47. package/dist/nodes/Posty5Store/descriptions/supplier-order.description.d.ts +4 -0
  48. package/dist/nodes/Posty5Store/descriptions/supplier-order.description.d.ts.map +1 -0
  49. package/dist/nodes/Posty5Store/descriptions/supplier-order.description.js +118 -0
  50. package/dist/nodes/Posty5Store/descriptions/supplier-order.description.js.map +1 -0
  51. package/dist/nodes/Posty5Store/descriptions/supplier-product.description.d.ts +4 -0
  52. package/dist/nodes/Posty5Store/descriptions/supplier-product.description.d.ts.map +1 -0
  53. package/dist/nodes/Posty5Store/descriptions/supplier-product.description.js +167 -0
  54. package/dist/nodes/Posty5Store/descriptions/supplier-product.description.js.map +1 -0
  55. package/dist/nodes/Posty5Store/descriptions/supplier.description.d.ts +4 -0
  56. package/dist/nodes/Posty5Store/descriptions/supplier.description.d.ts.map +1 -0
  57. package/dist/nodes/Posty5Store/descriptions/supplier.description.js +50 -0
  58. package/dist/nodes/Posty5Store/descriptions/supplier.description.js.map +1 -0
  59. package/dist/nodes/Posty5Trigger/Posty5Trigger.node.d.ts +13 -0
  60. package/dist/nodes/Posty5Trigger/Posty5Trigger.node.d.ts.map +1 -0
  61. package/dist/nodes/Posty5Trigger/Posty5Trigger.node.js +171 -0
  62. package/dist/nodes/Posty5Trigger/Posty5Trigger.node.js.map +1 -0
  63. package/dist/nodes/Posty5Trigger/config.d.ts +51 -0
  64. package/dist/nodes/Posty5Trigger/config.d.ts.map +1 -0
  65. package/dist/nodes/Posty5Trigger/config.js +76 -0
  66. package/dist/nodes/Posty5Trigger/config.js.map +1 -0
  67. package/dist/nodes/Posty5Trigger/descriptions.d.ts +4 -0
  68. package/dist/nodes/Posty5Trigger/descriptions.d.ts.map +1 -0
  69. package/dist/nodes/Posty5Trigger/descriptions.js +99 -0
  70. package/dist/nodes/Posty5Trigger/descriptions.js.map +1 -0
  71. package/dist/nodes/Posty5Trigger/helpers.d.ts +34 -0
  72. package/dist/nodes/Posty5Trigger/helpers.d.ts.map +1 -0
  73. package/dist/nodes/Posty5Trigger/helpers.js +139 -0
  74. package/dist/nodes/Posty5Trigger/helpers.js.map +1 -0
  75. package/dist/package.json +78 -0
  76. package/dist/types/common.d.ts +70 -0
  77. package/dist/types/common.d.ts.map +1 -1
  78. package/dist/types/link-analytics.types.d.ts +147 -0
  79. package/dist/types/link-analytics.types.d.ts.map +1 -0
  80. package/dist/types/link-analytics.types.js +10 -0
  81. package/dist/types/link-analytics.types.js.map +1 -0
  82. package/dist/types/link-bulk.types.d.ts +68 -0
  83. package/dist/types/link-bulk.types.d.ts.map +1 -0
  84. package/dist/types/link-bulk.types.js +8 -0
  85. package/dist/types/link-bulk.types.js.map +1 -0
  86. package/dist/types/qr-code.types.d.ts +252 -56
  87. package/dist/types/qr-code.types.d.ts.map +1 -1
  88. package/dist/types/short-link-controls.types.d.ts +82 -0
  89. package/dist/types/short-link-controls.types.d.ts.map +1 -0
  90. package/dist/types/short-link-controls.types.js +7 -0
  91. package/dist/types/short-link-controls.types.js.map +1 -0
  92. package/dist/types/short-link.types.d.ts +63 -15
  93. package/dist/types/short-link.types.d.ts.map +1 -1
  94. package/dist/types/store.types.d.ts +71 -0
  95. package/dist/types/store.types.d.ts.map +1 -0
  96. package/dist/types/store.types.js +7 -0
  97. package/dist/types/store.types.js.map +1 -0
  98. package/dist/types/webhook.types.d.ts +66 -0
  99. package/dist/types/webhook.types.d.ts.map +1 -0
  100. package/dist/types/webhook.types.js +7 -0
  101. package/dist/types/webhook.types.js.map +1 -0
  102. package/dist/utils/analytics.helpers.d.ts +68 -0
  103. package/dist/utils/analytics.helpers.d.ts.map +1 -0
  104. package/dist/utils/analytics.helpers.js +202 -0
  105. package/dist/utils/analytics.helpers.js.map +1 -0
  106. package/dist/utils/analytics.properties.d.ts +10 -0
  107. package/dist/utils/analytics.properties.d.ts.map +1 -0
  108. package/dist/utils/analytics.properties.js +172 -0
  109. package/dist/utils/analytics.properties.js.map +1 -0
  110. package/dist/utils/api.helpers.d.ts +50 -3
  111. package/dist/utils/api.helpers.d.ts.map +1 -1
  112. package/dist/utils/api.helpers.js +170 -7
  113. package/dist/utils/api.helpers.js.map +1 -1
  114. package/dist/utils/constants.d.ts +239 -0
  115. package/dist/utils/constants.d.ts.map +1 -1
  116. package/dist/utils/constants.js +260 -1
  117. package/dist/utils/constants.js.map +1 -1
  118. package/dist/utils/date.helpers.d.ts +25 -0
  119. package/dist/utils/date.helpers.d.ts.map +1 -0
  120. package/dist/utils/date.helpers.js +65 -0
  121. package/dist/utils/date.helpers.js.map +1 -0
  122. package/dist/utils/link-bulk.helpers.d.ts +26 -0
  123. package/dist/utils/link-bulk.helpers.d.ts.map +1 -0
  124. package/dist/utils/link-bulk.helpers.js +135 -0
  125. package/dist/utils/link-bulk.helpers.js.map +1 -0
  126. package/dist/utils/link-bulk.properties.d.ts +9 -0
  127. package/dist/utils/link-bulk.properties.d.ts.map +1 -0
  128. package/dist/utils/link-bulk.properties.js +113 -0
  129. package/dist/utils/link-bulk.properties.js.map +1 -0
  130. package/dist/utils/link-tool.helpers.d.ts +43 -0
  131. package/dist/utils/link-tool.helpers.d.ts.map +1 -0
  132. package/dist/utils/link-tool.helpers.js +121 -0
  133. package/dist/utils/link-tool.helpers.js.map +1 -0
  134. package/dist/utils/post-comments.d.ts +43 -0
  135. package/dist/utils/post-comments.d.ts.map +1 -0
  136. package/dist/utils/post-comments.js +53 -0
  137. package/dist/utils/post-comments.js.map +1 -0
  138. package/dist/utils/qr-content.config.d.ts +66 -0
  139. package/dist/utils/qr-content.config.d.ts.map +1 -0
  140. package/dist/utils/qr-content.config.js +139 -0
  141. package/dist/utils/qr-content.config.js.map +1 -0
  142. package/dist/utils/qr-file.helpers.d.ts +22 -0
  143. package/dist/utils/qr-file.helpers.d.ts.map +1 -0
  144. package/dist/utils/qr-file.helpers.js +63 -0
  145. package/dist/utils/qr-file.helpers.js.map +1 -0
  146. package/dist/utils/qr-render.helpers.d.ts +48 -0
  147. package/dist/utils/qr-render.helpers.d.ts.map +1 -0
  148. package/dist/utils/qr-render.helpers.js +172 -0
  149. package/dist/utils/qr-render.helpers.js.map +1 -0
  150. package/dist/utils/qr-render.properties.d.ts +8 -0
  151. package/dist/utils/qr-render.properties.d.ts.map +1 -0
  152. package/dist/utils/qr-render.properties.js +143 -0
  153. package/dist/utils/qr-render.properties.js.map +1 -0
  154. package/dist/utils/qr-target.helpers.d.ts +35 -0
  155. package/dist/utils/qr-target.helpers.d.ts.map +1 -0
  156. package/dist/utils/qr-target.helpers.js +260 -0
  157. package/dist/utils/qr-target.helpers.js.map +1 -0
  158. package/dist/utils/qr-templates.helpers.d.ts +26 -0
  159. package/dist/utils/qr-templates.helpers.d.ts.map +1 -0
  160. package/dist/utils/qr-templates.helpers.js +70 -0
  161. package/dist/utils/qr-templates.helpers.js.map +1 -0
  162. package/dist/utils/short-link-controls.helpers.d.ts +31 -0
  163. package/dist/utils/short-link-controls.helpers.d.ts.map +1 -0
  164. package/dist/utils/short-link-controls.helpers.js +185 -0
  165. package/dist/utils/short-link-controls.helpers.js.map +1 -0
  166. package/dist/utils/short-link-controls.properties.d.ts +17 -0
  167. package/dist/utils/short-link-controls.properties.d.ts.map +1 -0
  168. package/dist/utils/short-link-controls.properties.js +315 -0
  169. package/dist/utils/short-link-controls.properties.js.map +1 -0
  170. package/dist/utils/store.helpers.d.ts +43 -0
  171. package/dist/utils/store.helpers.d.ts.map +1 -0
  172. package/dist/utils/store.helpers.js +87 -0
  173. package/dist/utils/store.helpers.js.map +1 -0
  174. package/dist/utils/versioned-write.helpers.d.ts +31 -0
  175. package/dist/utils/versioned-write.helpers.d.ts.map +1 -0
  176. package/dist/utils/versioned-write.helpers.js +120 -0
  177. package/dist/utils/versioned-write.helpers.js.map +1 -0
  178. package/package.json +7 -3
@@ -0,0 +1,315 @@
1
+ "use strict";
2
+ /**
3
+ * Short Link node parameters of the short link controls: the control fields of
4
+ * Create / Update / Set Rules, and the campaign operations' fields.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.LINK_CAMPAIGN_PROPERTIES = exports.SHORT_LINK_CONTROL_LIST_FILTERS = exports.SHORT_LINK_LIST_TAGS_PROPERTIES = exports.SHORT_LINK_SET_RULES_PROPERTIES = exports.SHORT_LINK_CONTROL_ADDITIONAL_FIELDS = void 0;
8
+ exports.buildUtmProperty = buildUtmProperty;
9
+ const constants_1 = require("./constants");
10
+ const PIXEL_PROVIDER_LABELS = {
11
+ meta: 'Meta',
12
+ googleAds: 'Google Ads',
13
+ tiktok: 'TikTok',
14
+ linkedin: 'LinkedIn',
15
+ x: 'X',
16
+ pinterest: 'Pinterest',
17
+ };
18
+ const capitalize = (value) => value.charAt(0).toUpperCase() + value.slice(1);
19
+ /** UTM as a single-value fixedCollection (`utm.values`). */
20
+ function buildUtmProperty(description) {
21
+ return {
22
+ displayName: 'UTM',
23
+ name: 'utm',
24
+ type: 'fixedCollection',
25
+ default: {},
26
+ placeholder: 'Add UTM',
27
+ description,
28
+ options: [
29
+ {
30
+ displayName: 'Values',
31
+ name: 'values',
32
+ values: constants_1.LINK_UTM_KEYS.map((key) => ({
33
+ displayName: capitalize(key),
34
+ name: key,
35
+ type: 'string',
36
+ default: '',
37
+ description: `The utm_${key} value. Up to 100 characters, no spaces, quotes or angle brackets.`,
38
+ })),
39
+ },
40
+ ],
41
+ };
42
+ }
43
+ /** The access / routing / variants / UTM / pixels fields (Set Rules and the Additional Fields). */
44
+ const RULE_FIELDS = [
45
+ {
46
+ displayName: 'Active From',
47
+ name: 'activeFrom',
48
+ type: 'dateTime',
49
+ default: '',
50
+ description: 'Before this moment the link answers "not yet active". On Update, an empty value clears it.',
51
+ },
52
+ {
53
+ displayName: 'Expires At',
54
+ name: 'expiresAt',
55
+ type: 'dateTime',
56
+ default: '',
57
+ description: 'After this moment the link answers "expired". On Update, an empty value clears it.',
58
+ },
59
+ {
60
+ displayName: 'Fallback URL',
61
+ name: 'fallbackUrl',
62
+ type: 'string',
63
+ default: '',
64
+ placeholder: 'https://example.com/ended',
65
+ description: 'Where a stopped visit (not active, expired, limit reached) goes instead of the unavailable page',
66
+ },
67
+ {
68
+ displayName: 'Max Visits',
69
+ name: 'maxVisits',
70
+ type: 'number',
71
+ typeOptions: { minValue: 0, maxValue: 10000000 },
72
+ default: 0,
73
+ description: 'Stop the link after this many visits (people, never bots). 0 on Update clears the limit.',
74
+ },
75
+ {
76
+ displayName: 'Password',
77
+ name: 'password',
78
+ type: 'string',
79
+ typeOptions: { password: true },
80
+ default: '',
81
+ description: '4 – 128 characters. Visitors must enter it before they continue. Never returned by the API. Plan-gated. n8n stores node parameters in the workflow: prefer an expression reading a secret.',
82
+ },
83
+ {
84
+ displayName: 'Remove Password',
85
+ name: 'removePassword',
86
+ type: 'boolean',
87
+ default: false,
88
+ description: 'Whether to remove the link password (wins over Password)',
89
+ },
90
+ {
91
+ displayName: 'Routing Rules (JSON)',
92
+ name: 'routingRules',
93
+ type: 'json',
94
+ default: '[]',
95
+ description: 'Ordered rules, the first match wins (max 20). Conditions: countries, devices (tablet, mobile, desktop, other), os (android, ios, windows, macos, linux), languages, timeWindow {days,from,to,tz}. Keep each rule\'s ID when updating. [] on Update clears them.',
96
+ hint: 'Example: [{"name":"DE mobile","conditions":{"countries":["DE"],"devices":["mobile"]},"targetUrl":"https://example.de"}]',
97
+ },
98
+ {
99
+ displayName: 'Variants (JSON)',
100
+ name: 'variants',
101
+ type: 'json',
102
+ default: '[]',
103
+ description: 'A/B split: 0 or 2 – 5 variants, each with a name, a destination and a relative weight (1 – 100). [] on Update clears them.',
104
+ hint: 'Example: [{"name":"A","url":"https://a.example","weight":50},{"name":"B","url":"https://b.example","weight":50}]',
105
+ },
106
+ buildUtmProperty('UTM parameters appended to the destination'),
107
+ {
108
+ displayName: 'Pixels',
109
+ name: 'pixels',
110
+ type: 'fixedCollection',
111
+ typeOptions: { multipleValues: true },
112
+ default: {},
113
+ placeholder: 'Add Pixel',
114
+ description: 'Retargeting pixels fired before the redirect (one per provider, max 5)',
115
+ options: [
116
+ {
117
+ displayName: 'Pixel',
118
+ name: 'pixel',
119
+ values: [
120
+ {
121
+ displayName: 'Provider',
122
+ name: 'provider',
123
+ type: 'options',
124
+ options: constants_1.LINK_PIXEL_PROVIDERS.map((value) => ({ name: PIXEL_PROVIDER_LABELS[value], value })),
125
+ default: 'meta',
126
+ },
127
+ {
128
+ displayName: 'Pixel ID',
129
+ name: 'id',
130
+ type: 'string',
131
+ default: '',
132
+ },
133
+ ],
134
+ },
135
+ ],
136
+ },
137
+ {
138
+ displayName: 'Pixels Consent Acknowledged',
139
+ name: 'pixelsConsentAcknowledged',
140
+ type: 'boolean',
141
+ default: false,
142
+ description: 'Whether you confirm a lawful basis for tracking visitors. Required the first time pixels are set.',
143
+ },
144
+ ];
145
+ /** The control fields appended to the Create / Update Additional Fields. */
146
+ exports.SHORT_LINK_CONTROL_ADDITIONAL_FIELDS = [
147
+ {
148
+ displayName: 'Tags',
149
+ name: 'tags',
150
+ type: 'string',
151
+ default: '',
152
+ placeholder: 'summer, newsletter',
153
+ description: 'Comma-separated tags. On Update, they replace the list; an empty value clears it.',
154
+ },
155
+ {
156
+ displayName: 'Campaign Name or ID',
157
+ name: 'campaignId',
158
+ type: 'options',
159
+ typeOptions: { loadOptionsMethod: 'getCampaigns' },
160
+ default: '',
161
+ description: 'The campaign the link belongs to; its UTM fills the link\'s empty UTM fields. On Update, an empty value detaches it. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
162
+ },
163
+ {
164
+ displayName: 'Health Monitor',
165
+ name: 'healthMonitor',
166
+ type: 'boolean',
167
+ default: false,
168
+ description: 'Whether Posty5 checks the destination regularly and records when it fails',
169
+ },
170
+ ...RULE_FIELDS,
171
+ ];
172
+ /** Set Rules: the rule sections, each sent only when added. */
173
+ exports.SHORT_LINK_SET_RULES_PROPERTIES = [
174
+ {
175
+ displayName: 'Rules',
176
+ name: 'rules',
177
+ type: 'collection',
178
+ placeholder: 'Add Rule',
179
+ default: {},
180
+ displayOptions: { show: { operation: ['setRules'] } },
181
+ description: 'Only the sections you add change; an added but empty one clears it',
182
+ options: RULE_FIELDS,
183
+ },
184
+ ];
185
+ /** List Tags and the List filters. */
186
+ exports.SHORT_LINK_LIST_TAGS_PROPERTIES = [
187
+ {
188
+ displayName: 'Starts With',
189
+ name: 'term',
190
+ type: 'string',
191
+ default: '',
192
+ displayOptions: { show: { operation: ['listTags'] } },
193
+ description: 'Only tags starting with this text (case-insensitive)',
194
+ },
195
+ ];
196
+ exports.SHORT_LINK_CONTROL_LIST_FILTERS = [
197
+ {
198
+ displayName: 'Campaign Name or ID',
199
+ name: 'campaignId',
200
+ type: 'options',
201
+ typeOptions: { loadOptionsMethod: 'getCampaigns' },
202
+ default: '',
203
+ description: 'Only links of this campaign. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
204
+ },
205
+ {
206
+ displayName: 'Tags',
207
+ name: 'tags',
208
+ type: 'string',
209
+ default: '',
210
+ placeholder: 'summer, newsletter',
211
+ description: 'Comma-separated: links carrying any of these tags',
212
+ },
213
+ ];
214
+ const CAMPAIGN_OPERATIONS_WITH_ID = ['getCampaign', 'updateCampaign', 'deleteCampaign'];
215
+ const CAMPAIGN_FIELDS = [
216
+ {
217
+ displayName: 'Color',
218
+ name: 'color',
219
+ type: 'options',
220
+ options: [{ name: 'None', value: '' }, ...constants_1.LINK_CAMPAIGN_COLORS.map((value) => ({ name: capitalize(value), value }))],
221
+ default: '',
222
+ },
223
+ {
224
+ displayName: 'Description',
225
+ name: 'description',
226
+ type: 'string',
227
+ default: '',
228
+ },
229
+ buildUtmProperty('Copied into a link\'s empty UTM fields when the link is saved with this campaign'),
230
+ ];
231
+ /** Campaign operations' fields. */
232
+ exports.LINK_CAMPAIGN_PROPERTIES = [
233
+ {
234
+ displayName: 'Campaign ID',
235
+ name: 'campaignId',
236
+ type: 'string',
237
+ required: true,
238
+ default: '',
239
+ displayOptions: { show: { operation: CAMPAIGN_OPERATIONS_WITH_ID } },
240
+ },
241
+ {
242
+ displayName: 'Campaign Name',
243
+ name: 'campaignName',
244
+ type: 'string',
245
+ required: true,
246
+ default: '',
247
+ displayOptions: { show: { operation: ['createCampaign'] } },
248
+ },
249
+ {
250
+ displayName: 'Additional Fields',
251
+ name: 'campaignFields',
252
+ type: 'collection',
253
+ placeholder: 'Add Field',
254
+ default: {},
255
+ displayOptions: { show: { operation: ['createCampaign'] } },
256
+ options: CAMPAIGN_FIELDS,
257
+ },
258
+ {
259
+ displayName: 'Update Fields',
260
+ name: 'campaignFields',
261
+ type: 'collection',
262
+ placeholder: 'Add Field',
263
+ default: {},
264
+ displayOptions: { show: { operation: ['updateCampaign'] } },
265
+ options: [
266
+ {
267
+ displayName: 'Archived',
268
+ name: 'archived',
269
+ type: 'boolean',
270
+ default: false,
271
+ description: 'Whether the campaign is archived (hidden from pickers; its links keep working)',
272
+ },
273
+ {
274
+ displayName: 'Name',
275
+ name: 'name',
276
+ type: 'string',
277
+ default: '',
278
+ },
279
+ ...CAMPAIGN_FIELDS,
280
+ ],
281
+ },
282
+ {
283
+ displayName: 'Detach Links',
284
+ name: 'detach',
285
+ type: 'boolean',
286
+ default: false,
287
+ displayOptions: { show: { operation: ['deleteCampaign'] } },
288
+ description: 'Whether to detach the campaign\'s links first. Off, the API refuses to delete a campaign links still use.',
289
+ },
290
+ {
291
+ displayName: 'Filters',
292
+ name: 'campaignFilters',
293
+ type: 'collection',
294
+ placeholder: 'Add Filter',
295
+ default: {},
296
+ displayOptions: { show: { operation: ['listCampaigns'] } },
297
+ options: [
298
+ {
299
+ displayName: 'Archived',
300
+ name: 'archived',
301
+ type: 'boolean',
302
+ default: false,
303
+ description: 'Whether to list only archived (true) or only active (false) campaigns',
304
+ },
305
+ {
306
+ displayName: 'Search',
307
+ name: 'term',
308
+ type: 'string',
309
+ default: '',
310
+ description: 'Only campaigns whose name contains this text',
311
+ },
312
+ ],
313
+ },
314
+ ];
315
+ //# sourceMappingURL=short-link-controls.properties.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"short-link-controls.properties.js","sourceRoot":"","sources":["../../utils/short-link-controls.properties.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAiBH,4CAsBC;AApCD,2CAAwF;AAExF,MAAM,qBAA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AAE,UAAU;gBAChB,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,KAAK;gBACd,WAAW,EAAE,gFAAgF;aAC7F;YACD;gBACC,WAAW,EAAE,MAAM;gBACnB,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;aACX;YACD,GAAG,eAAe;SAClB;KACD;IACD;QACC,WAAW,EAAE,cAAc;QAC3B,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,KAAK;QACd,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,gBAAgB,CAAC,EAAE,EAAE;QAC3D,WAAW,EAAE,2GAA2G;KACxH;IACD;QACC,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,YAAY;QACzB,OAAO,EAAE,EAAE;QACX,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE;QAC1D,OAAO,EAAE;YACR;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,KAAK;gBACd,WAAW,EAAE,uEAAuE;aACpF;YACD;gBACC,WAAW,EAAE,QAAQ;gBACrB,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,8CAA8C;aAC3D;SACD;KACD;CACD,CAAC"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Helpers for the Posty5 Store node (dropshipping).
3
+ */
4
+ import type { IDataObject, IExecuteFunctions } from 'n8n-workflow';
5
+ import { makeApiRequest } from './api.helpers';
6
+ import type { FulfilmentGroupAction, IOrderPartItem, IStoreCursorPage, IStoreOrderWithParts, SupplierOrderAction } from '../types/store.types';
7
+ /**
8
+ * The route for an action on one part of an order. The part key looks like
9
+ * `supplier:<integrationId>`, so it is encoded before it enters the path.
10
+ */
11
+ export declare function buildGroupActionEndpoint(storeId: string, orderId: string, groupKey: string, action: FulfilmentGroupAction): string;
12
+ /** The route for an action on one supplier order. */
13
+ export declare function buildSupplierOrderActionEndpoint(storeId: string, supplierOrderId: string, action: SupplierOrderAction): string;
14
+ /**
15
+ * One item per part of an order, each carrying the order's id and number and
16
+ * the supplier order behind it (newest attempt), or null for the store's own part.
17
+ * An order from before parts existed still has one merchant part (the api adds it).
18
+ */
19
+ export declare function splitOrderParts(order: IStoreOrderWithParts): IOrderPartItem[];
20
+ /**
21
+ * A POST to the `/api/store-suppliers` routes, without the `createdFrom` stamp
22
+ * their schemas never declared. Call it with the node's context:
23
+ * `storeSupplierPost.call(this, apiKey, endpoint, body)`.
24
+ */
25
+ export declare function storeSupplierPost(this: IExecuteFunctions, apiKey: string, endpoint: string, body?: Record<string, unknown>): ReturnType<typeof makeApiRequest>;
26
+ /** A GET for the store node, with empty filter values dropped from the query. */
27
+ export declare function storeGet(this: IExecuteFunctions, apiKey: string, endpoint: string, qs?: Record<string, unknown>): ReturnType<typeof makeApiRequest>;
28
+ /**
29
+ * One page of a cursor-paged store list as output rows. The page's
30
+ * `nextCursor` rides on the last row, so the next run can pass it back as the
31
+ * Cursor filter and continue from there.
32
+ */
33
+ export declare function rowsWithNextCursor(page: IStoreCursorPage<IDataObject> | undefined): IDataObject[];
34
+ /**
35
+ * Every row of a cursor-paged store list (Return All): follows
36
+ * `pagination.nextCursor` until `pagination.hasMore` is false. A cursor in `qs`
37
+ * is the starting point. Stops, too, if the api hands back the cursor it was
38
+ * just sent, so a misbehaving page can never loop forever.
39
+ */
40
+ export declare function storeGetAllByCursor(this: IExecuteFunctions, apiKey: string, endpoint: string, qs: Record<string, unknown>, pageSize: number): Promise<IDataObject[]>;
41
+ /** Drop empty filter values so the api sees only what the user chose. */
42
+ export declare function stripEmpty(qs: Record<string, unknown>): Record<string, unknown>;
43
+ //# sourceMappingURL=store.helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.helpers.d.ts","sourceRoot":"","sources":["../../utils/store.helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,KAAK,EACX,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,MAAM,sBAAsB,CAAC;AAE9B;;;GAGG;AACH,wBAAgB,wBAAwB,CACvC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,qBAAqB,GAC3B,MAAM,CAER;AAED,qDAAqD;AACrD,wBAAgB,gCAAgC,CAC/C,OAAO,EAAE,MAAM,EACf,eAAe,EAAE,MAAM,EACvB,MAAM,EAAE,mBAAmB,GACzB,MAAM,CAER;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,cAAc,EAAE,CAQ7E;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAChC,IAAI,EAAE,iBAAiB,EACvB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAChC,UAAU,CAAC,OAAO,cAAc,CAAC,CAEnC;AAED,iFAAiF;AACjF,wBAAgB,QAAQ,CACvB,IAAI,EAAE,iBAAiB,EACvB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,EAAE,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC1B,UAAU,CAAC,OAAO,cAAc,CAAC,CAEnC;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,gBAAgB,CAAC,WAAW,CAAC,GAAG,SAAS,GAAG,WAAW,EAAE,CAKjG;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACxC,IAAI,EAAE,iBAAiB,EACvB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3B,QAAQ,EAAE,MAAM,GACd,OAAO,CAAC,WAAW,EAAE,CAAC,CAYxB;AAED,yEAAyE;AACzE,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAI/E"}
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ /**
3
+ * Helpers for the Posty5 Store node (dropshipping).
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.buildGroupActionEndpoint = buildGroupActionEndpoint;
7
+ exports.buildSupplierOrderActionEndpoint = buildSupplierOrderActionEndpoint;
8
+ exports.splitOrderParts = splitOrderParts;
9
+ exports.storeSupplierPost = storeSupplierPost;
10
+ exports.storeGet = storeGet;
11
+ exports.rowsWithNextCursor = rowsWithNextCursor;
12
+ exports.storeGetAllByCursor = storeGetAllByCursor;
13
+ exports.stripEmpty = stripEmpty;
14
+ const api_helpers_1 = require("./api.helpers");
15
+ const constants_1 = require("./constants");
16
+ /**
17
+ * The route for an action on one part of an order. The part key looks like
18
+ * `supplier:<integrationId>`, so it is encoded before it enters the path.
19
+ */
20
+ function buildGroupActionEndpoint(storeId, orderId, groupKey, action) {
21
+ return `${constants_1.API_ENDPOINTS.STORE_SUPPLIERS}/${storeId}/orders/${orderId}/groups/${encodeURIComponent(groupKey)}/${action}`;
22
+ }
23
+ /** The route for an action on one supplier order. */
24
+ function buildSupplierOrderActionEndpoint(storeId, supplierOrderId, action) {
25
+ return `${constants_1.API_ENDPOINTS.STORE_SUPPLIERS}/${storeId}/orders/${supplierOrderId}/${action}`;
26
+ }
27
+ /**
28
+ * One item per part of an order, each carrying the order's id and number and
29
+ * the supplier order behind it (newest attempt), or null for the store's own part.
30
+ * An order from before parts existed still has one merchant part (the api adds it).
31
+ */
32
+ function splitOrderParts(order) {
33
+ const supplierOrders = order.supplierOrders || [];
34
+ return (order.fulfilmentGroups || []).map((group) => ({
35
+ ...group,
36
+ orderId: order._id,
37
+ orderNumber: order.orderNumber,
38
+ supplierOrder: supplierOrders.find((row) => row.fulfilmentGroupKey === group.key) || null,
39
+ }));
40
+ }
41
+ /**
42
+ * A POST to the `/api/store-suppliers` routes, without the `createdFrom` stamp
43
+ * their schemas never declared. Call it with the node's context:
44
+ * `storeSupplierPost.call(this, apiKey, endpoint, body)`.
45
+ */
46
+ function storeSupplierPost(apiKey, endpoint, body = {}) {
47
+ return api_helpers_1.makeApiRequest.call(this, apiKey, { method: 'POST', endpoint, body, stampCreatedFrom: false });
48
+ }
49
+ /** A GET for the store node, with empty filter values dropped from the query. */
50
+ function storeGet(apiKey, endpoint, qs) {
51
+ return api_helpers_1.makeApiRequest.call(this, apiKey, { method: 'GET', endpoint, ...(qs ? { qs: stripEmpty(qs) } : {}) });
52
+ }
53
+ /**
54
+ * One page of a cursor-paged store list as output rows. The page's
55
+ * `nextCursor` rides on the last row, so the next run can pass it back as the
56
+ * Cursor filter and continue from there.
57
+ */
58
+ function rowsWithNextCursor(page) {
59
+ const rows = [...(page?.items || [])];
60
+ const nextCursor = page?.pagination?.nextCursor;
61
+ if (rows.length && nextCursor)
62
+ rows[rows.length - 1] = { ...rows[rows.length - 1], nextCursor };
63
+ return rows;
64
+ }
65
+ /**
66
+ * Every row of a cursor-paged store list (Return All): follows
67
+ * `pagination.nextCursor` until `pagination.hasMore` is false. A cursor in `qs`
68
+ * is the starting point. Stops, too, if the api hands back the cursor it was
69
+ * just sent, so a misbehaving page can never loop forever.
70
+ */
71
+ async function storeGetAllByCursor(apiKey, endpoint, qs, pageSize) {
72
+ const rows = [];
73
+ let cursor = typeof qs.cursor === 'string' && qs.cursor ? qs.cursor : undefined;
74
+ for (;;) {
75
+ const page = (await storeGet.call(this, apiKey, endpoint, { ...qs, cursor, pageSize }));
76
+ rows.push(...(page?.items || []));
77
+ const next = page?.pagination?.hasMore ? page.pagination.nextCursor : undefined;
78
+ if (!next || next === cursor)
79
+ return rows;
80
+ cursor = next;
81
+ }
82
+ }
83
+ /** Drop empty filter values so the api sees only what the user chose. */
84
+ function stripEmpty(qs) {
85
+ return Object.fromEntries(Object.entries(qs).filter(([, value]) => value !== undefined && value !== null && value !== ''));
86
+ }
87
+ //# sourceMappingURL=store.helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.helpers.js","sourceRoot":"","sources":["../../utils/store.helpers.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAiBH,4DAOC;AAGD,4EAMC;AAOD,0CAQC;AAOD,8CAOC;AAGD,4BAOC;AAOD,gDAKC;AAQD,kDAkBC;AAGD,gCAIC;AAlHD,+CAA+C;AAC/C,2CAA4C;AAS5C;;;GAGG;AACH,SAAgB,wBAAwB,CACvC,OAAe,EACf,OAAe,EACf,QAAgB,EAChB,MAA6B;IAE7B,OAAO,GAAG,yBAAa,CAAC,eAAe,IAAI,OAAO,WAAW,OAAO,WAAW,kBAAkB,CAAC,QAAQ,CAAC,IAAI,MAAM,EAAE,CAAC;AACzH,CAAC;AAED,qDAAqD;AACrD,SAAgB,gCAAgC,CAC/C,OAAe,EACf,eAAuB,EACvB,MAA2B;IAE3B,OAAO,GAAG,yBAAa,CAAC,eAAe,IAAI,OAAO,WAAW,eAAe,IAAI,MAAM,EAAE,CAAC;AAC1F,CAAC;AAED;;;;GAIG;AACH,SAAgB,eAAe,CAAC,KAA2B;IAC1D,MAAM,cAAc,GAAG,KAAK,CAAC,cAAc,IAAI,EAAE,CAAC;IAClD,OAAO,CAAC,KAAK,CAAC,gBAAgB,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACrD,GAAG,KAAK;Q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AED;;;;;GAKG;AACI,KAAK,UAAU,mBAAmB,CAExC,MAAc,EACd,QAAgB,EAChB,EAA2B,EAC3B,QAAgB;IAEhB,MAAM,IAAI,GAAkB,EAAE,CAAC;IAC/B,IAAI,MAAM,GAAG,OAAO,EAAE,CAAC,MAAM,KAAK,QAAQ,IAAI,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;IAChF,SAAS,CAAC;QACT,MAAM,IAAI,GAAG,CAAC,MAAM,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,GAAG,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAE1E,CAAC;QACb,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC;QAClC,MAAM,IAAI,GAAG,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC;QAChF,IAAI,CAAC,IAAI,IAAI,IAAI,KAAK,MAAM;YAAE,OAAO,IAAI,CAAC;QAC1C,MAAM,GAAG,IAAI,CAAC;IACf,CAAC;AACF,CAAC;AAED,yEAAyE;AACzE,SAAgB,UAAU,CAAC,EAA2B;IACrD,OAAO,MAAM,CAAC,WAAW,CACxB,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,EAAE,CAAC,CAC/F,CAAC;AACH,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Versioned writes (optimistic-concurrency, D-18): the Version field of the v2
3
+ * nodes, and the version each update/delete sends as `If-Match`.
4
+ *
5
+ * - v2: the Version field (default `{{ $json.__v }}`); when it is empty, the
6
+ * node fails, unless Version Options > On Unknown Version is Use Latest,
7
+ * which reads the item and uses its `__v` (an explicit opt-in to
8
+ * last-write-wins).
9
+ * - v1: unchanged UI; the item is read first and its `__v` is sent, so a saved
10
+ * workflow keeps last-write-wins after enforcement (legacy, documented).
11
+ */
12
+ import type { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
13
+ /** True when the running node is v2 or later. */
14
+ export declare function isVersionedNode(context: IExecuteFunctions): boolean;
15
+ /** A `__v` read from a stored item, when it is a number. */
16
+ export declare function readStoredVersion(item: unknown): number | undefined;
17
+ /**
18
+ * The version a write sends.
19
+ *
20
+ * @param getEndpoint - the item's GET route, read for v1 and for Use Latest.
21
+ * @param stored - an item the operation already read (its `__v` is reused, no
22
+ * second GET), for the operations that fetch-then-put.
23
+ */
24
+ export declare function resolveWriteVersion(context: IExecuteFunctions, apiKey: string, itemIndex: number, getEndpoint: string, stored?: unknown): Promise<number | undefined>;
25
+ /**
26
+ * The v2-only Version field and Version Options for the given operations. A
27
+ * v1 node shows neither (`@version` display rule): it shows only a notice,
28
+ * not an input, that marks its write operations as legacy (D-18).
29
+ */
30
+ export declare function buildVersionedWriteProperties(operations: string[]): INodeProperties[];
31
+ //# sourceMappingURL=versioned-write.helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"versioned-write.helpers.d.ts","sourceRoot":"","sources":["../../utils/versioned-write.helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAKvE,iDAAiD;AACjD,wBAAgB,eAAe,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAGnE;AAED,4DAA4D;AAC5D,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAGnE;AAQD;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CACxC,OAAO,EAAE,iBAAiB,EAC1B,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,MAAM,CAAC,EAAE,OAAO,GACd,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAmB7B;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,eAAe,EAAE,CAqDrF"}
@@ -0,0 +1,120 @@
1
+ "use strict";
2
+ /**
3
+ * Versioned writes (optimistic-concurrency, D-18): the Version field of the v2
4
+ * nodes, and the version each update/delete sends as `If-Match`.
5
+ *
6
+ * - v2: the Version field (default `{{ $json.__v }}`); when it is empty, the
7
+ * node fails, unless Version Options > On Unknown Version is Use Latest,
8
+ * which reads the item and uses its `__v` (an explicit opt-in to
9
+ * last-write-wins).
10
+ * - v1: unchanged UI; the item is read first and its `__v` is sent, so a saved
11
+ * workflow keeps last-write-wins after enforcement (legacy, documented).
12
+ */
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.isVersionedNode = isVersionedNode;
15
+ exports.readStoredVersion = readStoredVersion;
16
+ exports.resolveWriteVersion = resolveWriteVersion;
17
+ exports.buildVersionedWriteProperties = buildVersionedWriteProperties;
18
+ const n8n_workflow_1 = require("n8n-workflow");
19
+ const api_helpers_1 = require("./api.helpers");
20
+ const constants_1 = require("./constants");
21
+ /** True when the running node is v2 or later. */
22
+ function isVersionedNode(context) {
23
+ const typeVersion = Number(context.getNode()?.typeVersion ?? 1);
24
+ return typeVersion >= constants_1.VERSIONED_WRITES.FIRST_VERSIONED_NODE_VERSION;
25
+ }
26
+ /** A `__v` read from a stored item, when it is a number. */
27
+ function readStoredVersion(item) {
28
+ const v = item?.__v;
29
+ return typeof v === 'number' && Number.isInteger(v) && v >= 0 ? v : undefined;
30
+ }
31
+ function parseVersion(value) {
32
+ if (value === undefined || value === null || value === '')
33
+ return undefined;
34
+ const n = typeof value === 'number' ? value : Number(String(value).trim());
35
+ return Number.isInteger(n) && n >= 0 ? n : undefined;
36
+ }
37
+ /**
38
+ * The version a write sends.
39
+ *
40
+ * @param getEndpoint - the item's GET route, read for v1 and for Use Latest.
41
+ * @param stored - an item the operation already read (its `__v` is reused, no
42
+ * second GET), for the operations that fetch-then-put.
43
+ */
44
+ async function resolveWriteVersion(context, apiKey, itemIndex, getEndpoint, stored) {
45
+ const readLatest = async () => {
46
+ // An item the operation already read is the latest: never read it twice.
47
+ if (stored !== undefined && stored !== null)
48
+ return readStoredVersion(stored);
49
+ const item = await api_helpers_1.makeApiRequest.call(context, apiKey, { method: 'GET', endpoint: getEndpoint });
50
+ return readStoredVersion(item);
51
+ };
52
+ if (!isVersionedNode(context))
53
+ return readLatest();
54
+ const given = parseVersion(context.getNodeParameter(constants_1.VERSIONED_WRITES.VERSION_PARAMETER, itemIndex, ''));
55
+ if (given !== undefined)
56
+ return given;
57
+ const options = context.getNodeParameter(constants_1.VERSIONED_WRITES.OPTIONS_PARAMETER, itemIndex, {});
58
+ if (options?.onUnknownVersion === constants_1.VERSIONED_WRITES.ON_UNKNOWN_USE_LATEST)
59
+ return readLatest();
60
+ throw new n8n_workflow_1.NodeOperationError(context.getNode(), constants_1.VERSIONED_WRITES.UNKNOWN_VERSION_MESSAGE, { itemIndex });
61
+ }
62
+ /**
63
+ * The v2-only Version field and Version Options for the given operations. A
64
+ * v1 node shows neither (`@version` display rule): it shows only a notice,
65
+ * not an input, that marks its write operations as legacy (D-18).
66
+ */
67
+ function buildVersionedWriteProperties(operations) {
68
+ const show = {
69
+ '@version': [constants_1.VERSIONED_WRITES.FIRST_VERSIONED_NODE_VERSION],
70
+ operation: operations,
71
+ };
72
+ return [
73
+ {
74
+ displayName: constants_1.VERSIONED_WRITES.V1_DEPRECATION_NOTE,
75
+ name: constants_1.VERSIONED_WRITES.V1_NOTICE_PARAMETER,
76
+ type: 'notice',
77
+ default: '',
78
+ displayOptions: { show: { '@version': [1], operation: operations } },
79
+ },
80
+ {
81
+ displayName: 'Version',
82
+ name: constants_1.VERSIONED_WRITES.VERSION_PARAMETER,
83
+ type: 'number',
84
+ required: true,
85
+ default: constants_1.VERSIONED_WRITES.DEFAULT_VERSION_EXPRESSION,
86
+ description: 'The version (`__v`) of the item as you read it. Use the output of a Get step. If the item changed since, the node fails with a conflict instead of overwriting it.',
87
+ displayOptions: { show },
88
+ },
89
+ {
90
+ displayName: 'Version Options',
91
+ name: constants_1.VERSIONED_WRITES.OPTIONS_PARAMETER,
92
+ type: 'collection',
93
+ placeholder: 'Add Option',
94
+ default: {},
95
+ displayOptions: { show },
96
+ options: [
97
+ {
98
+ displayName: 'On Unknown Version',
99
+ name: 'onUnknownVersion',
100
+ type: 'options',
101
+ default: constants_1.VERSIONED_WRITES.ON_UNKNOWN_FAIL,
102
+ description: 'What to do when Version is empty',
103
+ options: [
104
+ {
105
+ name: 'Fail',
106
+ value: constants_1.VERSIONED_WRITES.ON_UNKNOWN_FAIL,
107
+ description: 'Stop with an error: map the __v of a Get step',
108
+ },
109
+ {
110
+ name: 'Use Latest (Overwrite)',
111
+ value: constants_1.VERSIONED_WRITES.ON_UNKNOWN_USE_LATEST,
112
+ description: 'Read the item and use its current version: the last write wins',
113
+ },
114
+ ],
115
+ },
116
+ ],
117
+ },
118
+ ];
119
+ }
120
+ //# sourceMappingURL=versioned-write.helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"versioned-write.helpers.js","sourceRoot":"","sources":["../../utils/versioned-write.helpers.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;AAQH,0CAGC;AAGD,8CAGC;AAeD,kDAyBC;AAOD,sEAqDC;AAlHD,+CAAkD;AAClD,+CAA+C;AAC/C,2CAA+C;AAE/C,iDAAiD;AACjD,SAAgB,eAAe,CAAC,OAA0B;IACzD,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,WAAW,IAAI,CAAC,CAAC,CAAC;IAChE,OAAO,WAAW,IAAI,4BAAgB,CAAC,4BAA4B,CAAC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