n8n-nodes-getcourse 0.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 (171) hide show
  1. package/LICENSE.md +38 -0
  2. package/README.md +359 -0
  3. package/dist/credentials/GetCourseApi.credentials.d.ts +10 -0
  4. package/dist/credentials/GetCourseApi.credentials.js +58 -0
  5. package/dist/credentials/GetCourseApi.credentials.js.map +1 -0
  6. package/dist/credentials/GetCourseTechApi.credentials.d.ts +11 -0
  7. package/dist/credentials/GetCourseTechApi.credentials.js +63 -0
  8. package/dist/credentials/GetCourseTechApi.credentials.js.map +1 -0
  9. package/dist/credentials/accountAddress.d.ts +11 -0
  10. package/dist/credentials/accountAddress.js +116 -0
  11. package/dist/credentials/accountAddress.js.map +1 -0
  12. package/dist/icons/getcourse.dark.svg +15 -0
  13. package/dist/icons/getcourse.svg +11 -0
  14. package/dist/nodes/GetCourse/GetCourse.node.d.ts +9 -0
  15. package/dist/nodes/GetCourse/GetCourse.node.js +48 -0
  16. package/dist/nodes/GetCourse/GetCourse.node.js.map +1 -0
  17. package/dist/nodes/GetCourse/GetCourse.node.json +40 -0
  18. package/dist/nodes/GetCourse/v1/actions/call/index.d.ts +3 -0
  19. package/dist/nodes/GetCourse/v1/actions/call/index.js +98 -0
  20. package/dist/nodes/GetCourse/v1/actions/call/index.js.map +1 -0
  21. package/dist/nodes/GetCourse/v1/actions/deal/description.d.ts +2 -0
  22. package/dist/nodes/GetCourse/v1/actions/deal/description.js +261 -0
  23. package/dist/nodes/GetCourse/v1/actions/deal/description.js.map +1 -0
  24. package/dist/nodes/GetCourse/v1/actions/deal/execute.d.ts +2 -0
  25. package/dist/nodes/GetCourse/v1/actions/deal/execute.js +181 -0
  26. package/dist/nodes/GetCourse/v1/actions/deal/execute.js.map +1 -0
  27. package/dist/nodes/GetCourse/v1/actions/deal/index.d.ts +2 -0
  28. package/dist/nodes/GetCourse/v1/actions/deal/index.js +8 -0
  29. package/dist/nodes/GetCourse/v1/actions/deal/index.js.map +1 -0
  30. package/dist/nodes/GetCourse/v1/actions/dialog/index.d.ts +3 -0
  31. package/dist/nodes/GetCourse/v1/actions/dialog/index.js +262 -0
  32. package/dist/nodes/GetCourse/v1/actions/dialog/index.js.map +1 -0
  33. package/dist/nodes/GetCourse/v1/actions/helpdesk/index.d.ts +3 -0
  34. package/dist/nodes/GetCourse/v1/actions/helpdesk/index.js +305 -0
  35. package/dist/nodes/GetCourse/v1/actions/helpdesk/index.js.map +1 -0
  36. package/dist/nodes/GetCourse/v1/actions/index.d.ts +5 -0
  37. package/dist/nodes/GetCourse/v1/actions/index.js +119 -0
  38. package/dist/nodes/GetCourse/v1/actions/index.js.map +1 -0
  39. package/dist/nodes/GetCourse/v1/actions/lesson/index.d.ts +3 -0
  40. package/dist/nodes/GetCourse/v1/actions/lesson/index.js +180 -0
  41. package/dist/nodes/GetCourse/v1/actions/lesson/index.js.map +1 -0
  42. package/dist/nodes/GetCourse/v1/actions/offer/index.d.ts +3 -0
  43. package/dist/nodes/GetCourse/v1/actions/offer/index.js +98 -0
  44. package/dist/nodes/GetCourse/v1/actions/offer/index.js.map +1 -0
  45. package/dist/nodes/GetCourse/v1/actions/school/index.d.ts +3 -0
  46. package/dist/nodes/GetCourse/v1/actions/school/index.js +139 -0
  47. package/dist/nodes/GetCourse/v1/actions/school/index.js.map +1 -0
  48. package/dist/nodes/GetCourse/v1/actions/user/description.d.ts +2 -0
  49. package/dist/nodes/GetCourse/v1/actions/user/description.js +499 -0
  50. package/dist/nodes/GetCourse/v1/actions/user/description.js.map +1 -0
  51. package/dist/nodes/GetCourse/v1/actions/user/execute.d.ts +2 -0
  52. package/dist/nodes/GetCourse/v1/actions/user/execute.js +270 -0
  53. package/dist/nodes/GetCourse/v1/actions/user/execute.js.map +1 -0
  54. package/dist/nodes/GetCourse/v1/actions/user/index.d.ts +2 -0
  55. package/dist/nodes/GetCourse/v1/actions/user/index.js +8 -0
  56. package/dist/nodes/GetCourse/v1/actions/user/index.js.map +1 -0
  57. package/dist/nodes/GetCourse/v1/actions/webhook/index.d.ts +4 -0
  58. package/dist/nodes/GetCourse/v1/actions/webhook/index.js +179 -0
  59. package/dist/nodes/GetCourse/v1/actions/webhook/index.js.map +1 -0
  60. package/dist/nodes/GetCourse/v1/actions/webinar/index.d.ts +3 -0
  61. package/dist/nodes/GetCourse/v1/actions/webinar/index.js +376 -0
  62. package/dist/nodes/GetCourse/v1/actions/webinar/index.js.map +1 -0
  63. package/dist/nodes/GetCourse/v1/descriptions/common.d.ts +7 -0
  64. package/dist/nodes/GetCourse/v1/descriptions/common.js +142 -0
  65. package/dist/nodes/GetCourse/v1/descriptions/common.js.map +1 -0
  66. package/dist/nodes/GetCourse/v1/helpers/errors.d.ts +11 -0
  67. package/dist/nodes/GetCourse/v1/helpers/errors.js +90 -0
  68. package/dist/nodes/GetCourse/v1/helpers/errors.js.map +1 -0
  69. package/dist/nodes/GetCourse/v1/helpers/request.d.ts +7 -0
  70. package/dist/nodes/GetCourse/v1/helpers/request.js +79 -0
  71. package/dist/nodes/GetCourse/v1/helpers/request.js.map +1 -0
  72. package/dist/nodes/GetCourse/v1/methods/index.d.ts +2 -0
  73. package/dist/nodes/GetCourse/v1/methods/index.js +39 -0
  74. package/dist/nodes/GetCourse/v1/methods/index.js.map +1 -0
  75. package/dist/nodes/GetCourse/v1/methods/loadOptions.d.ts +7 -0
  76. package/dist/nodes/GetCourse/v1/methods/loadOptions.js +76 -0
  77. package/dist/nodes/GetCourse/v1/methods/loadOptions.js.map +1 -0
  78. package/dist/nodes/GetCourse/v1/transport/index.d.ts +18 -0
  79. package/dist/nodes/GetCourse/v1/transport/index.js +165 -0
  80. package/dist/nodes/GetCourse/v1/transport/index.js.map +1 -0
  81. package/dist/nodes/GetCourseLegacy/GetCourseLegacy.node.d.ts +9 -0
  82. package/dist/nodes/GetCourseLegacy/GetCourseLegacy.node.js +48 -0
  83. package/dist/nodes/GetCourseLegacy/GetCourseLegacy.node.js.map +1 -0
  84. package/dist/nodes/GetCourseLegacy/GetCourseLegacy.node.json +35 -0
  85. package/dist/nodes/GetCourseLegacy/v1/actions/deal/description.d.ts +2 -0
  86. package/dist/nodes/GetCourseLegacy/v1/actions/deal/description.js +287 -0
  87. package/dist/nodes/GetCourseLegacy/v1/actions/deal/description.js.map +1 -0
  88. package/dist/nodes/GetCourseLegacy/v1/actions/deal/execute.d.ts +2 -0
  89. package/dist/nodes/GetCourseLegacy/v1/actions/deal/execute.js +150 -0
  90. package/dist/nodes/GetCourseLegacy/v1/actions/deal/execute.js.map +1 -0
  91. package/dist/nodes/GetCourseLegacy/v1/actions/deal/index.d.ts +2 -0
  92. package/dist/nodes/GetCourseLegacy/v1/actions/deal/index.js +8 -0
  93. package/dist/nodes/GetCourseLegacy/v1/actions/deal/index.js.map +1 -0
  94. package/dist/nodes/GetCourseLegacy/v1/actions/export/description.d.ts +2 -0
  95. package/dist/nodes/GetCourseLegacy/v1/actions/export/description.js +487 -0
  96. package/dist/nodes/GetCourseLegacy/v1/actions/export/description.js.map +1 -0
  97. package/dist/nodes/GetCourseLegacy/v1/actions/export/execute.d.ts +2 -0
  98. package/dist/nodes/GetCourseLegacy/v1/actions/export/execute.js +252 -0
  99. package/dist/nodes/GetCourseLegacy/v1/actions/export/execute.js.map +1 -0
  100. package/dist/nodes/GetCourseLegacy/v1/actions/export/index.d.ts +2 -0
  101. package/dist/nodes/GetCourseLegacy/v1/actions/export/index.js +8 -0
  102. package/dist/nodes/GetCourseLegacy/v1/actions/export/index.js.map +1 -0
  103. package/dist/nodes/GetCourseLegacy/v1/actions/field/index.d.ts +3 -0
  104. package/dist/nodes/GetCourseLegacy/v1/actions/field/index.js +61 -0
  105. package/dist/nodes/GetCourseLegacy/v1/actions/field/index.js.map +1 -0
  106. package/dist/nodes/GetCourseLegacy/v1/actions/group/index.d.ts +3 -0
  107. package/dist/nodes/GetCourseLegacy/v1/actions/group/index.js +42 -0
  108. package/dist/nodes/GetCourseLegacy/v1/actions/group/index.js.map +1 -0
  109. package/dist/nodes/GetCourseLegacy/v1/actions/index.d.ts +5 -0
  110. package/dist/nodes/GetCourseLegacy/v1/actions/index.js +84 -0
  111. package/dist/nodes/GetCourseLegacy/v1/actions/index.js.map +1 -0
  112. package/dist/nodes/GetCourseLegacy/v1/actions/user/description.d.ts +2 -0
  113. package/dist/nodes/GetCourseLegacy/v1/actions/user/description.js +87 -0
  114. package/dist/nodes/GetCourseLegacy/v1/actions/user/description.js.map +1 -0
  115. package/dist/nodes/GetCourseLegacy/v1/actions/user/execute.d.ts +5 -0
  116. package/dist/nodes/GetCourseLegacy/v1/actions/user/execute.js +129 -0
  117. package/dist/nodes/GetCourseLegacy/v1/actions/user/execute.js.map +1 -0
  118. package/dist/nodes/GetCourseLegacy/v1/actions/user/index.d.ts +2 -0
  119. package/dist/nodes/GetCourseLegacy/v1/actions/user/index.js +8 -0
  120. package/dist/nodes/GetCourseLegacy/v1/actions/user/index.js.map +1 -0
  121. package/dist/nodes/GetCourseLegacy/v1/descriptions/common.d.ts +14 -0
  122. package/dist/nodes/GetCourseLegacy/v1/descriptions/common.js +198 -0
  123. package/dist/nodes/GetCourseLegacy/v1/descriptions/common.js.map +1 -0
  124. package/dist/nodes/GetCourseLegacy/v1/descriptions/constants.d.ts +7 -0
  125. package/dist/nodes/GetCourseLegacy/v1/descriptions/constants.js +116 -0
  126. package/dist/nodes/GetCourseLegacy/v1/descriptions/constants.js.map +1 -0
  127. package/dist/nodes/GetCourseLegacy/v1/helpers/errors.d.ts +18 -0
  128. package/dist/nodes/GetCourseLegacy/v1/helpers/errors.js +141 -0
  129. package/dist/nodes/GetCourseLegacy/v1/helpers/errors.js.map +1 -0
  130. package/dist/nodes/GetCourseLegacy/v1/helpers/exportRows.d.ts +8 -0
  131. package/dist/nodes/GetCourseLegacy/v1/helpers/exportRows.js +100 -0
  132. package/dist/nodes/GetCourseLegacy/v1/helpers/exportRows.js.map +1 -0
  133. package/dist/nodes/GetCourseLegacy/v1/methods/index.d.ts +2 -0
  134. package/dist/nodes/GetCourseLegacy/v1/methods/index.js +39 -0
  135. package/dist/nodes/GetCourseLegacy/v1/methods/index.js.map +1 -0
  136. package/dist/nodes/GetCourseLegacy/v1/methods/loadOptions.d.ts +5 -0
  137. package/dist/nodes/GetCourseLegacy/v1/methods/loadOptions.js +92 -0
  138. package/dist/nodes/GetCourseLegacy/v1/methods/loadOptions.js.map +1 -0
  139. package/dist/nodes/GetCourseLegacy/v1/transport/index.d.ts +13 -0
  140. package/dist/nodes/GetCourseLegacy/v1/transport/index.js +204 -0
  141. package/dist/nodes/GetCourseLegacy/v1/transport/index.js.map +1 -0
  142. package/dist/nodes/GetCourseTrigger/GetCourseTrigger.node.d.ts +12 -0
  143. package/dist/nodes/GetCourseTrigger/GetCourseTrigger.node.js +339 -0
  144. package/dist/nodes/GetCourseTrigger/GetCourseTrigger.node.js.map +1 -0
  145. package/dist/nodes/GetCourseTrigger/GetCourseTrigger.node.json +32 -0
  146. package/dist/nodes/GetCourseTrigger/payload.d.ts +14 -0
  147. package/dist/nodes/GetCourseTrigger/payload.js +66 -0
  148. package/dist/nodes/GetCourseTrigger/payload.js.map +1 -0
  149. package/dist/utils/cache.d.ts +2 -0
  150. package/dist/utils/cache.js +27 -0
  151. package/dist/utils/cache.js.map +1 -0
  152. package/dist/utils/dates.d.ts +3 -0
  153. package/dist/utils/dates.js +70 -0
  154. package/dist/utils/dates.js.map +1 -0
  155. package/dist/utils/events.d.ts +14 -0
  156. package/dist/utils/events.js +92 -0
  157. package/dist/utils/events.js.map +1 -0
  158. package/dist/utils/httpError.d.ts +4 -0
  159. package/dist/utils/httpError.js +46 -0
  160. package/dist/utils/httpError.js.map +1 -0
  161. package/dist/utils/query.d.ts +4 -0
  162. package/dist/utils/query.js +42 -0
  163. package/dist/utils/query.js.map +1 -0
  164. package/dist/utils/rateLimiter.d.ts +3 -0
  165. package/dist/utils/rateLimiter.js +44 -0
  166. package/dist/utils/rateLimiter.js.map +1 -0
  167. package/dist/utils/router.d.ts +8 -0
  168. package/dist/utils/router.js +40 -0
  169. package/dist/utils/router.js.map +1 -0
  170. package/index.js +0 -0
  171. package/package.json +68 -0
@@ -0,0 +1,287 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.description = void 0;
4
+ const common_1 = require("../../descriptions/common");
5
+ const constants_1 = require("../../descriptions/constants");
6
+ const showFor = (operations) => ({
7
+ show: { resource: ['deal'], operation: operations },
8
+ });
9
+ const operation = {
10
+ displayName: 'Operation',
11
+ name: 'operation',
12
+ type: 'options',
13
+ noDataExpression: true,
14
+ default: 'import',
15
+ displayOptions: { show: { resource: ['deal'] } },
16
+ options: [
17
+ {
18
+ name: 'Import',
19
+ value: 'import',
20
+ action: 'Import an order',
21
+ description: 'Создать или обновить заказ. Creates the order, and the buyer with it if that e-mail is new. Supplying an existing order number edits that order instead.',
22
+ },
23
+ {
24
+ name: 'Set Status',
25
+ value: 'setStatus',
26
+ action: 'Set the status of an order',
27
+ description: "Изменить статус заказа. Moves an existing order to another status, identified by its order number and the buyer's e-mail.",
28
+ },
29
+ ],
30
+ };
31
+ const minimumNotice = {
32
+ displayName: 'Минимальный набор для нового заказа: e-mail покупателя плюс либо ID предложения, либо код предложения (или название) вместе с суммой. Editing an existing order needs the order number as well. An order carries one offer: to add a second, import again with the same order number and Append Offers switched on.',
33
+ name: 'dealImportNotice',
34
+ type: 'notice',
35
+ default: '',
36
+ displayOptions: showFor(['import']),
37
+ };
38
+ const statusNotice = {
39
+ displayName: 'Перевод заказа в «Завершен» создаёт в нём платёж, ровно как флаг «оплачен». Moving a completed order to any other status does NOT cancel the purchases it granted, so the student keeps their access — GetCourse recommends writing the wanted status into a custom field and letting a process apply it, which does revoke access.',
40
+ name: 'dealStatusNotice',
41
+ type: 'notice',
42
+ default: '',
43
+ displayOptions: showFor(['setStatus']),
44
+ };
45
+ const dealNumberProperty = {
46
+ displayName: 'Order Number',
47
+ name: 'deal_number',
48
+ type: 'string',
49
+ default: '',
50
+ required: true,
51
+ displayOptions: showFor(['setStatus']),
52
+ description: 'Номер заказа. The number shown in the account and returned by an import, not the internal order ID.',
53
+ };
54
+ const statusProperty = {
55
+ displayName: 'Status',
56
+ name: 'deal_status',
57
+ type: 'options',
58
+ default: 'new',
59
+ required: true,
60
+ options: constants_1.DEAL_STATUSES,
61
+ displayOptions: showFor(['setStatus']),
62
+ description: 'Статус заказа, into which the order is moved',
63
+ };
64
+ const offerProperties = [
65
+ {
66
+ displayName: 'Offer ID',
67
+ name: 'offer_id',
68
+ type: 'string',
69
+ default: '',
70
+ displayOptions: showFor(['import']),
71
+ description: 'ID предложения. The most reliable way to name an offer: when it is given, the offer code, title and description are ignored, and an ID that matches nothing fails the whole request instead of inventing a product.',
72
+ },
73
+ {
74
+ displayName: 'Offer Code',
75
+ name: 'offer_code',
76
+ type: 'string',
77
+ default: '',
78
+ displayOptions: showFor(['import']),
79
+ description: "Уникальный код предложения, from the offer's settings page. Used only when Offer ID is empty.",
80
+ },
81
+ {
82
+ displayName: 'Amount',
83
+ name: 'deal_cost',
84
+ type: 'number',
85
+ default: 0,
86
+ typeOptions: { minValue: 0 },
87
+ displayOptions: showFor(['import']),
88
+ description: "Сумма заказа. Required alongside an offer code or a product title. With an Offer ID it is optional — leave it at zero and the offer's own price is used.",
89
+ },
90
+ ];
91
+ const dealFields = {
92
+ displayName: 'Order Fields',
93
+ name: 'dealFields',
94
+ type: 'collection',
95
+ placeholder: 'Add Field',
96
+ default: {},
97
+ displayOptions: showFor(['import']),
98
+ options: [
99
+ {
100
+ displayName: 'Append Offers',
101
+ name: 'multiple_offers',
102
+ type: 'boolean',
103
+ default: false,
104
+ description: 'Whether to add this offer to an existing order rather than replace its contents (multiple_offers). One request carries one offer, so several offers mean several requests: the first without this flag, the rest with it and the same order number.',
105
+ },
106
+ {
107
+ displayName: 'Comment',
108
+ name: 'deal_comment',
109
+ type: 'string',
110
+ typeOptions: { rows: 3 },
111
+ default: '',
112
+ description: 'Комментарий к заказу',
113
+ },
114
+ {
115
+ displayName: 'Created At',
116
+ name: 'deal_created_at',
117
+ type: 'dateTime',
118
+ default: '',
119
+ description: 'Дата заказа. Backdates the order; leave empty for the moment of the request. Sent as YYYY-MM-DD HH:MM:SS in the workflow timezone.',
120
+ },
121
+ {
122
+ displayName: 'Currency',
123
+ name: 'deal_currency',
124
+ type: 'options',
125
+ default: 'RUB',
126
+ options: constants_1.CURRENCIES,
127
+ description: 'Код валюты заказа. Omitting it means roubles. The account may support codes beyond this list — an expression can supply one.',
128
+ },
129
+ {
130
+ displayName: 'Finished At',
131
+ name: 'deal_finished_at',
132
+ type: 'dateTime',
133
+ default: '',
134
+ description: 'Дата оплаты или завершения заказа. Sent as YYYY-MM-DD HH:MM:SS in the workflow timezone.',
135
+ },
136
+ {
137
+ displayName: 'Funnel ID',
138
+ name: 'funnel_id',
139
+ type: 'string',
140
+ default: '',
141
+ description: 'ID доски продаж, onto which the order is placed',
142
+ },
143
+ {
144
+ displayName: 'Funnel Stage ID',
145
+ name: 'funnel_stage_id',
146
+ type: 'string',
147
+ default: '',
148
+ description: 'ID этапа на доске продаж. Only meaningful together with a Funnel ID.',
149
+ },
150
+ {
151
+ displayName: 'Manager Email',
152
+ name: 'manager_email',
153
+ type: 'string',
154
+ placeholder: 'manager@example.com',
155
+ default: '',
156
+ description: 'Email менеджера, assigned to the order',
157
+ },
158
+ {
159
+ displayName: 'Mark as Paid',
160
+ name: 'deal_is_paid',
161
+ type: 'boolean',
162
+ default: false,
163
+ description: 'Whether to record the order as paid (оплачен). This creates a payment on the order, the same as moving it to the Completed status.',
164
+ },
165
+ {
166
+ displayName: 'Order Number',
167
+ name: 'deal_number',
168
+ type: 'string',
169
+ default: '',
170
+ description: 'Номер заказа. Leave empty to let GetCourse assign one. Supplying a number that already exists edits that order instead of creating a new one — which is how an import is repeated safely.',
171
+ },
172
+ {
173
+ displayName: 'Partner Email',
174
+ name: 'partner_email',
175
+ type: 'string',
176
+ placeholder: 'partner@example.com',
177
+ default: '',
178
+ description: "Email партнёра для заказа. An order may credit a different partner than the buyer's own. A partner who does not exist is an error.",
179
+ },
180
+ {
181
+ displayName: 'Payment Status',
182
+ name: 'payment_status',
183
+ type: 'options',
184
+ default: 'expected',
185
+ options: constants_1.PAYMENT_STATUSES,
186
+ description: 'Статус платежа',
187
+ },
188
+ {
189
+ displayName: 'Payment Type',
190
+ name: 'payment_type',
191
+ type: 'options',
192
+ default: 'OTHER',
193
+ options: constants_1.PAYMENT_TYPES,
194
+ description: 'Тип платежа',
195
+ },
196
+ {
197
+ displayName: 'Product Description',
198
+ name: 'product_description',
199
+ type: 'string',
200
+ typeOptions: { rows: 2 },
201
+ default: '',
202
+ description: 'Описание продукта. Ignored when Offer ID is set.',
203
+ },
204
+ {
205
+ displayName: 'Product Title',
206
+ name: 'product_title',
207
+ type: 'string',
208
+ default: '',
209
+ description: 'Наименование предложения. Stands in for the offer code when the offer has none. Ignored when Offer ID is set.',
210
+ },
211
+ {
212
+ displayName: 'Quantity',
213
+ name: 'quantity',
214
+ type: 'number',
215
+ typeOptions: { minValue: 1 },
216
+ default: 1,
217
+ description: 'Количество единиц предложения в заказе',
218
+ },
219
+ {
220
+ displayName: 'Return Order Number',
221
+ name: 'return_deal_number',
222
+ type: 'boolean',
223
+ default: true,
224
+ description: 'Whether to include the assigned order number in the answer (return_deal_number). Without it a newly created order comes back as an ID only, and repeating the import safely needs the number.',
225
+ },
226
+ {
227
+ displayName: 'Return Payment Link',
228
+ name: 'return_payment_link',
229
+ type: 'boolean',
230
+ default: false,
231
+ description: 'Whether to include a link to the payment page in the answer (return_payment_link). Useful when the workflow goes on to send the buyer an invoice.',
232
+ },
233
+ {
234
+ displayName: 'Status',
235
+ name: 'deal_status',
236
+ type: 'options',
237
+ default: 'new',
238
+ options: constants_1.DEAL_STATUSES,
239
+ description: 'Статус заказа at creation',
240
+ },
241
+ ],
242
+ };
243
+ const userFields = {
244
+ displayName: 'Buyer Fields',
245
+ name: 'userFields',
246
+ type: 'collection',
247
+ placeholder: 'Add Field',
248
+ default: {},
249
+ displayOptions: showFor(['import']),
250
+ description: 'Данные покупателя. Filled in only when the import creates the person; an existing one is left alone unless Update Existing Buyer is on.',
251
+ options: [
252
+ ...(0, common_1.userProfileFields)(),
253
+ {
254
+ displayName: 'Partner Email',
255
+ name: 'partner_email',
256
+ type: 'string',
257
+ placeholder: 'partner@example.com',
258
+ default: '',
259
+ description: 'Email партнёра для пользователя, as opposed to the partner credited for the order',
260
+ },
261
+ {
262
+ displayName: 'Update Existing Buyer',
263
+ name: 'refresh_if_exists',
264
+ type: 'boolean',
265
+ default: false,
266
+ description: "Whether to refresh a known buyer's profile from the fields above (обновлять существующего). It never affects the order itself — only the person.",
267
+ },
268
+ ],
269
+ };
270
+ exports.description = [
271
+ operation,
272
+ (0, common_1.importNotice)('dealApiNotice', showFor(['import'])),
273
+ minimumNotice,
274
+ statusNotice,
275
+ ...(0, common_1.userIdentityProperties)(showFor(['import', 'setStatus']), {
276
+ emailDescription: 'Электронная почта покупателя. GetCourse matches the order to this person, creating them if the address is new.',
277
+ }),
278
+ dealNumberProperty,
279
+ statusProperty,
280
+ ...offerProperties,
281
+ dealFields,
282
+ (0, common_1.addFieldsProperty)(showFor(['import']), 'getDealCustomFields', 'заказа'),
283
+ userFields,
284
+ (0, common_1.groupsProperty)(showFor(['import'])),
285
+ (0, common_1.sessionProperty)(showFor(['import'])),
286
+ ];
287
+ //# sourceMappingURL=description.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"description.js","sourceRoot":"","sources":["../../../../../../nodes/GetCourseLegacy/v1/actions/deal/description.ts"],"names":[],"mappings":";;;AAEA,sDAOmC;AACnC,4DAKsC;AAEtC,MAAM,OAAO,GAAG,CAAC,UAAoB,EAAqC,EAAE,CAAC,CAAC;IAC7E,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE;CACnD,CAAC,CAAC;AAUH,MAAM,SAA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nC,IAAA,wBAAe,EAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;CACpC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function execute(this: IExecuteFunctions, operation: string, itemIndex: number): Promise<INodeExecutionData[]>;
@@ -0,0 +1,150 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.execute = execute;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const dates_1 = require("../../../../../utils/dates");
6
+ const query_1 = require("../../../../../utils/query");
7
+ const router_1 = require("../../../../../utils/router");
8
+ const errors_1 = require("../../helpers/errors");
9
+ const transport_1 = require("../../transport");
10
+ const execute_1 = require("../user/execute");
11
+ const ENDPOINT = '/pl/api/deals';
12
+ function buildUser(itemIndex) {
13
+ var _a, _b;
14
+ const fields = this.getNodeParameter('userFields', itemIndex, {});
15
+ const user = (0, query_1.omitEmpty)({
16
+ email: String((_a = this.getNodeParameter('email', itemIndex, '')) !== null && _a !== void 0 ? _a : '').trim(),
17
+ phone: String((_b = this.getNodeParameter('phone', itemIndex, '')) !== null && _b !== void 0 ? _b : '').trim(),
18
+ first_name: fields.first_name,
19
+ last_name: fields.last_name,
20
+ city: fields.city,
21
+ country: fields.country,
22
+ });
23
+ const groups = execute_1.buildGroupNames.call(this, itemIndex);
24
+ if (groups.length > 0)
25
+ user.group_name = groups;
26
+ return user;
27
+ }
28
+ function assertMinimumFields(itemIndex, deal) {
29
+ var _a, _b, _c, _d, _e, _f;
30
+ if (String((_a = deal.email) !== null && _a !== void 0 ? _a : '') === '' && String((_b = deal.phone) !== null && _b !== void 0 ? _b : '') === '') {
31
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'An order import needs the buyer e-mail', {
32
+ description: 'GetCourse attaches the order to a person, and identifies that person by e-mail.',
33
+ itemIndex,
34
+ });
35
+ }
36
+ if (String((_c = deal.offer_id) !== null && _c !== void 0 ? _c : '') !== '')
37
+ return;
38
+ const named = String((_d = deal.offer_code) !== null && _d !== void 0 ? _d : '') !== '' || String((_e = deal.product_title) !== null && _e !== void 0 ? _e : '') !== '';
39
+ const priced = Number((_f = deal.deal_cost) !== null && _f !== void 0 ? _f : 0) > 0;
40
+ if (named && priced)
41
+ return;
42
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'An order import needs an offer and a price', {
43
+ description: 'Give an Offer ID, or an Offer Code (or Product Title) together with an Amount above zero. Those are the two combinations GetCourse accepts.',
44
+ itemIndex,
45
+ });
46
+ }
47
+ async function importDeal(itemIndex) {
48
+ var _a, _b, _c, _d;
49
+ const fields = this.getNodeParameter('dealFields', itemIndex, {});
50
+ const userFields = this.getNodeParameter('userFields', itemIndex, {});
51
+ const timezone = this.getTimezone();
52
+ const deal = (0, query_1.omitEmpty)({
53
+ deal_number: fields.deal_number,
54
+ offer_id: String((_a = this.getNodeParameter('offer_id', itemIndex, '')) !== null && _a !== void 0 ? _a : '').trim(),
55
+ offer_code: String((_b = this.getNodeParameter('offer_code', itemIndex, '')) !== null && _b !== void 0 ? _b : '').trim(),
56
+ product_title: fields.product_title,
57
+ product_description: fields.product_description,
58
+ quantity: fields.quantity,
59
+ deal_cost: Number(this.getNodeParameter('deal_cost', itemIndex, 0)) || undefined,
60
+ deal_status: fields.deal_status,
61
+ manager_email: fields.manager_email,
62
+ deal_created_at: (0, dates_1.toGetCourseDateTime)(fields.deal_created_at, timezone),
63
+ deal_finished_at: (0, dates_1.toGetCourseDateTime)(fields.deal_finished_at, timezone),
64
+ deal_comment: fields.deal_comment,
65
+ payment_type: fields.payment_type,
66
+ payment_status: fields.payment_status,
67
+ partner_email: fields.partner_email,
68
+ deal_currency: fields.deal_currency,
69
+ funnel_id: fields.funnel_id,
70
+ funnel_stage_id: fields.funnel_stage_id,
71
+ });
72
+ if (fields.deal_is_paid !== undefined)
73
+ deal.deal_is_paid = fields.deal_is_paid === true ? 1 : 0;
74
+ const addfields = execute_1.buildAddFields.call(this, itemIndex);
75
+ if (Object.keys(addfields).length > 0)
76
+ deal.addfields = addfields;
77
+ const user = buildUser.call(this, itemIndex);
78
+ assertMinimumFields.call(this, itemIndex, {
79
+ email: user.email,
80
+ phone: user.phone,
81
+ offer_id: deal.offer_id,
82
+ offer_code: deal.offer_code,
83
+ product_title: deal.product_title,
84
+ deal_cost: deal.deal_cost,
85
+ });
86
+ const system = {
87
+ refresh_if_exists: userFields.refresh_if_exists === true ? 1 : 0,
88
+ multiple_offers: fields.multiple_offers === true ? 1 : 0,
89
+ return_payment_link: fields.return_payment_link === true ? 1 : 0,
90
+ return_deal_number: fields.return_deal_number === false ? 0 : 1,
91
+ };
92
+ if (String((_c = userFields.partner_email) !== null && _c !== void 0 ? _c : '') !== '') {
93
+ system.partner_email = userFields.partner_email;
94
+ }
95
+ const session = execute_1.buildSession.call(this, itemIndex);
96
+ const params = { user, system, deal };
97
+ if (Object.keys(session).length > 0)
98
+ params.session = session;
99
+ const envelope = await transport_1.importRequest.call(this, ENDPOINT, 'add', params);
100
+ const failure = (0, errors_1.importResultError)(this.getNode(), envelope);
101
+ if (failure !== undefined)
102
+ throw failure;
103
+ return [{ json: ((_d = envelope.result) !== null && _d !== void 0 ? _d : {}) }];
104
+ }
105
+ async function setStatus(itemIndex) {
106
+ var _a, _b, _c, _d, _e;
107
+ const email = String((_a = this.getNodeParameter('email', itemIndex, '')) !== null && _a !== void 0 ? _a : '').trim();
108
+ const phone = String((_b = this.getNodeParameter('phone', itemIndex, '')) !== null && _b !== void 0 ? _b : '').trim();
109
+ const dealNumber = String((_c = this.getNodeParameter('deal_number', itemIndex, '')) !== null && _c !== void 0 ? _c : '').trim();
110
+ const status = String((_d = this.getNodeParameter('deal_status', itemIndex, '')) !== null && _d !== void 0 ? _d : '').trim();
111
+ if (dealNumber === '') {
112
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'No order to change', {
113
+ description: 'Give the order number. Without it GetCourse creates a new order instead.',
114
+ itemIndex,
115
+ });
116
+ }
117
+ if (email === '' && phone === '') {
118
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'A status change needs the buyer e-mail', {
119
+ description: 'The legacy API identifies the order by its number together with its owner.',
120
+ itemIndex,
121
+ });
122
+ }
123
+ const envelope = await transport_1.importRequest.call(this, ENDPOINT, 'add', {
124
+ user: (0, query_1.omitEmpty)({ email, phone }),
125
+ deal: { deal_number: dealNumber, deal_status: status },
126
+ });
127
+ const failure = (0, errors_1.importResultError)(this.getNode(), envelope);
128
+ if (failure !== undefined)
129
+ throw failure;
130
+ return [
131
+ {
132
+ json: {
133
+ ...((_e = envelope.result) !== null && _e !== void 0 ? _e : {}),
134
+ deal_number: dealNumber,
135
+ deal_status: status,
136
+ },
137
+ },
138
+ ];
139
+ }
140
+ async function execute(operation, itemIndex) {
141
+ switch (operation) {
142
+ case 'import':
143
+ return await importDeal.call(this, itemIndex);
144
+ case 'setStatus':
145
+ return await setStatus.call(this, itemIndex);
146
+ default:
147
+ throw router_1.unknownOperation.call(this, 'order', operation, itemIndex);
148
+ }
149
+ }
150
+ //# sourceMappingURL=execute.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../../../../nodes/GetCourseLegacy/v1/actions/deal/execute.ts"],"names":[],"mappings":";;AA+KA,0BAaC;AA3LD,+CAAkD;AAElD,sDAAiE;AACjE,sDAAuD;AACvD,wDAA+D;AAC/D,iDAAyD;AACzD,+CAAgD;AAChD,6CAAgF;AAEhF,MAAM,QAAQ,GAAG,eAAe,CAAC;AAGjC,SAAS,SAAS,CAA0B,SAAiB;;IAC5D,MAAM,MAAM,GAAG,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,SAAS,EAAE,EAAE,CAAgB,CAAC;IAEjF,MAAM,IAAI,GAAgB,IAAA,iBAAS,EAAC;QACnC,KAAK,EAAE,MAAM,CAAC,MAAA,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,SAAS,EAAE,EAA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Q,CAAC,CAAC;IAC5D,IAAI,OAAO,KAAK,SAAS;QAAE,MAAM,OAAO,CAAC;IAEzC,OAAO;QACN;YACC,IAAI,EAAE;gBACL,GAAI,CAAC,MAAA,QAAQ,CAAC,MAAM,mCAAI,EAAE,CAAiB;gBAC3C,WAAW,EAAE,UAAU;gBACvB,WAAW,EAAE,MAAM;aACnB;SACD;KACD,CAAC;AACH,CAAC;AAEM,KAAK,UAAU,OAAO,CAE5B,SAAiB,EACjB,SAAiB;IAEjB,QAAQ,SAAS,EAAE,CAAC;QACnB,KAAK,QAAQ;YACZ,OAAO,MAAM,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QAC/C,KAAK,WAAW;YACf,OAAO,MAAM,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QAC9C;YACC,MAAM,yBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;IACnE,CAAC;AACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { description } from './description';
2
+ export { execute } from './execute';
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.execute = exports.description = void 0;
4
+ var description_1 = require("./description");
5
+ Object.defineProperty(exports, "description", { enumerable: true, get: function () { return description_1.description; } });
6
+ var execute_1 = require("./execute");
7
+ Object.defineProperty(exports, "execute", { enumerable: true, get: function () { return execute_1.execute; } });
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../nodes/GetCourseLegacy/v1/actions/deal/index.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,qCAAoC;AAA3B,kGAAA,OAAO,OAAA"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const description: INodeProperties[];