n8n-nodes-questionstar 0.1.4

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 (70) hide show
  1. package/README.md +104 -0
  2. package/dist/credentials/QuestionstarDevOAuth2Api.credentials.d.ts +9 -0
  3. package/dist/credentials/QuestionstarDevOAuth2Api.credentials.js +37 -0
  4. package/dist/credentials/QuestionstarDevOAuth2Api.credentials.js.map +1 -0
  5. package/dist/credentials/QuestionstarEnOAuth2Api.credentials.d.ts +9 -0
  6. package/dist/credentials/QuestionstarEnOAuth2Api.credentials.js +37 -0
  7. package/dist/credentials/QuestionstarEnOAuth2Api.credentials.js.map +1 -0
  8. package/dist/credentials/QuestionstarOAuth2Api.credentials.d.ts +9 -0
  9. package/dist/credentials/QuestionstarOAuth2Api.credentials.js +37 -0
  10. package/dist/credentials/QuestionstarOAuth2Api.credentials.js.map +1 -0
  11. package/dist/credentials/QuestionstarRuOAuth2Api.credentials.d.ts +9 -0
  12. package/dist/credentials/QuestionstarRuOAuth2Api.credentials.js +37 -0
  13. package/dist/credentials/QuestionstarRuOAuth2Api.credentials.js.map +1 -0
  14. package/dist/descriptions/AnswersAsTextDescription.d.ts +2 -0
  15. package/dist/descriptions/AnswersAsTextDescription.js +13 -0
  16. package/dist/descriptions/AnswersAsTextDescription.js.map +1 -0
  17. package/dist/descriptions/AuthenticationDescription.d.ts +2 -0
  18. package/dist/descriptions/AuthenticationDescription.js +17 -0
  19. package/dist/descriptions/AuthenticationDescription.js.map +1 -0
  20. package/dist/descriptions/CredentialDescription.d.ts +2 -0
  21. package/dist/descriptions/CredentialDescription.js +49 -0
  22. package/dist/descriptions/CredentialDescription.js.map +1 -0
  23. package/dist/descriptions/SurveyDescription.d.ts +2 -0
  24. package/dist/descriptions/SurveyDescription.js +17 -0
  25. package/dist/descriptions/SurveyDescription.js.map +1 -0
  26. package/dist/descriptions/SurveyFieldsDescription.d.ts +2 -0
  27. package/dist/descriptions/SurveyFieldsDescription.js +17 -0
  28. package/dist/descriptions/SurveyFieldsDescription.js.map +1 -0
  29. package/dist/descriptions/UseCustomIDDescription.d.ts +2 -0
  30. package/dist/descriptions/UseCustomIDDescription.js +13 -0
  31. package/dist/descriptions/UseCustomIDDescription.js.map +1 -0
  32. package/dist/descriptions/index.d.ts +6 -0
  33. package/dist/descriptions/index.js +23 -0
  34. package/dist/descriptions/index.js.map +1 -0
  35. package/dist/helpers/GenericFunctions.d.ts +2 -0
  36. package/dist/helpers/GenericFunctions.js +32 -0
  37. package/dist/helpers/GenericFunctions.js.map +1 -0
  38. package/dist/helpers/GetSurveyFields.d.ts +5 -0
  39. package/dist/helpers/GetSurveyFields.js +15 -0
  40. package/dist/helpers/GetSurveyFields.js.map +1 -0
  41. package/dist/helpers/GetSurveys.d.ts +5 -0
  42. package/dist/helpers/GetSurveys.js +14 -0
  43. package/dist/helpers/GetSurveys.js.map +1 -0
  44. package/dist/helpers/index.d.ts +3 -0
  45. package/dist/helpers/index.js +20 -0
  46. package/dist/helpers/index.js.map +1 -0
  47. package/dist/icons/questionstar.svg +65 -0
  48. package/dist/models/CaseItem.d.ts +6 -0
  49. package/dist/models/CaseItem.js +3 -0
  50. package/dist/models/CaseItem.js.map +1 -0
  51. package/dist/models/SurveyField.d.ts +5 -0
  52. package/dist/models/SurveyField.js +3 -0
  53. package/dist/models/SurveyField.js.map +1 -0
  54. package/dist/models/SurveyItem.d.ts +6 -0
  55. package/dist/models/SurveyItem.js +3 -0
  56. package/dist/models/SurveyItem.js.map +1 -0
  57. package/dist/models/index.d.ts +3 -0
  58. package/dist/models/index.js +20 -0
  59. package/dist/models/index.js.map +1 -0
  60. package/dist/nodes/QuestionStarAction/QuestionStarAction.node.d.ts +17 -0
  61. package/dist/nodes/QuestionStarAction/QuestionStarAction.node.js +80 -0
  62. package/dist/nodes/QuestionStarAction/QuestionStarAction.node.js.map +1 -0
  63. package/dist/nodes/QuestionStarAction/QuestionStarAction.node.json +25 -0
  64. package/dist/nodes/QuestionStarTrigger/QuestionStarTrigger.node.d.ts +24 -0
  65. package/dist/nodes/QuestionStarTrigger/QuestionStarTrigger.node.js +143 -0
  66. package/dist/nodes/QuestionStarTrigger/QuestionStarTrigger.node.js.map +1 -0
  67. package/dist/nodes/QuestionStarTrigger/QuestionStarTrigger.node.json +25 -0
  68. package/dist/package.json +53 -0
  69. package/dist/tsconfig.tsbuildinfo +1 -0
  70. package/package.json +53 -0
package/README.md ADDED
@@ -0,0 +1,104 @@
1
+ # n8n-nodes-questionstar
2
+
3
+ Official n8n community nodes for integrating **Questionstar** online surveys and questionnaires via OAuth2 API.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/n8n-nodes-questionstar)](https://www.npmjs.com/package/n8n-nodes-questionstar)
6
+
7
+ ---
8
+
9
+ ## Features
10
+
11
+ - Trigger node for survey completion events
12
+ - Action node for retrieving full survey data
13
+ - OAuth2 authentication with Questionstar API
14
+ - Fully compatible with n8n workflows
15
+
16
+ ---
17
+
18
+ ## Installation
19
+
20
+ You can install the package via npm, n8n CLI, or directly through the n8n interface.
21
+
22
+ ### 1. Install via npm
23
+
24
+ ```bash
25
+ npm install @n8n-nodes-questionstar
26
+ ```
27
+
28
+ > Requires **n8n >= 2.x**
29
+
30
+ ### 2. Install via n8n CLI
31
+
32
+ ```bash
33
+ n8n install @n8n-nodes-questionstar
34
+ ```
35
+
36
+ ### 3. Install via n8n interface (UI)
37
+
38
+ 1. Open your n8n instance in a browser.
39
+ 2. Go to **Settings → Nodes**.
40
+ 3. Click **Install Nodes**.
41
+ 4. Enter `n8n-nodes-questionstar` and click **Install**.
42
+ 5. Restart n8n if required.
43
+
44
+ ### 4. Install manually
45
+
46
+ 1. Download the package from npm or GitHub.
47
+ 2. Copy the `dist` folder into your n8n custom nodes directory (usually `~/.n8n/custom`).
48
+ 3. Restart n8n. The nodes will appear in your instance.
49
+
50
+ ---
51
+
52
+ ## Credentials Setup
53
+
54
+ Before using the nodes, configure OAuth2 credentials in n8n:
55
+
56
+ 1. Go to **Credentials** in n8n.
57
+ 2. Click **New Credential** → `Questionstar OAuth2 API`.
58
+ 3. Save the credentials.
59
+
60
+ You can create multiple credentials for different environments (Dev, RU, EN).
61
+
62
+ ---
63
+
64
+ ## Nodes
65
+
66
+ ### QuestionStarTrigger
67
+
68
+ **Purpose:** Accepts survey completion events.
69
+
70
+ **Fields:**
71
+
72
+ | Field Name | Type | Description |
73
+ |------------|--------|-----------------------------------------|
74
+ | Survey ID | string | Select the survey to monitor events for |
75
+
76
+ **Example Usage:**
77
+
78
+ ```
79
+ [QuestionStarTrigger] → [Action Node or other workflow nodes]
80
+ ```
81
+
82
+ ---
83
+
84
+ ### QuestionStarAction
85
+
86
+ **Purpose:** Retrieves full survey data.
87
+
88
+ **Fields:**
89
+
90
+ | Field Name | Type | Description |
91
+ |------------|--------|--------------------------------------------------|
92
+ | Survey ID | string | Survey to update (optional for creation) |
93
+
94
+ **Example Usage:**
95
+
96
+ ```
97
+ [QuestionStarTrigger] → [QuestionStarAction: Update Survey] → [Other workflow nodes]
98
+ ```
99
+
100
+ ---
101
+
102
+ ## Support
103
+
104
+ For any questions, contact **support@questionstar.com**.
@@ -0,0 +1,9 @@
1
+ import { ICredentialType, INodeProperties, Icon } from 'n8n-workflow';
2
+ export declare class QuestionstarDevOAuth2Api implements ICredentialType {
3
+ name: string;
4
+ extends: string[];
5
+ displayName: string;
6
+ documentationUrl: string;
7
+ icon: Icon;
8
+ properties: INodeProperties[];
9
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.QuestionstarDevOAuth2Api = void 0;
4
+ const descriptions_1 = require("../descriptions");
5
+ class QuestionstarDevOAuth2Api {
6
+ constructor() {
7
+ this.name = 'questionstarDevOAuth2Api';
8
+ this.extends = ['oAuth2Api'];
9
+ this.displayName = 'Questionstar Dev OAuth2 API';
10
+ this.documentationUrl = 'https://questionstar.dev/connectors';
11
+ this.icon = 'file:../icons/questionstar.svg';
12
+ this.properties = [
13
+ ...descriptions_1.credentialDescription,
14
+ {
15
+ displayName: 'Auth URL',
16
+ name: 'authUrl',
17
+ type: 'hidden',
18
+ default: 'https://external.questionstar.dev/auth',
19
+ },
20
+ {
21
+ displayName: 'Access Token URL',
22
+ name: 'accessTokenUrl',
23
+ type: 'hidden',
24
+ default: 'https://external.questionstar.dev/token',
25
+ },
26
+ {
27
+ displayName: 'Server',
28
+ name: 'server',
29
+ type: 'hidden',
30
+ default: 'https://external.questionstar.dev',
31
+ description: 'The base URL for API requests.',
32
+ },
33
+ ];
34
+ }
35
+ }
36
+ exports.QuestionstarDevOAuth2Api = QuestionstarDevOAuth2Api;
37
+ //# sourceMappingURL=QuestionstarDevOAuth2Api.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuestionstarDevOAuth2Api.credentials.js","sourceRoot":"","sources":["../../credentials/QuestionstarDevOAuth2Api.credentials.ts"],"names":[],"mappings":";;;AAEA,kDAEyB;AAEzB,MAAa,wBAAwB;IAArC;QACI,SAAI,GAAG,0BAA0B,CAAC;QAClC,YAAO,GAAG,CAAC,WAAW,CAAC,CAAC;QACxB,gBAAW,GAAG,6BAA6B,CAAC;QAC5C,qBAAgB,GAAG,qCAAqC,CAAC;QACzD,SAAI,GAAS,gCAAgC,CAAC;QAE9C,eAAU,GAAsB;YAC5B,GAAG,oCAAqB;YACxB;gBACI,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,wCAAwC;aACpD;YACD;gBACI,WAAW,EAAE,kBAAkB;gBAC/B,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,yCAAyC;aACrD;YACD;gBACI,WAAW,EAAE,QAAQ;gBACrB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,mCAAmC;gBAC5C,WAAW,EAAE,gCAAgC;aAChD;SACJ,CAAC;IACN,CAAC;CAAA;AA7BD,4DA6BC"}
@@ -0,0 +1,9 @@
1
+ import { ICredentialType, INodeProperties, Icon } from 'n8n-workflow';
2
+ export declare class QuestionstarEnOAuth2Api implements ICredentialType {
3
+ name: string;
4
+ extends: string[];
5
+ displayName: string;
6
+ documentationUrl: string;
7
+ icon: Icon;
8
+ properties: INodeProperties[];
9
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.QuestionstarEnOAuth2Api = void 0;
4
+ const descriptions_1 = require("../descriptions");
5
+ class QuestionstarEnOAuth2Api {
6
+ constructor() {
7
+ this.name = 'questionstarEnOAuth2Api';
8
+ this.extends = ['oAuth2Api'];
9
+ this.displayName = 'Questionstar EN OAuth2 API';
10
+ this.documentationUrl = 'https://questionstar.com/connectors';
11
+ this.icon = 'file:../icons/questionstar.svg';
12
+ this.properties = [
13
+ ...descriptions_1.credentialDescription,
14
+ {
15
+ displayName: 'Auth URL',
16
+ name: 'authUrl',
17
+ type: 'hidden',
18
+ default: 'https://external.questionstar.com/auth',
19
+ },
20
+ {
21
+ displayName: 'Access Token URL',
22
+ name: 'accessTokenUrl',
23
+ type: 'hidden',
24
+ default: 'https://external.questionstar.com/token',
25
+ },
26
+ {
27
+ displayName: 'Server',
28
+ name: 'server',
29
+ type: 'hidden',
30
+ default: 'https://external.questionstar.com',
31
+ description: 'The base URL for API requests.',
32
+ },
33
+ ];
34
+ }
35
+ }
36
+ exports.QuestionstarEnOAuth2Api = QuestionstarEnOAuth2Api;
37
+ //# sourceMappingURL=QuestionstarEnOAuth2Api.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuestionstarEnOAuth2Api.credentials.js","sourceRoot":"","sources":["../../credentials/QuestionstarEnOAuth2Api.credentials.ts"],"names":[],"mappings":";;;AAEA,kDAEyB;AAEzB,MAAa,uBAAuB;IAApC;QACI,SAAI,GAAG,yBAAyB,CAAC;QACjC,YAAO,GAAG,CAAC,WAAW,CAAC,CAAC;QACxB,gBAAW,GAAG,4BAA4B,CAAC;QAC3C,qBAAgB,GAAG,qCAAqC,CAAC;QACzD,SAAI,GAAS,gCAAgC,CAAC;QAE9C,eAAU,GAAsB;YAC5B,GAAG,oCAAqB;YACxB;gBACI,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,wCAAwC;aACpD;YACD;gBACI,WAAW,EAAE,kBAAkB;gBAC/B,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,yCAAyC;aACrD;YACD;gBACI,WAAW,EAAE,QAAQ;gBACrB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,mCAAmC;gBAC5C,WAAW,EAAE,gCAAgC;aAChD;SACJ,CAAC;IACN,CAAC;CAAA;AA7BD,0DA6BC"}
@@ -0,0 +1,9 @@
1
+ import { ICredentialType, INodeProperties, Icon } from 'n8n-workflow';
2
+ export declare class QuestionstarOAuth2Api implements ICredentialType {
3
+ name: string;
4
+ extends: string[];
5
+ displayName: string;
6
+ documentationUrl: string;
7
+ icon: Icon;
8
+ properties: INodeProperties[];
9
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.QuestionstarOAuth2Api = void 0;
4
+ const descriptions_1 = require("../descriptions");
5
+ class QuestionstarOAuth2Api {
6
+ constructor() {
7
+ this.name = 'questionstarOAuth2Api';
8
+ this.extends = ['oAuth2Api'];
9
+ this.displayName = 'Questionstar OAuth2 API';
10
+ this.documentationUrl = 'https://localhost/connectors';
11
+ this.icon = 'file:../icons/questionstar.svg';
12
+ this.properties = [
13
+ ...descriptions_1.credentialDescription,
14
+ {
15
+ displayName: 'Auth URL',
16
+ name: 'authUrl',
17
+ type: 'hidden',
18
+ default: 'https://localhost:44356/auth',
19
+ },
20
+ {
21
+ displayName: 'Access Token URL',
22
+ name: 'accessTokenUrl',
23
+ type: 'hidden',
24
+ default: 'https://localhost:44356/token',
25
+ },
26
+ {
27
+ displayName: 'Server',
28
+ name: 'server',
29
+ type: 'hidden',
30
+ default: 'https://localhost:44356',
31
+ description: 'The base URL for API requests.',
32
+ },
33
+ ];
34
+ }
35
+ }
36
+ exports.QuestionstarOAuth2Api = QuestionstarOAuth2Api;
37
+ //# sourceMappingURL=QuestionstarOAuth2Api.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuestionstarOAuth2Api.credentials.js","sourceRoot":"","sources":["../../credentials/QuestionstarOAuth2Api.credentials.ts"],"names":[],"mappings":";;;AAEA,kDAEyB;AAEzB,MAAa,qBAAqB;IAAlC;QACI,SAAI,GAAG,uBAAuB,CAAC;QAC/B,YAAO,GAAG,CAAC,WAAW,CAAC,CAAC;QACxB,gBAAW,GAAG,yBAAyB,CAAC;QACxC,qBAAgB,GAAG,8BAA8B,CAAC;QAClD,SAAI,GAAS,gCAAgC,CAAC;QAE9C,eAAU,GAAsB;YAC5B,GAAG,oCAAqB;YACxB;gBACI,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,8BAA8B;aAC1C;YACD;gBACI,WAAW,EAAE,kBAAkB;gBAC/B,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,+BAA+B;aAC3C;YACD;gBACI,WAAW,EAAE,QAAQ;gBACrB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,yBAAyB;gBAClC,WAAW,EAAE,gCAAgC;aAChD;SACJ,CAAC;IACN,CAAC;CAAA;AA7BD,sDA6BC"}
@@ -0,0 +1,9 @@
1
+ import { ICredentialType, INodeProperties, Icon } from 'n8n-workflow';
2
+ export declare class QuestionstarRuOAuth2Api implements ICredentialType {
3
+ name: string;
4
+ extends: string[];
5
+ displayName: string;
6
+ documentationUrl: string;
7
+ icon: Icon;
8
+ properties: INodeProperties[];
9
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.QuestionstarRuOAuth2Api = void 0;
4
+ const descriptions_1 = require("../descriptions");
5
+ class QuestionstarRuOAuth2Api {
6
+ constructor() {
7
+ this.name = 'questionstarRuOAuth2Api';
8
+ this.extends = ['oAuth2Api'];
9
+ this.displayName = 'Questionstar RU OAuth2 API';
10
+ this.documentationUrl = 'https://questionstar.ru/connectors';
11
+ this.icon = 'file:../icons/questionstar.svg';
12
+ this.properties = [
13
+ ...descriptions_1.credentialDescription,
14
+ {
15
+ displayName: 'Auth URL',
16
+ name: 'authUrl',
17
+ type: 'hidden',
18
+ default: 'https://external.questionstar.ru/auth',
19
+ },
20
+ {
21
+ displayName: 'Access Token URL',
22
+ name: 'accessTokenUrl',
23
+ type: 'hidden',
24
+ default: 'https://external.questionstar.ru/token',
25
+ },
26
+ {
27
+ displayName: 'Server',
28
+ name: 'server',
29
+ type: 'hidden',
30
+ default: 'https://external.questionstar.ru',
31
+ description: 'The base URL for API requests.',
32
+ },
33
+ ];
34
+ }
35
+ }
36
+ exports.QuestionstarRuOAuth2Api = QuestionstarRuOAuth2Api;
37
+ //# sourceMappingURL=QuestionstarRuOAuth2Api.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuestionstarRuOAuth2Api.credentials.js","sourceRoot":"","sources":["../../credentials/QuestionstarRuOAuth2Api.credentials.ts"],"names":[],"mappings":";;;AAEA,kDAEyB;AAEzB,MAAa,uBAAuB;IAApC;QACI,SAAI,GAAG,yBAAyB,CAAC;QACjC,YAAO,GAAG,CAAC,WAAW,CAAC,CAAC;QACxB,gBAAW,GAAG,4BAA4B,CAAC;QAC3C,qBAAgB,GAAG,oCAAoC,CAAC;QACxD,SAAI,GAAS,gCAAgC,CAAC;QAE9C,eAAU,GAAsB;YAC5B,GAAG,oCAAqB;YACxB;gBACI,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,uCAAuC;aACnD;YACD;gBACI,WAAW,EAAE,kBAAkB;gBAC/B,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,wCAAwC;aACpD;YACD;gBACI,WAAW,EAAE,QAAQ;gBACrB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,kCAAkC;gBAC3C,WAAW,EAAE,gCAAgC;aAChD;SACJ,CAAC;IACN,CAAC;CAAA;AA7BD,0DA6BC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const answersAsTextProperties: INodeProperties[];
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.answersAsTextProperties = void 0;
4
+ exports.answersAsTextProperties = [
5
+ {
6
+ displayName: 'Export answers as text',
7
+ name: 'answersAsText',
8
+ type: 'boolean',
9
+ default: false,
10
+ description: 'If enabled, exports answer values as plain text',
11
+ }
12
+ ];
13
+ //# sourceMappingURL=AnswersAsTextDescription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnswersAsTextDescription.js","sourceRoot":"","sources":["../../descriptions/AnswersAsTextDescription.ts"],"names":[],"mappings":";;;AAEa,QAAA,uBAAuB,GAAsB;IACzD;QACC,WAAW,EAAE,wBAAwB;QACrC,IAAI,EAAE,eAAe;QACrB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,iDAAiD;KAC9D;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const authenticationProperties: INodeProperties[];
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.authenticationProperties = void 0;
4
+ exports.authenticationProperties = [
5
+ {
6
+ displayName: 'Authentication',
7
+ name: 'authentication',
8
+ type: 'options',
9
+ options: [
10
+ { name: 'EN OAuth2', value: 'questionstarEnOAuth2Api' },
11
+ { name: 'RU OAuth2', value: 'questionstarRuOAuth2Api' },
12
+ { name: 'Dev OAuth2', value: 'questionstarDevOAuth2Api' },
13
+ ],
14
+ default: 'questionstarEnOAuth2Api',
15
+ },
16
+ ];
17
+ //# sourceMappingURL=AuthenticationDescription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthenticationDescription.js","sourceRoot":"","sources":["../../descriptions/AuthenticationDescription.ts"],"names":[],"mappings":";;;AAEa,QAAA,wBAAwB,GAAsB;IAC1D;QACC,WAAW,EAAE,gBAAgB;QAC7B,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE;YACR,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,yBAAyB,EAAE;YACvD,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,yBAAyB,EAAE;YACvD,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,0BAA0B,EAAE;SACzD;QACD,OAAO,EAAE,yBAAyB;KAClC;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const credentialDescription: INodeProperties[];
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.credentialDescription = void 0;
4
+ exports.credentialDescription = [
5
+ {
6
+ displayName: 'Grant Type',
7
+ name: 'grantType',
8
+ type: 'hidden',
9
+ default: 'authorizationCode',
10
+ },
11
+ {
12
+ displayName: 'Client ID',
13
+ name: 'clientId',
14
+ type: 'hidden',
15
+ default: 'n8n',
16
+ },
17
+ {
18
+ displayName: 'Client Secret',
19
+ name: 'clientSecret',
20
+ type: 'hidden',
21
+ typeOptions: { password: true },
22
+ default: '',
23
+ },
24
+ {
25
+ displayName: 'Scope',
26
+ name: 'scope',
27
+ type: 'hidden',
28
+ default: 'read',
29
+ },
30
+ {
31
+ displayName: 'Authentication',
32
+ name: 'authentication',
33
+ type: 'hidden',
34
+ default: '',
35
+ },
36
+ {
37
+ displayName: 'Auth URI Query Parameters',
38
+ name: 'authQueryParameters',
39
+ type: 'hidden',
40
+ default: '',
41
+ },
42
+ {
43
+ displayName: 'Allowed HTTP Request Domains',
44
+ name: 'allowedHttpRequestDomains',
45
+ type: 'hidden',
46
+ default: 'All',
47
+ },
48
+ ];
49
+ //# sourceMappingURL=CredentialDescription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CredentialDescription.js","sourceRoot":"","sources":["../../descriptions/CredentialDescription.ts"],"names":[],"mappings":";;;AAEa,QAAA,qBAAqB,GAAsB;IACvD;QACC,WAAW,EAAE,YAAY;QACzB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,mBAAmB;KAC5B;IACD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,KAAK;KACd;IACD;QACC,WAAW,EAAE,eAAe;QAC5B,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC/B,OAAO,EAAE,EAAE;KACX;IACD;QACC,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,MAAM;KACf;IACD;QACC,WAAW,EAAE,gBAAgB;QAC7B,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;KACX;IACD;QACC,WAAW,EAAE,2BAA2B;QACxC,IAAI,EAAE,qBAAqB;QAC3B,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;KACX;IACD;QACC,WAAW,EAAE,8BAA8B;QAC3C,IAAI,EAAE,2BAA2B;QACjC,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,KAAK;KACd;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const surveyProperties: INodeProperties[];
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.surveyProperties = void 0;
4
+ exports.surveyProperties = [
5
+ {
6
+ displayName: 'Survey',
7
+ name: 'surveyId',
8
+ type: 'options',
9
+ default: '',
10
+ required: true,
11
+ description: 'Select the survey to trigger on completion',
12
+ typeOptions: {
13
+ loadOptionsMethod: 'getSurveys',
14
+ },
15
+ },
16
+ ];
17
+ //# sourceMappingURL=SurveyDescription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SurveyDescription.js","sourceRoot":"","sources":["../../descriptions/SurveyDescription.ts"],"names":[],"mappings":";;;AAEa,QAAA,gBAAgB,GAAsB;IAClD;QACC,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,4CAA4C;QACzD,WAAW,EAAE;YACZ,iBAAiB,EAAE,YAAY;SAC/B;KACD;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const surveyFieldsProperties: INodeProperties[];
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.surveyFieldsProperties = void 0;
4
+ exports.surveyFieldsProperties = [
5
+ {
6
+ displayName: 'Survey Fields',
7
+ name: 'surveyFields',
8
+ type: 'multiOptions',
9
+ typeOptions: {
10
+ loadOptionsDependsOn: ['surveyId'],
11
+ loadOptionsMethod: 'getSurveyFields',
12
+ },
13
+ default: [],
14
+ description: 'Select fields from the survey, If left empty, all fields will be exported',
15
+ },
16
+ ];
17
+ //# sourceMappingURL=SurveyFieldsDescription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SurveyFieldsDescription.js","sourceRoot":"","sources":["../../descriptions/SurveyFieldsDescription.ts"],"names":[],"mappings":";;;AAEa,QAAA,sBAAsB,GAAsB;IACxD;QACC,WAAW,EAAE,eAAe;QAC5B,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE;YACZ,oBAAoB,EAAE,CAAC,UAAU,CAAC;YAClC,iBAAiB,EAAE,iBAAiB;SACpC;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,2EAA2E;KACxF;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const useCustomIDProperties: INodeProperties[];
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useCustomIDProperties = void 0;
4
+ exports.useCustomIDProperties = [
5
+ {
6
+ displayName: 'Custom IDs as Labels',
7
+ name: 'useCustomID',
8
+ type: 'boolean',
9
+ default: false,
10
+ description: 'If enabled, use Custom IDs as Labels',
11
+ }
12
+ ];
13
+ //# sourceMappingURL=UseCustomIDDescription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UseCustomIDDescription.js","sourceRoot":"","sources":["../../descriptions/UseCustomIDDescription.ts"],"names":[],"mappings":";;;AAEa,QAAA,qBAAqB,GAAsB;IACvD;QACC,WAAW,EAAE,sBAAsB;QACnC,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,sCAAsC;KACnD;CACD,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * from './SurveyDescription';
2
+ export * from './SurveyFieldsDescription';
3
+ export * from './AnswersAsTextDescription';
4
+ export * from './UseCustomIDDescription';
5
+ export * from './AuthenticationDescription';
6
+ export * from './CredentialDescription';
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./SurveyDescription"), exports);
18
+ __exportStar(require("./SurveyFieldsDescription"), exports);
19
+ __exportStar(require("./AnswersAsTextDescription"), exports);
20
+ __exportStar(require("./UseCustomIDDescription"), exports);
21
+ __exportStar(require("./AuthenticationDescription"), exports);
22
+ __exportStar(require("./CredentialDescription"), exports);
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../descriptions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,4DAA0C;AAC1C,6DAA2C;AAC3C,2DAAyC;AACzC,8DAA4C;AAC5C,0DAAwC"}
@@ -0,0 +1,2 @@
1
+ import type { IExecuteFunctions, IHookFunctions, ILoadOptionsFunctions, IDataObject, IHttpRequestMethods } from 'n8n-workflow';
2
+ export declare function questionstarApiRequest<T = IDataObject>(this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, method: IHttpRequestMethods, endpoint: string, body?: IDataObject, query?: IDataObject, optionsOverride?: IDataObject): Promise<T>;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.questionstarApiRequest = questionstarApiRequest;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ async function questionstarApiRequest(method, endpoint, body = {}, query = {}, optionsOverride = {}) {
6
+ const credentialType = this.getNodeParameter('authentication', 0);
7
+ const credentials = await this.getCredentials(credentialType);
8
+ const url = `${credentials.server}/api/v1/${endpoint}`;
9
+ const options = {
10
+ method,
11
+ url,
12
+ headers: {
13
+ 'User-Agent': 'n8n',
14
+ },
15
+ body,
16
+ qs: query,
17
+ };
18
+ if (Object.keys(optionsOverride).length > 0) {
19
+ Object.assign(options, optionsOverride);
20
+ }
21
+ try {
22
+ const response = await this.helpers.httpRequestWithAuthentication.call(this, credentialType, options);
23
+ if (response?.success === false) {
24
+ throw new n8n_workflow_1.NodeApiError(this.getNode(), response.errors);
25
+ }
26
+ return response.data;
27
+ }
28
+ catch (error) {
29
+ throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
30
+ }
31
+ }
32
+ //# sourceMappingURL=GenericFunctions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GenericFunctions.js","sourceRoot":"","sources":["../../helpers/GenericFunctions.ts"],"names":[],"mappings":";;AAcA,wDA0CC;AA/CD,+CAA4C;AAKrC,KAAK,UAAU,sBAAsB,CAE3C,MAA2B,EAC3B,QAAgB,EAChB,OAAoB,EAAE,EACtB,QAAqB,EAAE,EACvB,kBAA+B,EAAE;IAEjC,MAAM,cAAc,GAAG,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,EAAE,CAAC,CAAW,CAAC;IAC5E,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;IAE9D,MAAM,GAAG,GAAG,GAAG,WAAW,CAAC,MAAM,WAAW,QAAQ,EAAE,CAAC;IAEvD,MAAM,OAAO,GAAwB;QACpC,MAAM;QACN,GAAG;QACH,OAAO,EAAE;YACR,YAAY,EAAE,KAAK;SACnB;QACD,IAAI;QACJ,EAAE,EAAE,KAAK;KACT,CAAC;IAEF,IAAI,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC7C,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IACzC,CAAC;IAED,IAAI,CAAC;QACJ,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,6BAA6B,CAAC,IAAI,CACrE,IAAI,EACJ,cAAc,EACd,OAAO,CACP,CAAC;QAEF,IAAI,QAAQ,EAAE,OAAO,KAAK,KAAK,EAAE,CAAC;YACjC,MAAM,IAAI,2BAAY,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,QAAQ,CAAC,MAAoB,CAAC,CAAC;QACvE,CAAC;QAED,OAAO,QAAQ,CAAC,IAAS,CAAC;IAC3B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,MAAM,IAAI,2BAAY,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAmB,CAAC,CAAC;IAC7D,CAAC;AACF,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { ILoadOptionsFunctions } from 'n8n-workflow';
2
+ export declare function getSurveyFields(this: ILoadOptionsFunctions): Promise<{
3
+ name: string;
4
+ value: string;
5
+ }[]>;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getSurveyFields = getSurveyFields;
4
+ const GenericFunctions_1 = require("./GenericFunctions");
5
+ async function getSurveyFields() {
6
+ const surveyId = this.getCurrentNodeParameter('surveyId');
7
+ if (!surveyId)
8
+ return [];
9
+ const fields = await (GenericFunctions_1.questionstarApiRequest).call(this, 'GET', `Survey/Surveys/Schema/${surveyId}`);
10
+ return fields.map((field) => ({
11
+ name: field.label ?? field.name,
12
+ value: field.name,
13
+ }));
14
+ }
15
+ //# sourceMappingURL=GetSurveyFields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetSurveyFields.js","sourceRoot":"","sources":["../../helpers/GetSurveyFields.ts"],"names":[],"mappings":";;AAOA,0CAcC;AApBD,yDAA4D;AAMrD,KAAK,UAAU,eAAe;IACpC,MAAM,QAAQ,GAAG,IAAI,CAAC,uBAAuB,CAAC,UAAU,CAAW,CAAC;IACpE,IAAI,CAAC,QAAQ;QAAE,OAAO,EAAE,CAAC;IAEzB,MAAM,MAAM,GAAG,MAAM,CAAC,yCAAqC,CAAC,CAAC,IAAI,CAChE,IAAI,EACJ,KAAK,EACL,yBAAyB,QAAQ,EAAE,CACnC,CAAC;IAEF,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAC7B,IAAI,EAAE,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI;QAC/B,KAAK,EAAE,KAAK,CAAC,IAAI;KACjB,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { ILoadOptionsFunctions } from 'n8n-workflow';
2
+ export declare function getSurveysList(this: ILoadOptionsFunctions): Promise<{
3
+ name: string;
4
+ value: string;
5
+ }[]>;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getSurveysList = getSurveysList;
4
+ const GenericFunctions_1 = require("./GenericFunctions");
5
+ async function getSurveysList() {
6
+ const surveys = await (GenericFunctions_1.questionstarApiRequest).call(this, 'GET', 'Survey/Surveys');
7
+ const sorted = surveys.sort((a, b) => new Date(b.lastChangedDate).getTime() -
8
+ new Date(a.lastChangedDate).getTime());
9
+ return sorted.map((survey) => ({
10
+ name: survey.name,
11
+ value: survey.id,
12
+ }));
13
+ }
14
+ //# sourceMappingURL=GetSurveys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetSurveys.js","sourceRoot":"","sources":["../../helpers/GetSurveys.ts"],"names":[],"mappings":";;AAOA,wCAiBC;AAvBD,yDAA4D;AAMrD,KAAK,UAAU,cAAc;IACnC,MAAM,OAAO,GAAG,MAAM,CAAC,yCAAoC,CAAC,CAAC,IAAI,CAChE,IAAI,EACJ,KAAK,EACL,gBAAgB,CAChB,CAAC;IAEF,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAC1B,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACR,IAAI,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,OAAO,EAAE;QACrC,IAAI,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,OAAO,EAAE,CACtC,CAAC;IAEF,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QAC9B,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,KAAK,EAAE,MAAM,CAAC,EAAE;KAChB,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './GenericFunctions';
2
+ export * from './GetSurveys';
3
+ export * from './GetSurveyFields';