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.
- package/LICENSE.md +38 -0
- package/README.md +359 -0
- package/dist/credentials/GetCourseApi.credentials.d.ts +10 -0
- package/dist/credentials/GetCourseApi.credentials.js +58 -0
- package/dist/credentials/GetCourseApi.credentials.js.map +1 -0
- package/dist/credentials/GetCourseTechApi.credentials.d.ts +11 -0
- package/dist/credentials/GetCourseTechApi.credentials.js +63 -0
- package/dist/credentials/GetCourseTechApi.credentials.js.map +1 -0
- package/dist/credentials/accountAddress.d.ts +11 -0
- package/dist/credentials/accountAddress.js +116 -0
- package/dist/credentials/accountAddress.js.map +1 -0
- package/dist/icons/getcourse.dark.svg +15 -0
- package/dist/icons/getcourse.svg +11 -0
- package/dist/nodes/GetCourse/GetCourse.node.d.ts +9 -0
- package/dist/nodes/GetCourse/GetCourse.node.js +48 -0
- package/dist/nodes/GetCourse/GetCourse.node.js.map +1 -0
- package/dist/nodes/GetCourse/GetCourse.node.json +40 -0
- package/dist/nodes/GetCourse/v1/actions/call/index.d.ts +3 -0
- package/dist/nodes/GetCourse/v1/actions/call/index.js +98 -0
- package/dist/nodes/GetCourse/v1/actions/call/index.js.map +1 -0
- package/dist/nodes/GetCourse/v1/actions/deal/description.d.ts +2 -0
- package/dist/nodes/GetCourse/v1/actions/deal/description.js +261 -0
- package/dist/nodes/GetCourse/v1/actions/deal/description.js.map +1 -0
- package/dist/nodes/GetCourse/v1/actions/deal/execute.d.ts +2 -0
- package/dist/nodes/GetCourse/v1/actions/deal/execute.js +181 -0
- package/dist/nodes/GetCourse/v1/actions/deal/execute.js.map +1 -0
- package/dist/nodes/GetCourse/v1/actions/deal/index.d.ts +2 -0
- package/dist/nodes/GetCourse/v1/actions/deal/index.js +8 -0
- package/dist/nodes/GetCourse/v1/actions/deal/index.js.map +1 -0
- package/dist/nodes/GetCourse/v1/actions/dialog/index.d.ts +3 -0
- package/dist/nodes/GetCourse/v1/actions/dialog/index.js +262 -0
- package/dist/nodes/GetCourse/v1/actions/dialog/index.js.map +1 -0
- package/dist/nodes/GetCourse/v1/actions/helpdesk/index.d.ts +3 -0
- package/dist/nodes/GetCourse/v1/actions/helpdesk/index.js +305 -0
- package/dist/nodes/GetCourse/v1/actions/helpdesk/index.js.map +1 -0
- package/dist/nodes/GetCourse/v1/actions/index.d.ts +5 -0
- package/dist/nodes/GetCourse/v1/actions/index.js +119 -0
- package/dist/nodes/GetCourse/v1/actions/index.js.map +1 -0
- package/dist/nodes/GetCourse/v1/actions/lesson/index.d.ts +3 -0
- package/dist/nodes/GetCourse/v1/actions/lesson/index.js +180 -0
- package/dist/nodes/GetCourse/v1/actions/lesson/index.js.map +1 -0
- package/dist/nodes/GetCourse/v1/actions/offer/index.d.ts +3 -0
- package/dist/nodes/GetCourse/v1/actions/offer/index.js +98 -0
- package/dist/nodes/GetCourse/v1/actions/offer/index.js.map +1 -0
- package/dist/nodes/GetCourse/v1/actions/school/index.d.ts +3 -0
- package/dist/nodes/GetCourse/v1/actions/school/index.js +139 -0
- package/dist/nodes/GetCourse/v1/actions/school/index.js.map +1 -0
- package/dist/nodes/GetCourse/v1/actions/user/description.d.ts +2 -0
- package/dist/nodes/GetCourse/v1/actions/user/description.js +499 -0
- package/dist/nodes/GetCourse/v1/actions/user/description.js.map +1 -0
- package/dist/nodes/GetCourse/v1/actions/user/execute.d.ts +2 -0
- package/dist/nodes/GetCourse/v1/actions/user/execute.js +270 -0
- package/dist/nodes/GetCourse/v1/actions/user/execute.js.map +1 -0
- package/dist/nodes/GetCourse/v1/actions/user/index.d.ts +2 -0
- package/dist/nodes/GetCourse/v1/actions/user/index.js +8 -0
- package/dist/nodes/GetCourse/v1/actions/user/index.js.map +1 -0
- package/dist/nodes/GetCourse/v1/actions/webhook/index.d.ts +4 -0
- package/dist/nodes/GetCourse/v1/actions/webhook/index.js +179 -0
- package/dist/nodes/GetCourse/v1/actions/webhook/index.js.map +1 -0
- package/dist/nodes/GetCourse/v1/actions/webinar/index.d.ts +3 -0
- package/dist/nodes/GetCourse/v1/actions/webinar/index.js +376 -0
- package/dist/nodes/GetCourse/v1/actions/webinar/index.js.map +1 -0
- package/dist/nodes/GetCourse/v1/descriptions/common.d.ts +7 -0
- package/dist/nodes/GetCourse/v1/descriptions/common.js +142 -0
- package/dist/nodes/GetCourse/v1/descriptions/common.js.map +1 -0
- package/dist/nodes/GetCourse/v1/helpers/errors.d.ts +11 -0
- package/dist/nodes/GetCourse/v1/helpers/errors.js +90 -0
- package/dist/nodes/GetCourse/v1/helpers/errors.js.map +1 -0
- package/dist/nodes/GetCourse/v1/helpers/request.d.ts +7 -0
- package/dist/nodes/GetCourse/v1/helpers/request.js +79 -0
- package/dist/nodes/GetCourse/v1/helpers/request.js.map +1 -0
- package/dist/nodes/GetCourse/v1/methods/index.d.ts +2 -0
- package/dist/nodes/GetCourse/v1/methods/index.js +39 -0
- package/dist/nodes/GetCourse/v1/methods/index.js.map +1 -0
- package/dist/nodes/GetCourse/v1/methods/loadOptions.d.ts +7 -0
- package/dist/nodes/GetCourse/v1/methods/loadOptions.js +76 -0
- package/dist/nodes/GetCourse/v1/methods/loadOptions.js.map +1 -0
- package/dist/nodes/GetCourse/v1/transport/index.d.ts +18 -0
- package/dist/nodes/GetCourse/v1/transport/index.js +165 -0
- package/dist/nodes/GetCourse/v1/transport/index.js.map +1 -0
- package/dist/nodes/GetCourseLegacy/GetCourseLegacy.node.d.ts +9 -0
- package/dist/nodes/GetCourseLegacy/GetCourseLegacy.node.js +48 -0
- package/dist/nodes/GetCourseLegacy/GetCourseLegacy.node.js.map +1 -0
- package/dist/nodes/GetCourseLegacy/GetCourseLegacy.node.json +35 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/deal/description.d.ts +2 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/deal/description.js +287 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/deal/description.js.map +1 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/deal/execute.d.ts +2 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/deal/execute.js +150 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/deal/execute.js.map +1 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/deal/index.d.ts +2 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/deal/index.js +8 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/deal/index.js.map +1 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/export/description.d.ts +2 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/export/description.js +487 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/export/description.js.map +1 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/export/execute.d.ts +2 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/export/execute.js +252 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/export/execute.js.map +1 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/export/index.d.ts +2 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/export/index.js +8 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/export/index.js.map +1 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/field/index.d.ts +3 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/field/index.js +61 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/field/index.js.map +1 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/group/index.d.ts +3 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/group/index.js +42 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/group/index.js.map +1 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/index.d.ts +5 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/index.js +84 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/index.js.map +1 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/user/description.d.ts +2 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/user/description.js +87 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/user/description.js.map +1 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/user/execute.d.ts +5 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/user/execute.js +129 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/user/execute.js.map +1 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/user/index.d.ts +2 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/user/index.js +8 -0
- package/dist/nodes/GetCourseLegacy/v1/actions/user/index.js.map +1 -0
- package/dist/nodes/GetCourseLegacy/v1/descriptions/common.d.ts +14 -0
- package/dist/nodes/GetCourseLegacy/v1/descriptions/common.js +198 -0
- package/dist/nodes/GetCourseLegacy/v1/descriptions/common.js.map +1 -0
- package/dist/nodes/GetCourseLegacy/v1/descriptions/constants.d.ts +7 -0
- package/dist/nodes/GetCourseLegacy/v1/descriptions/constants.js +116 -0
- package/dist/nodes/GetCourseLegacy/v1/descriptions/constants.js.map +1 -0
- package/dist/nodes/GetCourseLegacy/v1/helpers/errors.d.ts +18 -0
- package/dist/nodes/GetCourseLegacy/v1/helpers/errors.js +141 -0
- package/dist/nodes/GetCourseLegacy/v1/helpers/errors.js.map +1 -0
- package/dist/nodes/GetCourseLegacy/v1/helpers/exportRows.d.ts +8 -0
- package/dist/nodes/GetCourseLegacy/v1/helpers/exportRows.js +100 -0
- package/dist/nodes/GetCourseLegacy/v1/helpers/exportRows.js.map +1 -0
- package/dist/nodes/GetCourseLegacy/v1/methods/index.d.ts +2 -0
- package/dist/nodes/GetCourseLegacy/v1/methods/index.js +39 -0
- package/dist/nodes/GetCourseLegacy/v1/methods/index.js.map +1 -0
- package/dist/nodes/GetCourseLegacy/v1/methods/loadOptions.d.ts +5 -0
- package/dist/nodes/GetCourseLegacy/v1/methods/loadOptions.js +92 -0
- package/dist/nodes/GetCourseLegacy/v1/methods/loadOptions.js.map +1 -0
- package/dist/nodes/GetCourseLegacy/v1/transport/index.d.ts +13 -0
- package/dist/nodes/GetCourseLegacy/v1/transport/index.js +204 -0
- package/dist/nodes/GetCourseLegacy/v1/transport/index.js.map +1 -0
- package/dist/nodes/GetCourseTrigger/GetCourseTrigger.node.d.ts +12 -0
- package/dist/nodes/GetCourseTrigger/GetCourseTrigger.node.js +339 -0
- package/dist/nodes/GetCourseTrigger/GetCourseTrigger.node.js.map +1 -0
- package/dist/nodes/GetCourseTrigger/GetCourseTrigger.node.json +32 -0
- package/dist/nodes/GetCourseTrigger/payload.d.ts +14 -0
- package/dist/nodes/GetCourseTrigger/payload.js +66 -0
- package/dist/nodes/GetCourseTrigger/payload.js.map +1 -0
- package/dist/utils/cache.d.ts +2 -0
- package/dist/utils/cache.js +27 -0
- package/dist/utils/cache.js.map +1 -0
- package/dist/utils/dates.d.ts +3 -0
- package/dist/utils/dates.js +70 -0
- package/dist/utils/dates.js.map +1 -0
- package/dist/utils/events.d.ts +14 -0
- package/dist/utils/events.js +92 -0
- package/dist/utils/events.js.map +1 -0
- package/dist/utils/httpError.d.ts +4 -0
- package/dist/utils/httpError.js +46 -0
- package/dist/utils/httpError.js.map +1 -0
- package/dist/utils/query.d.ts +4 -0
- package/dist/utils/query.js +42 -0
- package/dist/utils/query.js.map +1 -0
- package/dist/utils/rateLimiter.d.ts +3 -0
- package/dist/utils/rateLimiter.js +44 -0
- package/dist/utils/rateLimiter.js.map +1 -0
- package/dist/utils/router.d.ts +8 -0
- package/dist/utils/router.js +40 -0
- package/dist/utils/router.js.map +1 -0
- package/index.js +0 -0
- package/package.json +68 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildGroupNames = buildGroupNames;
|
|
4
|
+
exports.buildAddFields = buildAddFields;
|
|
5
|
+
exports.buildSession = buildSession;
|
|
6
|
+
exports.execute = execute;
|
|
7
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
8
|
+
const dates_1 = require("../../../../../utils/dates");
|
|
9
|
+
const query_1 = require("../../../../../utils/query");
|
|
10
|
+
const router_1 = require("../../../../../utils/router");
|
|
11
|
+
const errors_1 = require("../../helpers/errors");
|
|
12
|
+
const transport_1 = require("../../transport");
|
|
13
|
+
const ENDPOINT = '/pl/api/users';
|
|
14
|
+
function buildGroupNames(itemIndex) {
|
|
15
|
+
var _a, _b;
|
|
16
|
+
const collection = this.getNodeParameter('groupsUi', itemIndex, {});
|
|
17
|
+
const rows = ((_a = collection.entry) !== null && _a !== void 0 ? _a : []);
|
|
18
|
+
const timezone = this.getTimezone();
|
|
19
|
+
const groups = [];
|
|
20
|
+
for (const row of rows) {
|
|
21
|
+
const name = String((_b = row.name) !== null && _b !== void 0 ? _b : '').trim();
|
|
22
|
+
if (name === '')
|
|
23
|
+
continue;
|
|
24
|
+
const addedAt = (0, dates_1.toGetCourseDateTime)(row.addedAt, timezone);
|
|
25
|
+
groups.push(addedAt === undefined ? name : [name, addedAt]);
|
|
26
|
+
}
|
|
27
|
+
return groups;
|
|
28
|
+
}
|
|
29
|
+
function buildAddFields(itemIndex) {
|
|
30
|
+
var _a, _b, _c;
|
|
31
|
+
const collection = this.getNodeParameter('addFieldsUi', itemIndex, {});
|
|
32
|
+
const rows = ((_a = collection.field) !== null && _a !== void 0 ? _a : []);
|
|
33
|
+
const fields = {};
|
|
34
|
+
for (const row of rows) {
|
|
35
|
+
const name = String((_b = row.name) !== null && _b !== void 0 ? _b : '').trim();
|
|
36
|
+
if (name === '')
|
|
37
|
+
continue;
|
|
38
|
+
fields[name] = (_c = row.value) !== null && _c !== void 0 ? _c : '';
|
|
39
|
+
}
|
|
40
|
+
return fields;
|
|
41
|
+
}
|
|
42
|
+
function buildSession(itemIndex) {
|
|
43
|
+
return (0, query_1.omitEmpty)(this.getNodeParameter('session', itemIndex, {}));
|
|
44
|
+
}
|
|
45
|
+
async function importUser(itemIndex) {
|
|
46
|
+
var _a, _b, _c;
|
|
47
|
+
const fields = this.getNodeParameter('additionalFields', itemIndex, {});
|
|
48
|
+
const email = String((_a = this.getNodeParameter('email', itemIndex, '')) !== null && _a !== void 0 ? _a : '').trim();
|
|
49
|
+
const phone = String((_b = this.getNodeParameter('phone', itemIndex, '')) !== null && _b !== void 0 ? _b : '').trim();
|
|
50
|
+
if (email === '' && phone === '') {
|
|
51
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'A user import needs an e-mail or a phone number', {
|
|
52
|
+
description: 'GetCourse identifies people by e-mail; the phone number is the fallback.',
|
|
53
|
+
itemIndex,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
const user = (0, query_1.omitEmpty)({
|
|
57
|
+
email,
|
|
58
|
+
phone,
|
|
59
|
+
first_name: fields.first_name,
|
|
60
|
+
last_name: fields.last_name,
|
|
61
|
+
city: fields.city,
|
|
62
|
+
country: fields.country,
|
|
63
|
+
});
|
|
64
|
+
const groups = buildGroupNames.call(this, itemIndex);
|
|
65
|
+
if (groups.length > 0)
|
|
66
|
+
user.group_name = groups;
|
|
67
|
+
const addfields = buildAddFields.call(this, itemIndex);
|
|
68
|
+
if (Object.keys(addfields).length > 0)
|
|
69
|
+
user.addfields = addfields;
|
|
70
|
+
const system = (0, query_1.omitEmpty)({
|
|
71
|
+
refresh_if_exists: fields.refresh_if_exists === true ? 1 : 0,
|
|
72
|
+
partner_email: fields.partner_email,
|
|
73
|
+
});
|
|
74
|
+
const session = buildSession.call(this, itemIndex);
|
|
75
|
+
const params = { user, system };
|
|
76
|
+
if (Object.keys(session).length > 0)
|
|
77
|
+
params.session = session;
|
|
78
|
+
const envelope = await transport_1.importRequest.call(this, ENDPOINT, 'add', params);
|
|
79
|
+
const failure = (0, errors_1.importResultError)(this.getNode(), envelope);
|
|
80
|
+
if (failure !== undefined)
|
|
81
|
+
throw failure;
|
|
82
|
+
return [{ json: ((_c = envelope.result) !== null && _c !== void 0 ? _c : {}) }];
|
|
83
|
+
}
|
|
84
|
+
async function replaceGroups(itemIndex) {
|
|
85
|
+
var _a, _b, _c;
|
|
86
|
+
const userId = String((_a = this.getNodeParameter('userId', itemIndex, '')) !== null && _a !== void 0 ? _a : '').trim();
|
|
87
|
+
if (userId === '') {
|
|
88
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'No user to change groups for', {
|
|
89
|
+
description: 'Give the numeric GetCourse user ID. This operation does not accept an e-mail.',
|
|
90
|
+
itemIndex,
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
const groups = buildGroupNames
|
|
94
|
+
.call(this, itemIndex)
|
|
95
|
+
.map((group) => (Array.isArray(group) ? group[0] : group));
|
|
96
|
+
const supplied = ((_b = this.getNodeParameter('groupsUi', itemIndex, {}).entry) !== null && _b !== void 0 ? _b : []);
|
|
97
|
+
if (supplied.length > 0 && groups.length === 0) {
|
|
98
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'None of the group rows names a group', {
|
|
99
|
+
description: 'Every row under Groups resolved to an empty name. Sending that as-is would remove the user from every group, so the request was not made. Fill the rows in, or delete them all and confirm the removal deliberately.',
|
|
100
|
+
itemIndex,
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
const envelope = await transport_1.importRequest.call(this, ENDPOINT, 'update', {
|
|
104
|
+
user: { id: userId, group_name: groups },
|
|
105
|
+
});
|
|
106
|
+
const failure = (0, errors_1.importResultError)(this.getNode(), envelope);
|
|
107
|
+
if (failure !== undefined)
|
|
108
|
+
throw failure;
|
|
109
|
+
return [
|
|
110
|
+
{
|
|
111
|
+
json: {
|
|
112
|
+
...((_c = envelope.result) !== null && _c !== void 0 ? _c : {}),
|
|
113
|
+
user_id: userId,
|
|
114
|
+
group_name: groups,
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
];
|
|
118
|
+
}
|
|
119
|
+
async function execute(operation, itemIndex) {
|
|
120
|
+
switch (operation) {
|
|
121
|
+
case 'import':
|
|
122
|
+
return await importUser.call(this, itemIndex);
|
|
123
|
+
case 'replaceGroups':
|
|
124
|
+
return await replaceGroups.call(this, itemIndex);
|
|
125
|
+
default:
|
|
126
|
+
throw router_1.unknownOperation.call(this, 'user', operation, itemIndex);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=execute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../../../../nodes/GetCourseLegacy/v1/actions/user/execute.ts"],"names":[],"mappings":";;AAiBA,0CAmBC;AAGD,wCAYC;AAGD,oCAEC;AA8GD,0BAaC;AAlLD,+CAAkD;AAElD,sDAAiE;AACjE,sDAAuD;AACvD,wDAA+D;AAC/D,iDAAyD;AACzD,+CAAgD;AAEhD,MAAM,QAAQ,GAAG,eAAe,CAAC;AAQjC,SAAgB,eAAe,CAE9B,SAAiB;;IAEjB,MAAM,UAAU,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,SAAS,EAAE,EAAE,CAAgB,CAAC;IACnF,MAAM,IAAI,GAAG,CAAC,MAAA,UAAU,CAAC,KAAK,mCAAI,EAAE,CAAkB,CAAC;IACvD,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IAEpC,MAAM,MAAM,GAAqC,EAAE,CAAC;IAEpD,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACxB,MAAM,IAAI,GAAG,MAAM,CAAC,MAAA,GAAG,CAAC,IAAI,mCAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;QAC3C,IAAI,IAAI,KAAK,EAAE;YAAE,SAAS;QAE1B,MAAM,OAAO,GAAG,IAAA,2BAAmB,EAAC,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC3D,MAAM,CAAC,IAAI,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;IAC7D,CAAC;IAED,OAAO,MAAM,CAAC;AACf,CAAC;AAGD,SAAgB,cAAc,CAA0B,SAAiB;;IACxE,MA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V,sNAAsN;YACvN,SAAS;SACT,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,yBAAa,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE;QACnE,IAAI,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE;KACxC,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,IAAA,0BAAiB,EAAC,IAAI,CAAC,OAAO,EAAE,EAAE,QAAQ,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,OAAO,EAAE,MAAM;gBACf,UAAU,EAAE,MAAM;aAClB;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,eAAe;YACnB,OAAO,MAAM,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QAClD;YACC,MAAM,yBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;IAClE,CAAC;AACF,CAAC"}
|
|
@@ -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/user/index.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,qCAAoC;AAA3B,kGAAA,OAAO,OAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare const DYNAMIC_OPTIONS_DESCRIPTION = "Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>";
|
|
3
|
+
export declare const DYNAMIC_MULTI_OPTIONS_DESCRIPTION = "Choose from the list, or specify IDs using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>";
|
|
4
|
+
export declare function userIdentityProperties(displayOptions: INodeProperties['displayOptions'], options?: {
|
|
5
|
+
emailDescription?: string;
|
|
6
|
+
}): INodeProperties[];
|
|
7
|
+
export declare function userProfileFields(): INodeProperties[];
|
|
8
|
+
export declare function groupsProperty(displayOptions: INodeProperties['displayOptions'], options?: {
|
|
9
|
+
includeAddedAt?: boolean;
|
|
10
|
+
description?: string;
|
|
11
|
+
}): INodeProperties;
|
|
12
|
+
export declare function addFieldsProperty(displayOptions: INodeProperties['displayOptions'], loadOptionsMethod: string, subject: string): INodeProperties;
|
|
13
|
+
export declare function sessionProperty(displayOptions: INodeProperties['displayOptions']): INodeProperties;
|
|
14
|
+
export declare function importNotice(name: string, displayOptions: INodeProperties['displayOptions']): INodeProperties;
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DYNAMIC_MULTI_OPTIONS_DESCRIPTION = exports.DYNAMIC_OPTIONS_DESCRIPTION = void 0;
|
|
4
|
+
exports.userIdentityProperties = userIdentityProperties;
|
|
5
|
+
exports.userProfileFields = userProfileFields;
|
|
6
|
+
exports.groupsProperty = groupsProperty;
|
|
7
|
+
exports.addFieldsProperty = addFieldsProperty;
|
|
8
|
+
exports.sessionProperty = sessionProperty;
|
|
9
|
+
exports.importNotice = importNotice;
|
|
10
|
+
exports.DYNAMIC_OPTIONS_DESCRIPTION = 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>';
|
|
11
|
+
exports.DYNAMIC_MULTI_OPTIONS_DESCRIPTION = 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>';
|
|
12
|
+
function userIdentityProperties(displayOptions, options = {}) {
|
|
13
|
+
var _a;
|
|
14
|
+
return [
|
|
15
|
+
{
|
|
16
|
+
displayName: 'Email',
|
|
17
|
+
name: 'email',
|
|
18
|
+
type: 'string',
|
|
19
|
+
placeholder: 'name@example.com',
|
|
20
|
+
default: '',
|
|
21
|
+
displayOptions,
|
|
22
|
+
description: (_a = options.emailDescription) !== null && _a !== void 0 ? _a : 'Электронная почта пользователя. This is what GetCourse matches on: an address it already knows updates that person, a new one creates them. Either this or Phone is required.',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
displayName: 'Phone',
|
|
26
|
+
name: 'phone',
|
|
27
|
+
type: 'string',
|
|
28
|
+
default: '',
|
|
29
|
+
placeholder: '+79161234567',
|
|
30
|
+
displayOptions,
|
|
31
|
+
description: 'Телефон пользователя. Accepted instead of Email when the address is unknown, though matching on it is less reliable — GetCourse normalises numbers before comparing.',
|
|
32
|
+
},
|
|
33
|
+
];
|
|
34
|
+
}
|
|
35
|
+
function userProfileFields() {
|
|
36
|
+
return [
|
|
37
|
+
{
|
|
38
|
+
displayName: 'City',
|
|
39
|
+
name: 'city',
|
|
40
|
+
type: 'string',
|
|
41
|
+
default: '',
|
|
42
|
+
description: 'Город пользователя',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
displayName: 'Country',
|
|
46
|
+
name: 'country',
|
|
47
|
+
type: 'string',
|
|
48
|
+
default: '',
|
|
49
|
+
placeholder: 'Россия',
|
|
50
|
+
description: 'Страна пользователя, in words rather than as an ISO code',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
displayName: 'First Name',
|
|
54
|
+
name: 'first_name',
|
|
55
|
+
type: 'string',
|
|
56
|
+
default: '',
|
|
57
|
+
description: 'Имя пользователя',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
displayName: 'Last Name',
|
|
61
|
+
name: 'last_name',
|
|
62
|
+
type: 'string',
|
|
63
|
+
default: '',
|
|
64
|
+
description: 'Фамилия пользователя',
|
|
65
|
+
},
|
|
66
|
+
];
|
|
67
|
+
}
|
|
68
|
+
function groupsProperty(displayOptions, options = {}) {
|
|
69
|
+
var _a;
|
|
70
|
+
const values = [
|
|
71
|
+
{
|
|
72
|
+
displayName: 'Group Name or ID',
|
|
73
|
+
name: 'name',
|
|
74
|
+
type: 'options',
|
|
75
|
+
typeOptions: { loadOptionsMethod: 'getGroupNames' },
|
|
76
|
+
default: '',
|
|
77
|
+
description: 'Группа. What travels to GetCourse is the group NAME, not its ID — that is what the import API reads. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
78
|
+
},
|
|
79
|
+
];
|
|
80
|
+
if (options.includeAddedAt !== false) {
|
|
81
|
+
values.push({
|
|
82
|
+
displayName: 'Added At',
|
|
83
|
+
name: 'addedAt',
|
|
84
|
+
type: 'dateTime',
|
|
85
|
+
default: '',
|
|
86
|
+
description: 'Дата добавления в группу. Leave empty to use the moment of the request. Sent as YYYY-MM-DD HH:MM:SS in the workflow timezone.',
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
displayName: 'Groups',
|
|
91
|
+
name: 'groupsUi',
|
|
92
|
+
type: 'fixedCollection',
|
|
93
|
+
typeOptions: { multipleValues: true },
|
|
94
|
+
placeholder: 'Add Group',
|
|
95
|
+
default: {},
|
|
96
|
+
displayOptions,
|
|
97
|
+
description: (_a = options.description) !== null && _a !== void 0 ? _a : 'Группы пользователя. Named by title, not by ID. On an import these are added to whatever groups the person is already in.',
|
|
98
|
+
options: [
|
|
99
|
+
{
|
|
100
|
+
name: 'entry',
|
|
101
|
+
displayName: 'Group',
|
|
102
|
+
values,
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
function addFieldsProperty(displayOptions, loadOptionsMethod, subject) {
|
|
108
|
+
return {
|
|
109
|
+
displayName: 'Custom Fields',
|
|
110
|
+
name: 'addFieldsUi',
|
|
111
|
+
type: 'fixedCollection',
|
|
112
|
+
typeOptions: { multipleValues: true },
|
|
113
|
+
placeholder: 'Add Custom Field',
|
|
114
|
+
default: {},
|
|
115
|
+
displayOptions,
|
|
116
|
+
description: `Дополнительные поля ${subject}. Values for the custom fields configured in the account.`,
|
|
117
|
+
options: [
|
|
118
|
+
{
|
|
119
|
+
name: 'field',
|
|
120
|
+
displayName: 'Field',
|
|
121
|
+
values: [
|
|
122
|
+
{
|
|
123
|
+
displayName: 'Field Name or ID',
|
|
124
|
+
name: 'name',
|
|
125
|
+
type: 'options',
|
|
126
|
+
typeOptions: { loadOptionsMethod },
|
|
127
|
+
default: '',
|
|
128
|
+
required: true,
|
|
129
|
+
description: 'Дополнительное поле. GetCourse addresses custom fields by their exact name, spaces and capitalisation included, so a mistyped one is dropped silently rather than reported. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
displayName: 'Value',
|
|
133
|
+
name: 'value',
|
|
134
|
+
type: 'string',
|
|
135
|
+
default: '',
|
|
136
|
+
description: 'Значение поля. Everything is sent as text: a date as YYYY-MM-DD, a checkbox as 1 or 0, and a select as the option label exactly as it reads in the account.',
|
|
137
|
+
},
|
|
138
|
+
],
|
|
139
|
+
},
|
|
140
|
+
],
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
function sessionProperty(displayOptions) {
|
|
144
|
+
return {
|
|
145
|
+
displayName: 'Traffic Source',
|
|
146
|
+
name: 'session',
|
|
147
|
+
type: 'collection',
|
|
148
|
+
placeholder: 'Add Parameter',
|
|
149
|
+
default: {},
|
|
150
|
+
displayOptions,
|
|
151
|
+
description: 'Параметры сессии. UTM tags and partner markers, recorded as the context in which the object was created.',
|
|
152
|
+
options: [
|
|
153
|
+
{
|
|
154
|
+
displayName: 'Gcao',
|
|
155
|
+
name: 'gcao',
|
|
156
|
+
type: 'string',
|
|
157
|
+
default: '',
|
|
158
|
+
description: 'Метка gcao — the affiliate-offer marker GetCourse sets itself',
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
displayName: 'Gcpc',
|
|
162
|
+
name: 'gcpc',
|
|
163
|
+
type: 'string',
|
|
164
|
+
default: '',
|
|
165
|
+
description: 'Метка партнёра gcpc. Takes precedence over Partner Email when both name a partner.',
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
displayName: 'Referer',
|
|
169
|
+
name: 'referer',
|
|
170
|
+
type: 'string',
|
|
171
|
+
default: '',
|
|
172
|
+
description: 'Страница, с которой пришёл посетитель. Accepted by the platform SDK but missing from the help page, so treat it as best-effort.',
|
|
173
|
+
},
|
|
174
|
+
{ displayName: 'UTM Campaign', name: 'utm_campaign', type: 'string', default: '' },
|
|
175
|
+
{ displayName: 'UTM Content', name: 'utm_content', type: 'string', default: '' },
|
|
176
|
+
{ displayName: 'UTM Group', name: 'utm_group', type: 'string', default: '' },
|
|
177
|
+
{ displayName: 'UTM Medium', name: 'utm_medium', type: 'string', default: '' },
|
|
178
|
+
{ displayName: 'UTM Source', name: 'utm_source', type: 'string', default: '' },
|
|
179
|
+
{
|
|
180
|
+
displayName: 'UTM Term',
|
|
181
|
+
name: 'utm_term',
|
|
182
|
+
type: 'string',
|
|
183
|
+
default: '',
|
|
184
|
+
description: 'Метка utm_term. In the platform SDK but not on the help page, unlike the other five UTM tags.',
|
|
185
|
+
},
|
|
186
|
+
],
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
function importNotice(name, displayOptions) {
|
|
190
|
+
return {
|
|
191
|
+
displayName: 'GetCourse calls this an import, not an API for day-to-day changes, and meters it: creating objects counts against a monthly allowance that depends on the account plan, while updating them does not. For anything that has to react within seconds, a process with the «Вызвать URL» operation pointed at a Webhook node is the intended route.',
|
|
192
|
+
name,
|
|
193
|
+
type: 'notice',
|
|
194
|
+
default: '',
|
|
195
|
+
displayOptions,
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../../nodes/GetCourseLegacy/v1/descriptions/common.ts"],"names":[],"mappings":";;;AAiBA,wDA2BC;AAGD,8CAgCC;AASD,wCAiDC;AAUD,8CAyCC;AASD,0CAmDC;AAGD,oCAYC;AApQY,QAAA,2BAA2B,GACvC,gHAAgH,CAAC;AAGrG,QAAA,iCAAiC,GAC7C,8GAA8G,CAAC;AAShH,SAAgB,sBAAsB,CACrC,cAAiD,EACjD,UAAyC,EAAE;;IAE3C,OAAO;QACN;YACC,WAAW,EAAE,OAAO;YACpB,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,kBAAkB;YAC/B,OAAO,EAAE,EAAE;YACX,cAAc;YACd,WAAW,EACV,MAAA,OAAO,CAAC,gBAAgB,mCACxB,+KAA+K;SAChL;QACD;YACC,WAAW,EAAE,OAAO;YACpB,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE;YACX,WAAW,EAAE,cAAc;YAC3B,cAAc;YACd,WAAW,EACV,sKAAsK;SACvK;KACD,CAAC;AACH,CAAC;AAGD,SAAgB,iBAAiB;IAChC,OAAO;QACN;YACC,WAAW,EAAE,MAAM;YACnB,IAAI,EAAE,MAAM;YACZ,I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7 @@
|
|
|
1
|
+
import type { INodePropertyOptions } from 'n8n-workflow';
|
|
2
|
+
export declare const DEAL_STATUSES: INodePropertyOptions[];
|
|
3
|
+
export declare const DEAL_STATUSES_FOR_EXPORT: INodePropertyOptions[];
|
|
4
|
+
export declare const PAYMENT_STATUSES: INodePropertyOptions[];
|
|
5
|
+
export declare const PAYMENT_TYPES: INodePropertyOptions[];
|
|
6
|
+
export declare const CURRENCIES: INodePropertyOptions[];
|
|
7
|
+
export declare const USER_STATUSES: INodePropertyOptions[];
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.USER_STATUSES = exports.CURRENCIES = exports.PAYMENT_TYPES = exports.PAYMENT_STATUSES = exports.DEAL_STATUSES_FOR_EXPORT = exports.DEAL_STATUSES = void 0;
|
|
4
|
+
exports.DEAL_STATUSES = [
|
|
5
|
+
{ name: 'Cancelled (Отменен)', value: 'cancelled' },
|
|
6
|
+
{
|
|
7
|
+
name: 'Completed (Завершен)',
|
|
8
|
+
value: 'payed',
|
|
9
|
+
description: 'Creates a payment on the order, exactly as deal_is_paid does',
|
|
10
|
+
},
|
|
11
|
+
{ name: 'Deferred (Отложен)', value: 'pending' },
|
|
12
|
+
{ name: 'False (Ложный)', value: 'false' },
|
|
13
|
+
{ name: 'In Progress (В работе)', value: 'in_work' },
|
|
14
|
+
{ name: 'New (Новый)', value: 'new' },
|
|
15
|
+
{ name: 'Not Confirmed (Не подтвержден)', value: 'not_confirmed' },
|
|
16
|
+
{ name: 'Partly Paid (Частично оплачен)', value: 'part_payed' },
|
|
17
|
+
{ name: 'Waiting for Payment (Ожидаем оплаты)', value: 'payment_waiting' },
|
|
18
|
+
{ name: 'Waiting for Refund (Ожидаем возврата)', value: 'waiting_for_return' },
|
|
19
|
+
];
|
|
20
|
+
exports.DEAL_STATUSES_FOR_EXPORT = exports.DEAL_STATUSES;
|
|
21
|
+
exports.PAYMENT_STATUSES = [
|
|
22
|
+
{ name: 'Accepted (Получен)', value: 'accepted' },
|
|
23
|
+
{ name: 'Expected (Ожидается)', value: 'expected' },
|
|
24
|
+
{ name: 'From Balance (Списание с баланса)', value: 'frombalance' },
|
|
25
|
+
{ name: 'Returned (Возвращен)', value: 'returned' },
|
|
26
|
+
{ name: 'Returned to Balance (Начисление на депозит)', value: 'returned_to_balance' },
|
|
27
|
+
{ name: 'To Balance (Пополнение баланса)', value: 'tobalance' },
|
|
28
|
+
];
|
|
29
|
+
exports.PAYMENT_TYPES = [
|
|
30
|
+
{ name: '2Checkout', value: '2CO' },
|
|
31
|
+
{ name: 'Alfa-Bank (Альфа-банк)', value: 'ALFA' },
|
|
32
|
+
{ name: 'Bank Card (Банковской картой)', value: 'CARD' },
|
|
33
|
+
{ name: 'Bank Card via Terminal (Банковская карта через терминал)', value: 'CARD_TERMINAL' },
|
|
34
|
+
{ name: 'Bank Receipt (Квитанция в банк)', value: 'kvit' },
|
|
35
|
+
{ name: 'Bank Transfer (Безналичный расчёт)', value: 'BILL' },
|
|
36
|
+
{ name: 'BePaid', value: 'bepaid' },
|
|
37
|
+
{ name: 'Bonus Account (Бонусный счет)', value: 'VIRTUAL' },
|
|
38
|
+
{ name: 'Cash (Наличные)', value: 'CASH' },
|
|
39
|
+
{ name: 'CloudPayments', value: 'cloud_payments' },
|
|
40
|
+
{ name: 'CloudPayments KZ', value: 'cloud_payments_kz' },
|
|
41
|
+
{ name: 'EBANX', value: 'ebanx' },
|
|
42
|
+
{ name: 'Fondy', value: 'fondy' },
|
|
43
|
+
{ name: 'Hutki Grosh', value: 'hutki_grosh' },
|
|
44
|
+
{ name: 'Interkassa (Интеркасса)', value: 'interkassa' },
|
|
45
|
+
{ name: 'Internal Balance (Внутренний баланс)', value: 'INTERNAL' },
|
|
46
|
+
{ name: 'Justclick', value: 'justclick' },
|
|
47
|
+
{ name: 'MandarinPay', value: 'mandarinpay' },
|
|
48
|
+
{ name: 'Other (Другое)', value: 'OTHER' },
|
|
49
|
+
{ name: 'PayAnyWay', value: 'payanyway' },
|
|
50
|
+
{ name: 'PayPal', value: 'PAYPAL' },
|
|
51
|
+
{ name: 'Perfect Money', value: 'perfect_money' },
|
|
52
|
+
{ name: 'Perfect Money (Legacy Code)', value: 'PERFECTMONEY' },
|
|
53
|
+
{ name: 'Platim.ru', value: 'platim' },
|
|
54
|
+
{ name: 'Qiwi (Deprecated)', value: 'QIWI' },
|
|
55
|
+
{ name: 'QIWI Kassa', value: 'qiwi_kassa' },
|
|
56
|
+
{ name: 'Quick Transfer Systems (Системы быстрых переводов)', value: 'QUICKTRANSFER' },
|
|
57
|
+
{ name: 'RBK Money (РБК Деньги)', value: 'RBK' },
|
|
58
|
+
{ name: 'RBK Money 2018', value: 'rbkmoney_new' },
|
|
59
|
+
{ name: 'RBK Money (Deprecated)', value: 'rbkmoney' },
|
|
60
|
+
{ name: 'Robokassa (Робокасса)', value: 'ROBOKASSA' },
|
|
61
|
+
{ name: 'Sberbank (Sberbank)', value: 'SBER' },
|
|
62
|
+
{ name: 'Sberbank Acquiring (Сбербанк эквайринг)', value: 'sberbank' },
|
|
63
|
+
{ name: 'Stripe', value: 'stripe' },
|
|
64
|
+
{ name: 'Swedbank', value: 'swedbank' },
|
|
65
|
+
{ name: 'Tinkoff Bank (Тинькофф Банк)', value: 'tinkoff' },
|
|
66
|
+
{ name: 'Tinkoff Credit (Тинькофф Кредит)', value: 'tinkoffcredit' },
|
|
67
|
+
{ name: 'Walletone (Единая касса)', value: 'walletone' },
|
|
68
|
+
{ name: 'WayForPay', value: 'wayforpay' },
|
|
69
|
+
{ name: 'Webmoney', value: 'WEBMONEY' },
|
|
70
|
+
{ name: 'Yandex.Kassa (Яндекс.Касса)', value: 'yandex_kassa' },
|
|
71
|
+
{ name: 'Yandex.Money (Яндекс.Деньги)', value: 'YANDEXMONEY' },
|
|
72
|
+
{ name: 'Z-Payment', value: 'zpayment' },
|
|
73
|
+
];
|
|
74
|
+
exports.CURRENCIES = [
|
|
75
|
+
'AED',
|
|
76
|
+
'AMD',
|
|
77
|
+
'AUD',
|
|
78
|
+
'AZN',
|
|
79
|
+
'BRL',
|
|
80
|
+
'BYN',
|
|
81
|
+
'BYR',
|
|
82
|
+
'CAD',
|
|
83
|
+
'CHF',
|
|
84
|
+
'CZK',
|
|
85
|
+
'DKK',
|
|
86
|
+
'EUR',
|
|
87
|
+
'GBP',
|
|
88
|
+
'ILS',
|
|
89
|
+
'INR',
|
|
90
|
+
'JPY',
|
|
91
|
+
'KGS',
|
|
92
|
+
'KZT',
|
|
93
|
+
'MNT',
|
|
94
|
+
'MXN',
|
|
95
|
+
'MYR',
|
|
96
|
+
'NZD',
|
|
97
|
+
'PLN',
|
|
98
|
+
'RON',
|
|
99
|
+
'RSD',
|
|
100
|
+
'RUB',
|
|
101
|
+
'SEK',
|
|
102
|
+
'SGD',
|
|
103
|
+
'TRY',
|
|
104
|
+
'UAH',
|
|
105
|
+
'USD',
|
|
106
|
+
'UZS',
|
|
107
|
+
'ZAR',
|
|
108
|
+
].map((code) => ({ name: code, value: code }));
|
|
109
|
+
exports.USER_STATUSES = [
|
|
110
|
+
{ name: 'Active (Активные)', value: 'active' },
|
|
111
|
+
{ name: 'Banned (Заблокированные)', value: 'banned' },
|
|
112
|
+
{ name: 'Deactivated (Отключенные)', value: 'deactivated' },
|
|
113
|
+
{ name: 'In Base (В базе)', value: 'in_base' },
|
|
114
|
+
{ name: 'Invited (Приглашенные)', value: 'invited' },
|
|
115
|
+
];
|
|
116
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../nodes/GetCourseLegacy/v1/descriptions/constants.ts"],"names":[],"mappings":";;;AAqBa,QAAA,aAAa,GAA2B;IACpD,EAAE,IAAI,EAAE,qBAAqB,EAAE,KAAK,EAAE,WAAW,EAAE;IACnD;QACC,IAAI,EAAE,sBAAsB;QAC5B,KAAK,EAAE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E,KAAK,EAAE,UAAU,EAAE;CACxC,CAAC;AAQW,QAAA,UAAU,GAA2B;IACjD,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;CACL,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AAYlC,QAAA,aAAa,GAA2B;IACpD,EAAE,IAAI,EAAE,mBAAmB,EAAE,KAAK,EAAE,QAAQ,EAAE;IAC9C,EAAE,IAAI,EAAE,0BAA0B,EAAE,KAAK,EAAE,QAAQ,EAAE;IACrD,EAAE,IAAI,EAAE,2BAA2B,EAAE,KAAK,EAAE,aAAa,EAAE;IAC3D,EAAE,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,SAAS,EAAE;IAC9C,EAAE,IAAI,EAAE,wBAAwB,EAAE,KAAK,EAAE,SAAS,EAAE;CACpD,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { INode } from 'n8n-workflow';
|
|
2
|
+
import { NodeApiError } from 'n8n-workflow';
|
|
3
|
+
export interface LegacyEnvelope {
|
|
4
|
+
success?: boolean | string;
|
|
5
|
+
action?: string;
|
|
6
|
+
error?: boolean | string;
|
|
7
|
+
error_message?: string;
|
|
8
|
+
error_code?: number | string;
|
|
9
|
+
info?: unknown;
|
|
10
|
+
result?: unknown;
|
|
11
|
+
}
|
|
12
|
+
export declare function isTruthyFlag(value: unknown): boolean;
|
|
13
|
+
export declare function errorCodeOf(envelope: LegacyEnvelope): number | undefined;
|
|
14
|
+
export declare function errorTextOf(envelope: LegacyEnvelope): string;
|
|
15
|
+
export declare function toLegacyApiError(node: INode, error: unknown, status?: number): NodeApiError;
|
|
16
|
+
export declare function envelopeError(node: INode, envelope: LegacyEnvelope): NodeApiError;
|
|
17
|
+
export declare function importResultError(node: INode, envelope: LegacyEnvelope): NodeApiError | undefined;
|
|
18
|
+
export declare function isExportPending(envelope: LegacyEnvelope): boolean;
|