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,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.pinnedHttpRequestDomains = exports.accountAddressProperties = exports.ACCOUNT_DOMAINS = void 0;
|
|
4
|
+
exports.accountHostExpression = accountHostExpression;
|
|
5
|
+
exports.accountBaseUrl = accountBaseUrl;
|
|
6
|
+
exports.ACCOUNT_DOMAINS = ['getcourse.ru', 'getcourse.io'];
|
|
7
|
+
const SUBDOMAIN_ALLOWED = /[^a-z0-9-]/g;
|
|
8
|
+
const HOSTNAME_ALLOWED = /[^a-z0-9.-]/g;
|
|
9
|
+
const NUMERIC_HOST = /^[0-9.]+$/;
|
|
10
|
+
function normaliseHostname(value) {
|
|
11
|
+
const host = String(value !== null && value !== void 0 ? value : '')
|
|
12
|
+
.trim()
|
|
13
|
+
.toLowerCase()
|
|
14
|
+
.replace(/^[a-z][a-z0-9+.-]*:\/\//, '')
|
|
15
|
+
.split('/')[0]
|
|
16
|
+
.split('?')[0]
|
|
17
|
+
.split('@')
|
|
18
|
+
.pop()
|
|
19
|
+
.split(':')[0]
|
|
20
|
+
.replace(HOSTNAME_ALLOWED, '')
|
|
21
|
+
.replace(/^\.+|\.+$/g, '');
|
|
22
|
+
if (!host.includes('.'))
|
|
23
|
+
return '';
|
|
24
|
+
return NUMERIC_HOST.test(host) ? '' : host;
|
|
25
|
+
}
|
|
26
|
+
function accountHostExpression(ref) {
|
|
27
|
+
const domains = JSON.stringify([...exports.ACCOUNT_DOMAINS]);
|
|
28
|
+
const subdomain = `String(${ref}.subdomain || "").trim().toLowerCase().replace(/[^a-z0-9-]/g, "")`;
|
|
29
|
+
const domain = `String(${ref}.domain || "")`;
|
|
30
|
+
const custom = `String(${ref}.customDomain || "")` +
|
|
31
|
+
'.trim().toLowerCase()' +
|
|
32
|
+
'.replace(/^[a-z][a-z0-9+.-]*:\\/\\//, "")' +
|
|
33
|
+
'.split("/")[0].split("?")[0].split("@").pop().split(":")[0]' +
|
|
34
|
+
'.replace(/[^a-z0-9.-]/g, "")' +
|
|
35
|
+
'.replace(/^\\.+|\\.+$/g, "")';
|
|
36
|
+
return (`String(${ref}.accountMode) === "customDomain"` +
|
|
37
|
+
` ? (${custom}.includes(".") && !/^[0-9.]+$/.test(${custom}) ? ${custom} : "")` +
|
|
38
|
+
` : (${domains}.includes(${domain}) && ${subdomain} !== "" ? ${subdomain} + "." + ${domain} : "")`);
|
|
39
|
+
}
|
|
40
|
+
function accountBaseUrl(credentials) {
|
|
41
|
+
var _a, _b, _c;
|
|
42
|
+
if (String((_a = credentials.accountMode) !== null && _a !== void 0 ? _a : '') === 'customDomain') {
|
|
43
|
+
const host = normaliseHostname(credentials.customDomain);
|
|
44
|
+
return host === '' ? '' : `https://${host}`;
|
|
45
|
+
}
|
|
46
|
+
const domain = String((_b = credentials.domain) !== null && _b !== void 0 ? _b : '');
|
|
47
|
+
if (!exports.ACCOUNT_DOMAINS.includes(domain))
|
|
48
|
+
return '';
|
|
49
|
+
const subdomain = String((_c = credentials.subdomain) !== null && _c !== void 0 ? _c : '')
|
|
50
|
+
.trim()
|
|
51
|
+
.toLowerCase()
|
|
52
|
+
.replace(SUBDOMAIN_ALLOWED, '');
|
|
53
|
+
return subdomain === '' ? '' : `https://${subdomain}.${domain}`;
|
|
54
|
+
}
|
|
55
|
+
exports.accountAddressProperties = [
|
|
56
|
+
{
|
|
57
|
+
displayName: 'Account Address',
|
|
58
|
+
name: 'accountMode',
|
|
59
|
+
type: 'options',
|
|
60
|
+
default: 'subdomain',
|
|
61
|
+
required: true,
|
|
62
|
+
options: [
|
|
63
|
+
{
|
|
64
|
+
name: 'GetCourse Subdomain',
|
|
65
|
+
value: 'subdomain',
|
|
66
|
+
description: 'Адрес вида myschool.getcourse.ru. The usual case.',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: 'Custom Domain',
|
|
70
|
+
value: 'customDomain',
|
|
71
|
+
description: 'Собственный домен школы. Needed when the account force-redirects its GetCourse address to a domain of its own — the API then answers only on that domain.',
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
description: 'How to reach the account. Pick Custom Domain only if the plain address redirects.',
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
displayName: 'Subdomain',
|
|
78
|
+
name: 'subdomain',
|
|
79
|
+
type: 'string',
|
|
80
|
+
default: '',
|
|
81
|
+
required: true,
|
|
82
|
+
placeholder: 'myschool',
|
|
83
|
+
displayOptions: { show: { accountMode: ['subdomain'] } },
|
|
84
|
+
description: 'Имя аккаунта. The part of the address in front of the domain — for myschool.getcourse.ru that is myschool. Only letters, digits and hyphens are kept.',
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
displayName: 'Domain',
|
|
88
|
+
name: 'domain',
|
|
89
|
+
type: 'options',
|
|
90
|
+
default: 'getcourse.ru',
|
|
91
|
+
required: true,
|
|
92
|
+
options: [
|
|
93
|
+
{ name: 'Getcourse.io', value: 'getcourse.io', description: 'Accounts outside Russia' },
|
|
94
|
+
{ name: 'Getcourse.ru', value: 'getcourse.ru', description: 'Russian accounts' },
|
|
95
|
+
],
|
|
96
|
+
displayOptions: { show: { accountMode: ['subdomain'] } },
|
|
97
|
+
description: 'Which GetCourse installation hosts the account. The list is closed on purpose: in this mode a credential cannot be aimed at another server.',
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
displayName: 'Custom Domain',
|
|
101
|
+
name: 'customDomain',
|
|
102
|
+
type: 'string',
|
|
103
|
+
default: '',
|
|
104
|
+
required: true,
|
|
105
|
+
placeholder: 'school.example.com',
|
|
106
|
+
displayOptions: { show: { accountMode: ['customDomain'] } },
|
|
107
|
+
description: 'Домен школы, без схемы и пути. This credential will send the account API key to that host, so make sure it is the school domain and nothing else.',
|
|
108
|
+
},
|
|
109
|
+
];
|
|
110
|
+
exports.pinnedHttpRequestDomains = {
|
|
111
|
+
displayName: 'Allowed HTTP Request Domains',
|
|
112
|
+
name: 'allowedHttpRequestDomains',
|
|
113
|
+
type: 'hidden',
|
|
114
|
+
default: 'none',
|
|
115
|
+
};
|
|
116
|
+
//# sourceMappingURL=accountAddress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accountAddress.js","sourceRoot":"","sources":["../../credentials/accountAddress.ts"],"names":[],"mappings":";;;AA8EA,sDA4BC;AAGD,wCAoBC;AAnHY,QAAA,eAAe,GAAG,CAAC,cAAc,EAAE,cAAc,CAAU,CAAC;AAGzE,MAAM,iBAAiB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
|
4
|
+
The navy disc measures 1.09:1 against n8n's dark canvas — the two are almost
|
|
5
|
+
the same lightness, so the silhouette disappears entirely. The ring carries
|
|
6
|
+
7.2:1 and restores the edge without touching the mark itself. Stroke 4 of 86
|
|
7
|
+
renders about 1px at the 24px the nodes panel uses, which is the point.
|
|
8
|
+
-->
|
|
9
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-3 -3 86 86" width="86" height="86" role="img" aria-label="GetCourse">
|
|
10
|
+
<title>GetCourse</title>
|
|
11
|
+
<circle cx="40" cy="40" r="40" fill="#013A4C"/>
|
|
12
|
+
<path fill="#FFFFFF" d="M34.9317 52.5387C32.7244 54.3974 30.1831 55.3268 27.3079 55.3268C25.3039 55.3268 23.3871 54.9783 21.5574 54.2812C19.7277 53.5552 18.1303 52.5096 16.7653 51.1446C15.4003 49.7796 14.3112 48.1096 13.498 46.1347C12.6848 44.1598 12.2782 41.909 12.2782 39.3822C12.2782 37.204 12.6848 35.1855 13.498 33.3268C14.3112 31.439 15.4293 29.8126 16.8524 28.4476C18.2755 27.0535 19.9455 25.9644 21.8623 25.1803C23.8082 24.367 25.8993 23.9604 28.1356 23.9604C29.5297 23.9604 30.8656 24.1202 32.1435 24.4397C33.4214 24.7301 34.5977 25.1803 35.6722 25.7902C36.7759 26.371 37.7633 27.0826 38.6346 27.9248C39.5059 28.738 40.2175 29.6674 40.7693 30.7129L34.4524 35.5486C33.8425 34.3288 32.9277 33.3558 31.7079 32.6298C30.4881 31.8746 29.1957 31.4971 27.8307 31.4971C26.8142 31.4971 25.8848 31.7004 25.0425 32.107C24.2003 32.5136 23.4742 33.0799 22.8643 33.806C22.2544 34.5321 21.7752 35.4034 21.4267 36.4199C21.0782 37.4073 20.9039 38.4964 20.9039 39.6872C20.9039 40.907 21.0782 42.0106 21.4267 42.9981C21.7752 43.9855 22.2544 44.8423 22.8643 45.5684C23.5033 46.2654 24.2584 46.8172 25.1297 47.2238C26.001 47.6014 26.9739 47.7902 28.0485 47.7902C30.5171 47.7902 32.6953 46.7736 34.5831 44.7406H29.2247V38.6416H41.9455V55.109H34.9317V52.5387Z"/>
|
|
13
|
+
<path fill="#35D3C9" d="M39.9647 39.3387C39.9647 37.4509 40.3132 35.5921 41.0103 33.7624C41.7363 31.9327 42.7819 30.2918 44.1469 28.8397C45.5119 27.3875 47.1673 26.2113 49.1132 25.3109C51.0591 24.4106 53.2809 23.9604 55.7786 23.9604C58.77 23.9604 61.3548 24.5849 63.533 25.8337C65.7403 27.0535 67.3812 28.6799 68.4558 30.7129L61.9647 35.3307C61.6743 34.5756 61.2822 33.9512 60.7885 33.4575C60.3238 32.9638 59.801 32.5717 59.2202 32.2812C58.6393 31.9908 58.0294 31.7875 57.3905 31.6713C56.7806 31.5552 56.1852 31.4971 55.6043 31.4971C54.3845 31.4971 53.3244 31.7439 52.4241 32.2377C51.5528 32.7024 50.8268 33.3268 50.2459 34.1109C49.6941 34.8661 49.273 35.7373 48.9825 36.7248C48.7211 37.6832 48.5904 38.6416 48.5904 39.6001C48.5904 40.6746 48.7502 41.7057 49.0697 42.6931C49.3891 43.6806 49.8538 44.5519 50.4637 45.307C51.0736 46.0621 51.8142 46.672 52.6855 47.1367C53.5858 47.5723 54.5878 47.7902 55.6914 47.7902C56.2723 47.7902 56.8677 47.7321 57.4776 47.6159C58.0875 47.4707 58.6683 47.2529 59.2202 46.9624C59.801 46.643 60.3093 46.2509 60.7449 45.7862C61.2096 45.2925 61.5726 44.6971 61.834 44.0001L68.7607 48.1387C68.2961 49.2713 67.5845 50.2878 66.6261 51.1882C65.6967 52.0885 64.6221 52.8436 63.4023 53.4535C62.2116 54.0634 60.9192 54.5281 59.5251 54.8476C58.1601 55.167 56.8241 55.3268 55.5172 55.3268C53.2228 55.3268 51.1172 54.8766 49.2004 53.9763C47.3126 53.0469 45.6716 51.8271 44.2776 50.3169C42.9126 48.8067 41.8525 47.0931 41.0974 45.1763C40.3423 43.2595 39.9647 41.3136 39.9647 39.3387Z"/>
|
|
14
|
+
<circle cx="40" cy="40" r="40" fill="none" stroke="#35D3C9" stroke-width="4"/>
|
|
15
|
+
</svg>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
The official GetCourse mark, used unmodified.
|
|
3
|
+
Light theme: the mark as the vendor draws it. Its navy disc carries 12.3:1
|
|
4
|
+
against a white canvas, so it needs no help.
|
|
5
|
+
-->
|
|
6
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-3 -3 86 86" width="86" height="86" role="img" aria-label="GetCourse">
|
|
7
|
+
<title>GetCourse</title>
|
|
8
|
+
<circle cx="40" cy="40" r="40" fill="#013A4C"/>
|
|
9
|
+
<path fill="#FFFFFF" d="M34.9317 52.5387C32.7244 54.3974 30.1831 55.3268 27.3079 55.3268C25.3039 55.3268 23.3871 54.9783 21.5574 54.2812C19.7277 53.5552 18.1303 52.5096 16.7653 51.1446C15.4003 49.7796 14.3112 48.1096 13.498 46.1347C12.6848 44.1598 12.2782 41.909 12.2782 39.3822C12.2782 37.204 12.6848 35.1855 13.498 33.3268C14.3112 31.439 15.4293 29.8126 16.8524 28.4476C18.2755 27.0535 19.9455 25.9644 21.8623 25.1803C23.8082 24.367 25.8993 23.9604 28.1356 23.9604C29.5297 23.9604 30.8656 24.1202 32.1435 24.4397C33.4214 24.7301 34.5977 25.1803 35.6722 25.7902C36.7759 26.371 37.7633 27.0826 38.6346 27.9248C39.5059 28.738 40.2175 29.6674 40.7693 30.7129L34.4524 35.5486C33.8425 34.3288 32.9277 33.3558 31.7079 32.6298C30.4881 31.8746 29.1957 31.4971 27.8307 31.4971C26.8142 31.4971 25.8848 31.7004 25.0425 32.107C24.2003 32.5136 23.4742 33.0799 22.8643 33.806C22.2544 34.5321 21.7752 35.4034 21.4267 36.4199C21.0782 37.4073 20.9039 38.4964 20.9039 39.6872C20.9039 40.907 21.0782 42.0106 21.4267 42.9981C21.7752 43.9855 22.2544 44.8423 22.8643 45.5684C23.5033 46.2654 24.2584 46.8172 25.1297 47.2238C26.001 47.6014 26.9739 47.7902 28.0485 47.7902C30.5171 47.7902 32.6953 46.7736 34.5831 44.7406H29.2247V38.6416H41.9455V55.109H34.9317V52.5387Z"/>
|
|
10
|
+
<path fill="#35D3C9" d="M39.9647 39.3387C39.9647 37.4509 40.3132 35.5921 41.0103 33.7624C41.7363 31.9327 42.7819 30.2918 44.1469 28.8397C45.5119 27.3875 47.1673 26.2113 49.1132 25.3109C51.0591 24.4106 53.2809 23.9604 55.7786 23.9604C58.77 23.9604 61.3548 24.5849 63.533 25.8337C65.7403 27.0535 67.3812 28.6799 68.4558 30.7129L61.9647 35.3307C61.6743 34.5756 61.2822 33.9512 60.7885 33.4575C60.3238 32.9638 59.801 32.5717 59.2202 32.2812C58.6393 31.9908 58.0294 31.7875 57.3905 31.6713C56.7806 31.5552 56.1852 31.4971 55.6043 31.4971C54.3845 31.4971 53.3244 31.7439 52.4241 32.2377C51.5528 32.7024 50.8268 33.3268 50.2459 34.1109C49.6941 34.8661 49.273 35.7373 48.9825 36.7248C48.7211 37.6832 48.5904 38.6416 48.5904 39.6001C48.5904 40.6746 48.7502 41.7057 49.0697 42.6931C49.3891 43.6806 49.8538 44.5519 50.4637 45.307C51.0736 46.0621 51.8142 46.672 52.6855 47.1367C53.5858 47.5723 54.5878 47.7902 55.6914 47.7902C56.2723 47.7902 56.8677 47.7321 57.4776 47.6159C58.0875 47.4707 58.6683 47.2529 59.2202 46.9624C59.801 46.643 60.3093 46.2509 60.7449 45.7862C61.2096 45.2925 61.5726 44.6971 61.834 44.0001L68.7607 48.1387C68.2961 49.2713 67.5845 50.2878 66.6261 51.1882C65.6967 52.0885 64.6221 52.8436 63.4023 53.4535C62.2116 54.0634 60.9192 54.5281 59.5251 54.8476C58.1601 55.167 56.8241 55.3268 55.5172 55.3268C53.2228 55.3268 51.1172 54.8766 49.2004 53.9763C47.3126 53.0469 45.6716 51.8271 44.2776 50.3169C42.9126 48.8067 41.8525 47.0931 41.0974 45.1763C40.3423 43.2595 39.9647 41.3136 39.9647 39.3387Z"/>
|
|
11
|
+
</svg>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
import { loadOptions } from './v1/methods';
|
|
3
|
+
export declare class GetCourse implements INodeType {
|
|
4
|
+
description: INodeTypeDescription;
|
|
5
|
+
methods: {
|
|
6
|
+
loadOptions: typeof loadOptions;
|
|
7
|
+
};
|
|
8
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetCourse = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const router_1 = require("../../utils/router");
|
|
6
|
+
const actions_1 = require("./v1/actions");
|
|
7
|
+
const methods_1 = require("./v1/methods");
|
|
8
|
+
class GetCourse {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.description = {
|
|
11
|
+
displayName: 'GetCourse',
|
|
12
|
+
name: 'getCourse',
|
|
13
|
+
icon: {
|
|
14
|
+
light: 'file:../../icons/getcourse.svg',
|
|
15
|
+
dark: 'file:../../icons/getcourse.dark.svg',
|
|
16
|
+
},
|
|
17
|
+
group: ['transform'],
|
|
18
|
+
version: 1,
|
|
19
|
+
subtitle: '={{ $parameter["operation"] + ": " + $parameter["resource"] }}',
|
|
20
|
+
description: 'Read and update users, orders, offers, dialogs, lessons and webinars in a GetCourse account through the Tech API',
|
|
21
|
+
defaults: { name: 'GetCourse' },
|
|
22
|
+
usableAsTool: true,
|
|
23
|
+
builderHint: {
|
|
24
|
+
searchHint: "GetCourse has two unrelated APIs and this node is the newer one, the Tech API. It can READ and UPDATE a user, an order, an offer, a dialog, a HelpDesk ticket, a lesson answer or a webinar, one at a time — it cannot CREATE anything and cannot list users or orders in bulk, because the API has no method for either. Creating a user or an order, and any bulk read, is the GetCourse Legacy node. Most user operations take one of three identifiers — the numeric ID if you have it, otherwise the e-mail, otherwise the phone — and the node asks which one you mean rather than letting you send two. Custom fields are read by name and written by numeric ID, and no method in this API lists those IDs: the Legacy node's Custom Field resource is where they come from. Authentication needs two keys glued with an underscore, a developer key GetCourse issues to integrators and a school key the school itself hands out.",
|
|
25
|
+
relatedNodes: [
|
|
26
|
+
{
|
|
27
|
+
nodeType: 'n8n-nodes-getcourse.getCourseLegacy',
|
|
28
|
+
relationHint: 'Creates users and orders, exports them in bulk, and lists the custom-field dictionary this node cannot',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
nodeType: 'n8n-nodes-getcourse.getCourseTrigger',
|
|
32
|
+
relationHint: 'Starts the workflow when GetCourse reports an event',
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
37
|
+
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
38
|
+
credentials: [{ name: 'getCourseTechApi', required: true }],
|
|
39
|
+
properties: [actions_1.resourceProperty, ...actions_1.resourceProperties],
|
|
40
|
+
};
|
|
41
|
+
this.methods = { loadOptions: methods_1.loadOptions };
|
|
42
|
+
}
|
|
43
|
+
async execute() {
|
|
44
|
+
return await router_1.routeItems.call(this, actions_1.resources);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.GetCourse = GetCourse;
|
|
48
|
+
//# sourceMappingURL=GetCourse.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetCourse.node.js","sourceRoot":"","sources":["../../../nodes/GetCourse/GetCourse.node.ts"],"names":[],"mappings":";;;AAMA,+CAAmD;AAEnD,+CAAgD;AAChD,0CAA+E;AAC/E,0CAA2C;AAE3C,MAAa,SAAS;IAAtB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,WAAW;YACxB,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE;gBACL,KAAK,EAAE,gCAAgC;gBACvC,IAAI,EAAE,qCAAqC;aAC3C;YACD,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,gEAAgE;YAC1E,WAAW,EACV,kHAAkH;YACnH,QAAQ,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;YAC/B,YAAY,EAAE,IAAI;YAKlB,WAAW,EAAE;gBACZ,UAAU,EACT,44BAA44B;gBAC74B,YAAY,EAAE;oBACb;wBACC,QAAQ,EAAE,qCAAqC;wBAC/C,YAAY,EACX,wGAAwG;qBACzG;oBACD;wBACC,QAAQ,EAAE,sCAAsC;wBAChD,YAAY,EAAE,qDAAqD;qBACnE;iBACD;aACD;YACD,MAAM,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YAClC,OAAO,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YACnC,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YAC3D,UAAU,EAAE,CAAC,0BAAgB,EAAE,GAAG,4BAAkB,CAAC;SACrD,CAAC;QAEF,YAAO,GAAG,EAAE,WAAW,EAAX,qBAAW,EAAE,CAAC;IAK3B,CAAC;IAHA,KAAK,CAAC,OAAO;QACZ,OAAO,MAAM,mBAAU,CAAC,IAAI,CAAC,IAAI,EAAE,mBAAS,CAAC,CAAC;IAC/C,CAAC;CACD;AA7CD,8BA6CC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node": "n8n-nodes-getcourse.getCourse",
|
|
3
|
+
"nodeVersion": "1.0",
|
|
4
|
+
"codexVersion": "1.0",
|
|
5
|
+
"categories": ["Sales", "Marketing & Content", "Communication"],
|
|
6
|
+
"resources": {
|
|
7
|
+
"credentialDocumentation": [
|
|
8
|
+
{
|
|
9
|
+
"url": "https://github.com/zenland-dev/n8n-nodes-getcourse?tab=readme-ov-file#credentials"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"primaryDocumentation": [
|
|
13
|
+
{
|
|
14
|
+
"url": "https://github.com/zenland-dev/n8n-nodes-getcourse?tab=readme-ov-file"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"alias": [
|
|
19
|
+
"GetCourse",
|
|
20
|
+
"Геткурс",
|
|
21
|
+
"LMS",
|
|
22
|
+
"Tech API",
|
|
23
|
+
"User",
|
|
24
|
+
"Пользователь",
|
|
25
|
+
"Order",
|
|
26
|
+
"Заказ",
|
|
27
|
+
"Offer",
|
|
28
|
+
"Предложение",
|
|
29
|
+
"Training",
|
|
30
|
+
"Тренинг",
|
|
31
|
+
"Webinar",
|
|
32
|
+
"Вебинар",
|
|
33
|
+
"HelpDesk",
|
|
34
|
+
"Dialog",
|
|
35
|
+
"Диалог",
|
|
36
|
+
"Lesson",
|
|
37
|
+
"Урок",
|
|
38
|
+
"Course"
|
|
39
|
+
]
|
|
40
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.description = void 0;
|
|
4
|
+
exports.execute = execute;
|
|
5
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
6
|
+
const request_1 = require("../../helpers/request");
|
|
7
|
+
const router_1 = require("../../../../../utils/router");
|
|
8
|
+
const transport_1 = require("../../transport");
|
|
9
|
+
const showFor = (operations) => ({
|
|
10
|
+
show: { resource: ['call'], operation: operations },
|
|
11
|
+
});
|
|
12
|
+
exports.description = [
|
|
13
|
+
{
|
|
14
|
+
displayName: 'Operation',
|
|
15
|
+
name: 'operation',
|
|
16
|
+
type: 'options',
|
|
17
|
+
noDataExpression: true,
|
|
18
|
+
default: 'addComment',
|
|
19
|
+
displayOptions: { show: { resource: ['call'] } },
|
|
20
|
+
options: [
|
|
21
|
+
{
|
|
22
|
+
name: 'Set Description (Overwrites)',
|
|
23
|
+
value: 'addComment',
|
|
24
|
+
action: 'Set the description of a call',
|
|
25
|
+
description: "Повторный вызов перезаписывает значение — this replaces the call's «Описание» field outright and never appends to it. GetCourse calls the method «Добавить комментарий к звонку», which reads as though it added one.",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'Set Transcription (Overwrites)',
|
|
29
|
+
value: 'addTranscription',
|
|
30
|
+
action: 'Set the transcription of a call',
|
|
31
|
+
description: "Повторный вызов перезаписывает значение — this replaces the call's «Транскрибация» field outright and never appends to it. A transcript sent in pieces therefore ends up as its last piece.",
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
displayName: "Повторный вызов перезаписывает значение. Whatever stands in the call's «Описание» — including anything a manager typed there — is replaced by the text below, and the only way to read the old value first is Get Calls on the Order resource. Do not put this operation in a loop that means to append.",
|
|
37
|
+
name: 'setDescriptionNotice',
|
|
38
|
+
type: 'notice',
|
|
39
|
+
default: '',
|
|
40
|
+
displayOptions: showFor(['addComment']),
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
displayName: "Повторный вызов перезаписывает значение. The call's «Транскрибация» is replaced by the text below, so a transcript assembled from several chunks has to be joined into one value before it is sent, not sent chunk by chunk.",
|
|
44
|
+
name: 'setTranscriptionNotice',
|
|
45
|
+
type: 'notice',
|
|
46
|
+
default: '',
|
|
47
|
+
displayOptions: showFor(['addTranscription']),
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
displayName: 'Call ID',
|
|
51
|
+
name: 'callId',
|
|
52
|
+
type: 'string',
|
|
53
|
+
default: '',
|
|
54
|
+
required: true,
|
|
55
|
+
displayOptions: showFor(['addComment', 'addTranscription']),
|
|
56
|
+
description: 'ID звонка. Nothing in the API lists calls: the ID comes from Get Calls on the Order resource, or from a call event delivered to the GetCourse Trigger node, event_object_id 8. The documentation never says whether it means the activity ID or the nested phone call ID — the activity is what carries «Описание» and «Транскрибация», so that is the one to send.',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
displayName: 'Text',
|
|
60
|
+
name: 'text',
|
|
61
|
+
type: 'string',
|
|
62
|
+
typeOptions: { rows: 4 },
|
|
63
|
+
default: '',
|
|
64
|
+
required: true,
|
|
65
|
+
displayOptions: showFor(['addComment', 'addTranscription']),
|
|
66
|
+
description: 'Текст, который заменит содержимое поля — «Описание» or «Транскрибация», depending on the operation. A blank value is refused here rather than sent, because the field would be emptied rather than left alone.',
|
|
67
|
+
},
|
|
68
|
+
];
|
|
69
|
+
const TARGETS = {
|
|
70
|
+
addComment: { endpoint: '/call/add-comment', field: 'description' },
|
|
71
|
+
addTranscription: { endpoint: '/call/add-transcription', field: 'transcription' },
|
|
72
|
+
};
|
|
73
|
+
async function execute(operation, itemIndex) {
|
|
74
|
+
var _a, _b;
|
|
75
|
+
const target = TARGETS[operation];
|
|
76
|
+
if (target === undefined)
|
|
77
|
+
throw router_1.unknownOperation.call(this, 'call', operation, itemIndex);
|
|
78
|
+
const rawCallId = String((_a = this.getNodeParameter('callId', itemIndex, '')) !== null && _a !== void 0 ? _a : '').trim();
|
|
79
|
+
if (rawCallId === '') {
|
|
80
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'No call named', {
|
|
81
|
+
description: 'Give the numeric call ID — Get Calls on the Order resource is where it comes from.',
|
|
82
|
+
itemIndex,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
const text = String((_b = this.getNodeParameter('text', itemIndex, '')) !== null && _b !== void 0 ? _b : '');
|
|
86
|
+
if (text.trim() === '') {
|
|
87
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'No text to write', {
|
|
88
|
+
description: `Fill in Text — an empty value would clear the call's ${target.field} instead of leaving it as it is.`,
|
|
89
|
+
itemIndex,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
const callId = Number(rawCallId);
|
|
93
|
+
const data = await transport_1.techApiRequest.call(this, 'POST', target.endpoint, { callId, text });
|
|
94
|
+
return (0, request_1.toItems)(data, { result: true }).map((row) => ({
|
|
95
|
+
json: { callId, field: target.field, ...row },
|
|
96
|
+
}));
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../nodes/GetCourse/v1/actions/call/index.ts"],"names":[],"mappings":";;;AA8FA,0BAyCC;AAtID,+CAAkD;AAElD,mDAAgD;AAChD,wDAA+D;AAC/D,+CAAiD;AAEjD,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;AAeU,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,OAAO,EAAE,YAAY;QACrB,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE;QAChD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,8BAA8B;gBACpC,KAAK,EAAE,YAAY;gBACnB,MAAM,EAAE,+BAA+B;gBACvC,WAAW,EACV,uNAAuN;aACxN;YACD;gBACC,IAAI,EAAE,gCAAgC;gBACtC,KAAK,EAAE,kBAAkB;gBACzB,MAAM,EAAE,iCAAiC;gBACzC,WAAW,EACV,6LAA6L;aAC9L;SACD;KACD;IACD;QACC,WAAW,EACV,0SAA0S;QAC3S,IAAI,EAAE,sBAAsB;QAC5B,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE,OAAO,CAAC,CAAC,YAAY,CAAC,CAAC;KACvC;IACD;QACC,WAAW,EACV,8NAA8N;QAC/N,IAA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,EAAE,EAAE,CAAC;QACtB,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,eAAe,EAAE;YAC7D,WAAW,EACV,oFAAoF;YACrF,SAAS;SACT,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,IAAI,GAAG,MAAM,CAAC,MAAA,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE,CAAC,mCAAI,EAAE,CAAC,CAAC;IAMxE,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACxB,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,kBAAkB,EAAE;YAChE,WAAW,EAAE,wDAAwD,MAAM,CAAC,KAAK,kCAAkC;YACnH,SAAS;SACT,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;IAEjC,MAAM,IAAI,GAAG,MAAM,0BAAc,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IAKxF,OAAO,IAAA,iBAAO,EAAC,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QACpD,IAAI,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,GAAG,GAAG,EAAE;KAC7C,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.description = void 0;
|
|
4
|
+
const common_1 = require("../../descriptions/common");
|
|
5
|
+
const showFor = (operations) => ({
|
|
6
|
+
show: { resource: ['deal'], operation: operations },
|
|
7
|
+
});
|
|
8
|
+
const NEEDS_ORDER = [
|
|
9
|
+
'addComment',
|
|
10
|
+
'addPositions',
|
|
11
|
+
'get',
|
|
12
|
+
'getCalls',
|
|
13
|
+
'getComments',
|
|
14
|
+
'getCustomFields',
|
|
15
|
+
'removePositions',
|
|
16
|
+
'update',
|
|
17
|
+
'updateCustomFields',
|
|
18
|
+
];
|
|
19
|
+
const operation = {
|
|
20
|
+
displayName: 'Operation',
|
|
21
|
+
name: 'operation',
|
|
22
|
+
type: 'options',
|
|
23
|
+
noDataExpression: true,
|
|
24
|
+
default: 'get',
|
|
25
|
+
displayOptions: { show: { resource: ['deal'] } },
|
|
26
|
+
options: [
|
|
27
|
+
{
|
|
28
|
+
name: 'Add Comment',
|
|
29
|
+
value: 'addComment',
|
|
30
|
+
action: 'Add a comment to an order',
|
|
31
|
+
description: "Добавить комментарий в заказ от имени выбранного пользователя. The comment is appended to the order's activity log; nothing already written there is touched.",
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'Add Positions',
|
|
35
|
+
value: 'addPositions',
|
|
36
|
+
action: 'Add positions to an order',
|
|
37
|
+
description: 'Добавить позиции в заказ — one row per offer, each with its own price and quantity',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'Get',
|
|
41
|
+
value: 'get',
|
|
42
|
+
action: 'Get an order',
|
|
43
|
+
description: 'Информация по заказу — every field of the order plus the tags hanging on it',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: 'Get Calls',
|
|
47
|
+
value: 'getCalls',
|
|
48
|
+
action: 'Get the calls of an order',
|
|
49
|
+
description: 'Звонки по заказу. Each record carries its transcription in a comment field, which is empty on an account that does not transcribe.',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: 'Get Cancel Reasons',
|
|
53
|
+
value: 'getCancelReasons',
|
|
54
|
+
action: 'Get many cancellation reasons',
|
|
55
|
+
description: 'Справочник причин отказа аккаунта. Takes no parameters, and supplies the IDs that Update sends with a cancellation.',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: 'Get Comments',
|
|
59
|
+
value: 'getComments',
|
|
60
|
+
action: 'Get the comments of an order',
|
|
61
|
+
description: 'Комментарии заказа — the activity log GetCourse keeps against the order',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: 'Get Custom Fields',
|
|
65
|
+
value: 'getCustomFields',
|
|
66
|
+
action: 'Get the custom fields of an order',
|
|
67
|
+
description: 'Дополнительные поля заказа. The reply names each field but carries no field ID, and the ID is exactly what Update Custom Fields needs — the two ends do not join up.',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'Get Many Tags',
|
|
71
|
+
value: 'getManyTags',
|
|
72
|
+
action: 'Get many orders with their tags',
|
|
73
|
+
description: 'Список заказов и их тегов. The one endpoint in the Tech API that lists orders at all, and it answers with nothing but an ID and tag names.',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: 'Remove Positions',
|
|
77
|
+
value: 'removePositions',
|
|
78
|
+
action: 'Remove positions from an order',
|
|
79
|
+
description: "Удалить позиции из заказа. Positions are named by their own IDs, which Get returns in the order's positions array — an offer ID will not do.",
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: 'Update',
|
|
83
|
+
value: 'update',
|
|
84
|
+
action: 'Update an order',
|
|
85
|
+
description: 'Обновить поля заказа: менеджера, статус, причину отказа и теги. Unlike the user updater, this one answers with the order itself.',
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: 'Update Custom Fields',
|
|
89
|
+
value: 'updateCustomFields',
|
|
90
|
+
action: 'Update the custom fields of an order',
|
|
91
|
+
description: 'Изменить дополнительные поля заказа, addressed by numeric field ID rather than by name',
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
};
|
|
95
|
+
const tagsPagingNotice = {
|
|
96
|
+
displayName: 'У этого эндпоинта нет ни фильтров, ни счётчика — он отдаёт заказы аккаунта подряд. The node walks it 100 rows at a time and stops at the first short page, so Return All on a busy account is a long run of requests.',
|
|
97
|
+
name: 'dealTagsPagingNotice',
|
|
98
|
+
type: 'notice',
|
|
99
|
+
default: '',
|
|
100
|
+
displayOptions: showFor(['getManyTags']),
|
|
101
|
+
};
|
|
102
|
+
const cancelNotice = {
|
|
103
|
+
displayName: 'Поля причины отказа появляются в списке, когда выбран статус Cancelled. GetCourse documents the reason as the companion of a cancellation, so an order that is already cancelled needs the status sent again alongside the reason.',
|
|
104
|
+
name: 'dealCancelNotice',
|
|
105
|
+
type: 'notice',
|
|
106
|
+
default: '',
|
|
107
|
+
displayOptions: showFor(['update']),
|
|
108
|
+
};
|
|
109
|
+
const updateFields = {
|
|
110
|
+
displayName: 'Update Fields',
|
|
111
|
+
name: 'updateFields',
|
|
112
|
+
type: 'collection',
|
|
113
|
+
placeholder: 'Add Field',
|
|
114
|
+
default: {},
|
|
115
|
+
displayOptions: showFor(['update']),
|
|
116
|
+
options: [
|
|
117
|
+
{
|
|
118
|
+
displayName: 'Cancellation Reason Comment',
|
|
119
|
+
name: 'cancel_reason_comment',
|
|
120
|
+
type: 'string',
|
|
121
|
+
default: '',
|
|
122
|
+
displayOptions: { show: { status: ['cancelled'] } },
|
|
123
|
+
description: 'Описание причины отказа, свободный текст. GetCourse declares this field an integer while describing it as a description, and the same field is a string when the order is read back, so the node sends text.',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
displayName: 'Cancellation Reason Name or ID',
|
|
127
|
+
name: 'cancel_reason_id',
|
|
128
|
+
type: 'options',
|
|
129
|
+
typeOptions: { loadOptionsMethod: 'getCancelReasons' },
|
|
130
|
+
default: '',
|
|
131
|
+
displayOptions: { show: { status: ['cancelled'] } },
|
|
132
|
+
description: 'Причина отказа из справочника аккаунта. The documented request body omits this field, but a live account accepts it and stores it on the order, so sending it works. It is not validated against the account\'s own list of reasons: an ID that matches nothing is stored just as readily, and the order ends up cancelled for a reason nobody can read. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
displayName: 'Manager Name or ID',
|
|
136
|
+
name: 'manager_user_id',
|
|
137
|
+
type: 'options',
|
|
138
|
+
typeOptions: { loadOptionsMethod: 'getManagers' },
|
|
139
|
+
default: '',
|
|
140
|
+
description: 'Ответственный менеджер заказа. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
displayName: 'Status',
|
|
144
|
+
name: 'status',
|
|
145
|
+
type: 'options',
|
|
146
|
+
default: 'new',
|
|
147
|
+
options: [
|
|
148
|
+
{
|
|
149
|
+
name: 'Cancelled (Отменен)',
|
|
150
|
+
value: 'cancelled',
|
|
151
|
+
description: 'Отказ клиента — the status the two cancellation fields belong to',
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
name: 'False (Ложный)',
|
|
155
|
+
value: 'false',
|
|
156
|
+
description: 'Ложный заказ — the value travels as the string false and never as a boolean',
|
|
157
|
+
},
|
|
158
|
+
{ name: 'In Progress (В работе)', value: 'in_work' },
|
|
159
|
+
{ name: 'New (Новый)', value: 'new' },
|
|
160
|
+
{ name: 'Not Confirmed (Не подтвержден)', value: 'not_confirmed' },
|
|
161
|
+
{ name: 'Paid (Оплачен)', value: 'payed' },
|
|
162
|
+
{ name: 'Partly Paid (Частично оплачен)', value: 'part_payed' },
|
|
163
|
+
{ name: 'Waiting for Payment (Ожидаем оплаты)', value: 'payment_waiting' },
|
|
164
|
+
{ name: 'Waiting for Refund (Ожидаем возврата)', value: 'waiting_for_return' },
|
|
165
|
+
],
|
|
166
|
+
description: 'Статус заказа. Moving an order to a paid status here changes the status and nothing else — it registers no payment, unlike the legacy order import.',
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
displayName: 'Tags',
|
|
170
|
+
name: 'tags',
|
|
171
|
+
type: 'string',
|
|
172
|
+
default: '',
|
|
173
|
+
placeholder: 'VIP, повтор',
|
|
174
|
+
description: "Теги заказа, comma-separated. This list REPLACES the order's tags rather than adding to them — tested on a live account, where setting one tag and then another left only the second — so include the tags you want to keep. GetCourse does clear the list when sent an empty one, but this field cannot do that: a blank value means «leave the tags alone», which is what an unfilled optional field has to mean.",
|
|
175
|
+
},
|
|
176
|
+
],
|
|
177
|
+
};
|
|
178
|
+
const positions = {
|
|
179
|
+
displayName: 'Positions',
|
|
180
|
+
name: 'positionsUi',
|
|
181
|
+
type: 'fixedCollection',
|
|
182
|
+
typeOptions: { multipleValues: true },
|
|
183
|
+
placeholder: 'Add Position',
|
|
184
|
+
default: {},
|
|
185
|
+
displayOptions: showFor(['addPositions']),
|
|
186
|
+
description: 'Позиции, добавляемые в заказ — одна строка на предложение. Adding positions leaves the ones already on the order alone; Remove Positions is what takes one away.',
|
|
187
|
+
options: [
|
|
188
|
+
{
|
|
189
|
+
name: 'position',
|
|
190
|
+
displayName: 'Position',
|
|
191
|
+
values: [
|
|
192
|
+
{
|
|
193
|
+
displayName: 'Offer Name or ID',
|
|
194
|
+
name: 'offerId',
|
|
195
|
+
type: 'options',
|
|
196
|
+
typeOptions: { loadOptionsMethod: 'getOffers' },
|
|
197
|
+
default: '',
|
|
198
|
+
required: true,
|
|
199
|
+
description: 'Предложение, которое добавляется в заказ. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
displayName: 'Price',
|
|
203
|
+
name: 'price',
|
|
204
|
+
type: 'string',
|
|
205
|
+
default: '',
|
|
206
|
+
placeholder: '100',
|
|
207
|
+
description: "Цена позиции за единицу. Leave it empty to send no price at all, exactly as the platform's own example does for one of its two positions.",
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
displayName: 'Quantity',
|
|
211
|
+
name: 'quantity',
|
|
212
|
+
type: 'number',
|
|
213
|
+
typeOptions: { minValue: 1 },
|
|
214
|
+
default: 1,
|
|
215
|
+
description: 'Количество единиц в позиции',
|
|
216
|
+
},
|
|
217
|
+
],
|
|
218
|
+
},
|
|
219
|
+
],
|
|
220
|
+
};
|
|
221
|
+
exports.description = [
|
|
222
|
+
operation,
|
|
223
|
+
tagsPagingNotice,
|
|
224
|
+
(0, common_1.dealIdProperty)('deal', NEEDS_ORDER, 'ID заказа в GetCourse — Get Many Tags lists them, and so does the order export in the GetCourse Legacy node'),
|
|
225
|
+
...(0, common_1.returnAllProperties)(showFor(['getManyTags'])),
|
|
226
|
+
cancelNotice,
|
|
227
|
+
updateFields,
|
|
228
|
+
(0, common_1.customFieldsProperty)('deal', ['updateCustomFields']),
|
|
229
|
+
positions,
|
|
230
|
+
{
|
|
231
|
+
displayName: 'Position IDs',
|
|
232
|
+
name: 'positionIds',
|
|
233
|
+
type: 'string',
|
|
234
|
+
default: '',
|
|
235
|
+
required: true,
|
|
236
|
+
placeholder: '47, 48',
|
|
237
|
+
displayOptions: showFor(['removePositions']),
|
|
238
|
+
description: "ID позиций заказа, comma-separated. These are the IDs of the positions themselves, which Get returns in the order's positions array — the offer ID is a different number.",
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
displayName: 'Author Name or ID',
|
|
242
|
+
name: 'authorId',
|
|
243
|
+
type: 'options',
|
|
244
|
+
typeOptions: { loadOptionsMethod: 'getManagers' },
|
|
245
|
+
default: '',
|
|
246
|
+
required: true,
|
|
247
|
+
displayOptions: showFor(['addComment']),
|
|
248
|
+
description: 'От чьего имени пишется комментарий. The list holds the account\'s managers, because that is who normally writes into an order, but the API accepts any user ID. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
displayName: 'Comment',
|
|
252
|
+
name: 'text',
|
|
253
|
+
type: 'string',
|
|
254
|
+
typeOptions: { rows: 3 },
|
|
255
|
+
default: '',
|
|
256
|
+
required: true,
|
|
257
|
+
displayOptions: showFor(['addComment']),
|
|
258
|
+
description: 'Текст комментария, каким его увидит менеджер в карточке заказа',
|
|
259
|
+
},
|
|
260
|
+
];
|
|
261
|
+
//# sourceMappingURL=description.js.map
|