@memberjunction/actions-bizapps-formbuilders 2.112.0-beta
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/IMPLEMENTATION_PLAN.md +311 -0
- package/README.md +498 -0
- package/dist/base/base-form-builder.action.d.ts +153 -0
- package/dist/base/base-form-builder.action.d.ts.map +1 -0
- package/dist/base/base-form-builder.action.js +301 -0
- package/dist/base/base-form-builder.action.js.map +1 -0
- package/dist/base/index.d.ts +2 -0
- package/dist/base/index.d.ts.map +1 -0
- package/dist/base/index.js +18 -0
- package/dist/base/index.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -0
- package/dist/providers/google-forms/actions/export-csv.action.d.ts +31 -0
- package/dist/providers/google-forms/actions/export-csv.action.d.ts.map +1 -0
- package/dist/providers/google-forms/actions/export-csv.action.js +165 -0
- package/dist/providers/google-forms/actions/export-csv.action.js.map +1 -0
- package/dist/providers/google-forms/actions/get-form.action.d.ts +28 -0
- package/dist/providers/google-forms/actions/get-form.action.d.ts.map +1 -0
- package/dist/providers/google-forms/actions/get-form.action.js +151 -0
- package/dist/providers/google-forms/actions/get-form.action.js.map +1 -0
- package/dist/providers/google-forms/actions/get-single-response.action.d.ts +31 -0
- package/dist/providers/google-forms/actions/get-single-response.action.d.ts.map +1 -0
- package/dist/providers/google-forms/actions/get-single-response.action.js +150 -0
- package/dist/providers/google-forms/actions/get-single-response.action.js.map +1 -0
- package/dist/providers/google-forms/actions/get-statistics.action.d.ts +36 -0
- package/dist/providers/google-forms/actions/get-statistics.action.d.ts.map +1 -0
- package/dist/providers/google-forms/actions/get-statistics.action.js +254 -0
- package/dist/providers/google-forms/actions/get-statistics.action.js.map +1 -0
- package/dist/providers/google-forms/actions/index.d.ts +5 -0
- package/dist/providers/google-forms/actions/index.d.ts.map +1 -0
- package/dist/providers/google-forms/actions/index.js +23 -0
- package/dist/providers/google-forms/actions/index.js.map +1 -0
- package/dist/providers/google-forms/googleforms-base.action.d.ts +197 -0
- package/dist/providers/google-forms/googleforms-base.action.d.ts.map +1 -0
- package/dist/providers/google-forms/googleforms-base.action.js +352 -0
- package/dist/providers/google-forms/googleforms-base.action.js.map +1 -0
- package/dist/providers/google-forms/index.d.ts +3 -0
- package/dist/providers/google-forms/index.d.ts.map +1 -0
- package/dist/providers/google-forms/index.js +21 -0
- package/dist/providers/google-forms/index.js.map +1 -0
- package/dist/providers/jotform/actions/create-form.action.d.ts +61 -0
- package/dist/providers/jotform/actions/create-form.action.d.ts.map +1 -0
- package/dist/providers/jotform/actions/create-form.action.js +259 -0
- package/dist/providers/jotform/actions/create-form.action.js.map +1 -0
- package/dist/providers/jotform/actions/export-csv.action.d.ts +31 -0
- package/dist/providers/jotform/actions/export-csv.action.d.ts.map +1 -0
- package/dist/providers/jotform/actions/export-csv.action.js +187 -0
- package/dist/providers/jotform/actions/export-csv.action.js.map +1 -0
- package/dist/providers/jotform/actions/get-form.action.d.ts +31 -0
- package/dist/providers/jotform/actions/get-form.action.d.ts.map +1 -0
- package/dist/providers/jotform/actions/get-form.action.js +188 -0
- package/dist/providers/jotform/actions/get-form.action.js.map +1 -0
- package/dist/providers/jotform/actions/get-single-submission.action.d.ts +31 -0
- package/dist/providers/jotform/actions/get-single-submission.action.d.ts.map +1 -0
- package/dist/providers/jotform/actions/get-single-submission.action.js +138 -0
- package/dist/providers/jotform/actions/get-single-submission.action.js.map +1 -0
- package/dist/providers/jotform/actions/get-statistics.action.d.ts +39 -0
- package/dist/providers/jotform/actions/get-statistics.action.d.ts.map +1 -0
- package/dist/providers/jotform/actions/get-statistics.action.js +290 -0
- package/dist/providers/jotform/actions/get-statistics.action.js.map +1 -0
- package/dist/providers/jotform/actions/get-submissions.action.d.ts +34 -0
- package/dist/providers/jotform/actions/get-submissions.action.d.ts.map +1 -0
- package/dist/providers/jotform/actions/get-submissions.action.js +218 -0
- package/dist/providers/jotform/actions/get-submissions.action.js.map +1 -0
- package/dist/providers/jotform/actions/index.d.ts +9 -0
- package/dist/providers/jotform/actions/index.d.ts.map +1 -0
- package/dist/providers/jotform/actions/index.js +27 -0
- package/dist/providers/jotform/actions/index.js.map +1 -0
- package/dist/providers/jotform/actions/update-form.action.d.ts +38 -0
- package/dist/providers/jotform/actions/update-form.action.d.ts.map +1 -0
- package/dist/providers/jotform/actions/update-form.action.js +232 -0
- package/dist/providers/jotform/actions/update-form.action.js.map +1 -0
- package/dist/providers/jotform/actions/watch-new-submissions.action.d.ts +32 -0
- package/dist/providers/jotform/actions/watch-new-submissions.action.d.ts.map +1 -0
- package/dist/providers/jotform/actions/watch-new-submissions.action.js +229 -0
- package/dist/providers/jotform/actions/watch-new-submissions.action.js.map +1 -0
- package/dist/providers/jotform/index.d.ts +3 -0
- package/dist/providers/jotform/index.d.ts.map +1 -0
- package/dist/providers/jotform/index.js +21 -0
- package/dist/providers/jotform/index.js.map +1 -0
- package/dist/providers/jotform/jotform-base.action.d.ts +96 -0
- package/dist/providers/jotform/jotform-base.action.d.ts.map +1 -0
- package/dist/providers/jotform/jotform-base.action.js +269 -0
- package/dist/providers/jotform/jotform-base.action.js.map +1 -0
- package/dist/providers/surveymonkey/actions/create-survey.action.d.ts +48 -0
- package/dist/providers/surveymonkey/actions/create-survey.action.d.ts.map +1 -0
- package/dist/providers/surveymonkey/actions/create-survey.action.js +192 -0
- package/dist/providers/surveymonkey/actions/create-survey.action.js.map +1 -0
- package/dist/providers/surveymonkey/actions/export-csv.action.d.ts +30 -0
- package/dist/providers/surveymonkey/actions/export-csv.action.d.ts.map +1 -0
- package/dist/providers/surveymonkey/actions/export-csv.action.js +173 -0
- package/dist/providers/surveymonkey/actions/export-csv.action.js.map +1 -0
- package/dist/providers/surveymonkey/actions/get-responses.action.d.ts +33 -0
- package/dist/providers/surveymonkey/actions/get-responses.action.d.ts.map +1 -0
- package/dist/providers/surveymonkey/actions/get-responses.action.js +243 -0
- package/dist/providers/surveymonkey/actions/get-responses.action.js.map +1 -0
- package/dist/providers/surveymonkey/actions/get-single-response.action.d.ts +30 -0
- package/dist/providers/surveymonkey/actions/get-single-response.action.d.ts.map +1 -0
- package/dist/providers/surveymonkey/actions/get-single-response.action.js +149 -0
- package/dist/providers/surveymonkey/actions/get-single-response.action.js.map +1 -0
- package/dist/providers/surveymonkey/actions/get-statistics.action.d.ts +38 -0
- package/dist/providers/surveymonkey/actions/get-statistics.action.d.ts.map +1 -0
- package/dist/providers/surveymonkey/actions/get-statistics.action.js +261 -0
- package/dist/providers/surveymonkey/actions/get-statistics.action.js.map +1 -0
- package/dist/providers/surveymonkey/actions/get-survey.action.d.ts +27 -0
- package/dist/providers/surveymonkey/actions/get-survey.action.d.ts.map +1 -0
- package/dist/providers/surveymonkey/actions/get-survey.action.js +180 -0
- package/dist/providers/surveymonkey/actions/get-survey.action.js.map +1 -0
- package/dist/providers/surveymonkey/actions/index.d.ts +9 -0
- package/dist/providers/surveymonkey/actions/index.d.ts.map +1 -0
- package/dist/providers/surveymonkey/actions/index.js +27 -0
- package/dist/providers/surveymonkey/actions/index.js.map +1 -0
- package/dist/providers/surveymonkey/actions/update-survey.action.d.ts +39 -0
- package/dist/providers/surveymonkey/actions/update-survey.action.d.ts.map +1 -0
- package/dist/providers/surveymonkey/actions/update-survey.action.js +217 -0
- package/dist/providers/surveymonkey/actions/update-survey.action.js.map +1 -0
- package/dist/providers/surveymonkey/actions/watch-new-responses.action.d.ts +31 -0
- package/dist/providers/surveymonkey/actions/watch-new-responses.action.d.ts.map +1 -0
- package/dist/providers/surveymonkey/actions/watch-new-responses.action.js +214 -0
- package/dist/providers/surveymonkey/actions/watch-new-responses.action.js.map +1 -0
- package/dist/providers/surveymonkey/index.d.ts +3 -0
- package/dist/providers/surveymonkey/index.d.ts.map +1 -0
- package/dist/providers/surveymonkey/index.js +21 -0
- package/dist/providers/surveymonkey/index.js.map +1 -0
- package/dist/providers/surveymonkey/surveymonkey-base.action.d.ts +193 -0
- package/dist/providers/surveymonkey/surveymonkey-base.action.d.ts.map +1 -0
- package/dist/providers/surveymonkey/surveymonkey-base.action.js +329 -0
- package/dist/providers/surveymonkey/surveymonkey-base.action.js.map +1 -0
- package/dist/providers/typeform/actions/create-form.action.d.ts +40 -0
- package/dist/providers/typeform/actions/create-form.action.d.ts.map +1 -0
- package/dist/providers/typeform/actions/create-form.action.js +205 -0
- package/dist/providers/typeform/actions/create-form.action.js.map +1 -0
- package/dist/providers/typeform/actions/export-csv.action.d.ts +31 -0
- package/dist/providers/typeform/actions/export-csv.action.d.ts.map +1 -0
- package/dist/providers/typeform/actions/export-csv.action.js +182 -0
- package/dist/providers/typeform/actions/export-csv.action.js.map +1 -0
- package/dist/providers/typeform/actions/get-form.action.d.ts +28 -0
- package/dist/providers/typeform/actions/get-form.action.d.ts.map +1 -0
- package/dist/providers/typeform/actions/get-form.action.js +172 -0
- package/dist/providers/typeform/actions/get-form.action.js.map +1 -0
- package/dist/providers/typeform/actions/get-responses.action.d.ts +34 -0
- package/dist/providers/typeform/actions/get-responses.action.d.ts.map +1 -0
- package/dist/providers/typeform/actions/get-responses.action.js +238 -0
- package/dist/providers/typeform/actions/get-responses.action.js.map +1 -0
- package/dist/providers/typeform/actions/get-single-response.action.d.ts +31 -0
- package/dist/providers/typeform/actions/get-single-response.action.d.ts.map +1 -0
- package/dist/providers/typeform/actions/get-single-response.action.js +161 -0
- package/dist/providers/typeform/actions/get-single-response.action.js.map +1 -0
- package/dist/providers/typeform/actions/get-statistics.action.d.ts +33 -0
- package/dist/providers/typeform/actions/get-statistics.action.d.ts.map +1 -0
- package/dist/providers/typeform/actions/get-statistics.action.js +257 -0
- package/dist/providers/typeform/actions/get-statistics.action.js.map +1 -0
- package/dist/providers/typeform/actions/index.d.ts +9 -0
- package/dist/providers/typeform/actions/index.d.ts.map +1 -0
- package/dist/providers/typeform/actions/index.js +27 -0
- package/dist/providers/typeform/actions/index.js.map +1 -0
- package/dist/providers/typeform/actions/update-form.action.d.ts +38 -0
- package/dist/providers/typeform/actions/update-form.action.d.ts.map +1 -0
- package/dist/providers/typeform/actions/update-form.action.js +228 -0
- package/dist/providers/typeform/actions/update-form.action.js.map +1 -0
- package/dist/providers/typeform/actions/watch-new-responses.action.d.ts +32 -0
- package/dist/providers/typeform/actions/watch-new-responses.action.d.ts.map +1 -0
- package/dist/providers/typeform/actions/watch-new-responses.action.js +215 -0
- package/dist/providers/typeform/actions/watch-new-responses.action.js.map +1 -0
- package/dist/providers/typeform/index.d.ts +3 -0
- package/dist/providers/typeform/index.d.ts.map +1 -0
- package/dist/providers/typeform/index.js +21 -0
- package/dist/providers/typeform/index.js.map +1 -0
- package/dist/providers/typeform/typeform-base.action.d.ts +121 -0
- package/dist/providers/typeform/typeform-base.action.d.ts.map +1 -0
- package/dist/providers/typeform/typeform-base.action.js +292 -0
- package/dist/providers/typeform/typeform-base.action.js.map +1 -0
- package/package.json +41 -0
- package/src/base/base-form-builder.action.ts +403 -0
- package/src/base/index.ts +1 -0
- package/src/index.ts +18 -0
- package/src/providers/google-forms/actions/export-csv.action.ts +167 -0
- package/src/providers/google-forms/actions/get-form.action.ts +151 -0
- package/src/providers/google-forms/actions/get-single-response.action.ts +150 -0
- package/src/providers/google-forms/actions/get-statistics.action.ts +273 -0
- package/src/providers/google-forms/actions/index.ts +7 -0
- package/src/providers/google-forms/googleforms-base.action.ts +517 -0
- package/src/providers/google-forms/index.ts +5 -0
- package/src/providers/jotform/actions/create-form.action.ts +281 -0
- package/src/providers/jotform/actions/export-csv.action.ts +189 -0
- package/src/providers/jotform/actions/get-form.action.ts +189 -0
- package/src/providers/jotform/actions/get-single-submission.action.ts +137 -0
- package/src/providers/jotform/actions/get-statistics.action.ts +308 -0
- package/src/providers/jotform/actions/get-submissions.action.ts +220 -0
- package/src/providers/jotform/actions/index.ts +11 -0
- package/src/providers/jotform/actions/update-form.action.ts +254 -0
- package/src/providers/jotform/actions/watch-new-submissions.action.ts +238 -0
- package/src/providers/jotform/index.ts +5 -0
- package/src/providers/jotform/jotform-base.action.ts +365 -0
- package/src/providers/surveymonkey/actions/create-survey.action.ts +196 -0
- package/src/providers/surveymonkey/actions/export-csv.action.ts +175 -0
- package/src/providers/surveymonkey/actions/get-responses.action.ts +245 -0
- package/src/providers/surveymonkey/actions/get-single-response.action.ts +148 -0
- package/src/providers/surveymonkey/actions/get-statistics.action.ts +280 -0
- package/src/providers/surveymonkey/actions/get-survey.action.ts +181 -0
- package/src/providers/surveymonkey/actions/index.ts +11 -0
- package/src/providers/surveymonkey/actions/update-survey.action.ts +234 -0
- package/src/providers/surveymonkey/actions/watch-new-responses.action.ts +221 -0
- package/src/providers/surveymonkey/index.ts +5 -0
- package/src/providers/surveymonkey/surveymonkey-base.action.ts +505 -0
- package/src/providers/typeform/actions/create-form.action.ts +211 -0
- package/src/providers/typeform/actions/export-csv.action.ts +184 -0
- package/src/providers/typeform/actions/get-form.action.ts +173 -0
- package/src/providers/typeform/actions/get-responses.action.ts +242 -0
- package/src/providers/typeform/actions/get-single-response.action.ts +160 -0
- package/src/providers/typeform/actions/get-statistics.action.ts +276 -0
- package/src/providers/typeform/actions/index.ts +11 -0
- package/src/providers/typeform/actions/update-form.action.ts +235 -0
- package/src/providers/typeform/actions/watch-new-responses.action.ts +222 -0
- package/src/providers/typeform/index.ts +5 -0
- package/src/providers/typeform/typeform-base.action.ts +387 -0
- package/tsconfig.json +18 -0
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.CreateTypeformAction = void 0;
|
|
10
|
+
const global_1 = require("@memberjunction/global");
|
|
11
|
+
const typeform_base_action_1 = require("../typeform-base.action");
|
|
12
|
+
const actions_1 = require("@memberjunction/actions");
|
|
13
|
+
/**
|
|
14
|
+
* Action to create a new Typeform programmatically
|
|
15
|
+
*
|
|
16
|
+
* Security: API credentials are retrieved securely from Company Integrations table or environment variables.
|
|
17
|
+
* Never pass API tokens as action parameters.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```typescript
|
|
21
|
+
* await runAction({
|
|
22
|
+
* ActionName: 'Create Typeform',
|
|
23
|
+
* Params: [{
|
|
24
|
+
* Name: 'CompanyID',
|
|
25
|
+
* Value: '12345'
|
|
26
|
+
* }, {
|
|
27
|
+
* Name: 'Title',
|
|
28
|
+
* Value: 'Customer Feedback Survey'
|
|
29
|
+
* }, {
|
|
30
|
+
* Name: 'Fields',
|
|
31
|
+
* Value: [{
|
|
32
|
+
* type: 'short_text',
|
|
33
|
+
* title: 'What is your name?',
|
|
34
|
+
* ref: 'name'
|
|
35
|
+
* }, {
|
|
36
|
+
* type: 'email',
|
|
37
|
+
* title: 'What is your email?',
|
|
38
|
+
* ref: 'email',
|
|
39
|
+
* validations: { required: true }
|
|
40
|
+
* }]
|
|
41
|
+
* }]
|
|
42
|
+
* });
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
let CreateTypeformAction = class CreateTypeformAction extends typeform_base_action_1.TypeformBaseAction {
|
|
46
|
+
get Description() {
|
|
47
|
+
return 'Creates a new Typeform with specified title, fields, and settings. Supports all field types including text, email, multiple choice, rating, and more. Returns the new form ID and shareable link.';
|
|
48
|
+
}
|
|
49
|
+
async InternalRunAction(params) {
|
|
50
|
+
try {
|
|
51
|
+
const contextUser = params.ContextUser;
|
|
52
|
+
if (!contextUser) {
|
|
53
|
+
return {
|
|
54
|
+
Success: false,
|
|
55
|
+
ResultCode: 'MISSING_CONTEXT_USER',
|
|
56
|
+
Message: 'Context user is required for Typeform API calls'
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
const companyId = this.getParamValue(params.Params, 'CompanyID');
|
|
60
|
+
const title = this.getParamValue(params.Params, 'Title');
|
|
61
|
+
if (!title) {
|
|
62
|
+
return {
|
|
63
|
+
Success: false,
|
|
64
|
+
ResultCode: 'MISSING_TITLE',
|
|
65
|
+
Message: 'Title parameter is required'
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
const fields = this.getParamValue(params.Params, 'Fields');
|
|
69
|
+
if (!fields || !Array.isArray(fields) || fields.length === 0) {
|
|
70
|
+
return {
|
|
71
|
+
Success: false,
|
|
72
|
+
ResultCode: 'MISSING_FIELDS',
|
|
73
|
+
Message: 'Fields parameter is required and must be a non-empty array'
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
// Securely retrieve API token using company integration
|
|
77
|
+
const apiToken = await this.getSecureAPIToken(companyId, contextUser);
|
|
78
|
+
const formData = {
|
|
79
|
+
title,
|
|
80
|
+
fields
|
|
81
|
+
};
|
|
82
|
+
const settings = this.getParamValue(params.Params, 'Settings');
|
|
83
|
+
if (settings) {
|
|
84
|
+
formData.settings = settings;
|
|
85
|
+
}
|
|
86
|
+
const logic = this.getParamValue(params.Params, 'Logic');
|
|
87
|
+
if (logic && Array.isArray(logic)) {
|
|
88
|
+
formData.logic = logic;
|
|
89
|
+
}
|
|
90
|
+
const hiddenFields = this.getParamValue(params.Params, 'HiddenFields');
|
|
91
|
+
if (hiddenFields && Array.isArray(hiddenFields)) {
|
|
92
|
+
formData.hidden = hiddenFields;
|
|
93
|
+
}
|
|
94
|
+
const themeId = this.getParamValue(params.Params, 'ThemeID');
|
|
95
|
+
if (themeId) {
|
|
96
|
+
formData.theme = { href: `https://api.typeform.com/themes/${themeId}` };
|
|
97
|
+
}
|
|
98
|
+
const workspaceId = this.getParamValue(params.Params, 'WorkspaceID');
|
|
99
|
+
if (workspaceId) {
|
|
100
|
+
formData.workspace = { href: `https://api.typeform.com/workspaces/${workspaceId}` };
|
|
101
|
+
}
|
|
102
|
+
const response = await this.getAxiosInstance(apiToken).post('/forms', formData);
|
|
103
|
+
const createdForm = response.data;
|
|
104
|
+
const formUrl = createdForm._links?.display || `https://form.typeform.com/to/${createdForm.id}`;
|
|
105
|
+
const outputParams = [
|
|
106
|
+
{
|
|
107
|
+
Name: 'Form',
|
|
108
|
+
Type: 'Output',
|
|
109
|
+
Value: createdForm
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
Name: 'FormID',
|
|
113
|
+
Type: 'Output',
|
|
114
|
+
Value: createdForm.id
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
Name: 'FormURL',
|
|
118
|
+
Type: 'Output',
|
|
119
|
+
Value: formUrl
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
Name: 'Title',
|
|
123
|
+
Type: 'Output',
|
|
124
|
+
Value: createdForm.title
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
Name: 'FieldCount',
|
|
128
|
+
Type: 'Output',
|
|
129
|
+
Value: createdForm.fields?.length || 0
|
|
130
|
+
}
|
|
131
|
+
];
|
|
132
|
+
for (const outputParam of outputParams) {
|
|
133
|
+
const existingParam = params.Params.find(p => p.Name === outputParam.Name);
|
|
134
|
+
if (existingParam) {
|
|
135
|
+
existingParam.Value = outputParam.Value;
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
params.Params.push(outputParam);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return {
|
|
142
|
+
Success: true,
|
|
143
|
+
ResultCode: 'SUCCESS',
|
|
144
|
+
Message: `Successfully created form "${createdForm.title}" (ID: ${createdForm.id}). View at: ${formUrl}`
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
catch (error) {
|
|
148
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
149
|
+
return {
|
|
150
|
+
Success: false,
|
|
151
|
+
ResultCode: 'ERROR',
|
|
152
|
+
Message: this.buildFormErrorMessage('Create Typeform', errorMessage, error)
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
get Params() {
|
|
157
|
+
return [
|
|
158
|
+
{
|
|
159
|
+
Name: 'CompanyID',
|
|
160
|
+
Type: 'Input',
|
|
161
|
+
Value: null,
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
Name: 'Title',
|
|
165
|
+
Type: 'Input',
|
|
166
|
+
Value: null,
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
Name: 'Fields',
|
|
170
|
+
Type: 'Input',
|
|
171
|
+
Value: null,
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
Name: 'Settings',
|
|
175
|
+
Type: 'Input',
|
|
176
|
+
Value: null,
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
Name: 'Logic',
|
|
180
|
+
Type: 'Input',
|
|
181
|
+
Value: null,
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
Name: 'HiddenFields',
|
|
185
|
+
Type: 'Input',
|
|
186
|
+
Value: null,
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
Name: 'ThemeID',
|
|
190
|
+
Type: 'Input',
|
|
191
|
+
Value: null,
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
Name: 'WorkspaceID',
|
|
195
|
+
Type: 'Input',
|
|
196
|
+
Value: null,
|
|
197
|
+
}
|
|
198
|
+
];
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
exports.CreateTypeformAction = CreateTypeformAction;
|
|
202
|
+
exports.CreateTypeformAction = CreateTypeformAction = __decorate([
|
|
203
|
+
(0, global_1.RegisterClass)(actions_1.BaseAction, 'Create Typeform')
|
|
204
|
+
], CreateTypeformAction);
|
|
205
|
+
//# sourceMappingURL=create-form.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-form.action.js","sourceRoot":"","sources":["../../../../src/providers/typeform/actions/create-form.action.ts"],"names":[],"mappings":";;;;;;;;;AAAA,mDAAuD;AACvD,kEAA6D;AAE7D,qDAAqD;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEI,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,yCAAkB;IAExD,IAAW,WAAW;QAClB,OAAO,mMAAmM,CAAC;IAC/M,CAAC;IAES,KAAK,CAAC,iBAAiB,CAAC,MAAuB;QACrD,IAAI,CAAC;YACD,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;YACvC,IAAI,CAAC,WAAW,EAAE,CAAC;gBACf,OAAO;oBACH,OAAO,EAAE,KAAK;oBACd,UAAU,EAAE,sBAAsB;oBAClC,OAAO,EAAE,iDAAiD;iBAC7D,CAAC;YACN,CAAC;YAED,MAAM,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;YAEjE,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YACzD,IAAI,CAAC,KAAK,EAAE,CAAC;gBACT,OAAO;oBACH,OAAO,EAAE,KAAK;oBACd,UAAU,EAAE,eAAe;oBAC3B,OAAO,EAAE,6BAA6B;iBACzC,CAAC;YACN,CAAC;YAED,MAAM,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;YAC3D,IAAI,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC3D,OAAO;oBACH,OAAO,EAAE,KAAK;oBACd,UAAU,EAAE,gBAAgB;oBAC5B,OAAO,EAAE,4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sBAAa,EAAC,oBAAU,EAAE,iBAAiB,CAAC;GAChC,oBAAoB,CA4KhC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { TypeformBaseAction } from '../typeform-base.action';
|
|
2
|
+
import { ActionParam, ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
|
|
3
|
+
/**
|
|
4
|
+
* Action to export Typeform responses as CSV format
|
|
5
|
+
*
|
|
6
|
+
* Security: API credentials are retrieved securely from Company Integrations table or environment variables.
|
|
7
|
+
* Never pass API tokens as action parameters.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* await runAction({
|
|
12
|
+
* ActionName: 'Export Typeform Responses to CSV',
|
|
13
|
+
* Params: [{
|
|
14
|
+
* Name: 'CompanyID',
|
|
15
|
+
* Value: '12345'
|
|
16
|
+
* }, {
|
|
17
|
+
* Name: 'FormID',
|
|
18
|
+
* Value: 'abc123'
|
|
19
|
+
* }, {
|
|
20
|
+
* Name: 'IncludeMetadata',
|
|
21
|
+
* Value: true
|
|
22
|
+
* }]
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare class ExportTypeformCSVAction extends TypeformBaseAction {
|
|
27
|
+
get Description(): string;
|
|
28
|
+
protected InternalRunAction(params: RunActionParams): Promise<ActionResultSimple>;
|
|
29
|
+
get Params(): ActionParam[];
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=export-csv.action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export-csv.action.d.ts","sourceRoot":"","sources":["../../../../src/providers/typeform/actions/export-csv.action.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAGhG;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBACa,uBAAwB,SAAQ,kBAAkB;IAE3D,IAAW,WAAW,IAAI,MAAM,CAE/B;cAEe,iBAAiB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAwGvF,IAAW,MAAM,IAAI,WAAW,EAAE,CA2CjC;CACJ"}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.ExportTypeformCSVAction = void 0;
|
|
10
|
+
const global_1 = require("@memberjunction/global");
|
|
11
|
+
const typeform_base_action_1 = require("../typeform-base.action");
|
|
12
|
+
const actions_1 = require("@memberjunction/actions");
|
|
13
|
+
/**
|
|
14
|
+
* Action to export Typeform responses as CSV format
|
|
15
|
+
*
|
|
16
|
+
* Security: API credentials are retrieved securely from Company Integrations table or environment variables.
|
|
17
|
+
* Never pass API tokens as action parameters.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```typescript
|
|
21
|
+
* await runAction({
|
|
22
|
+
* ActionName: 'Export Typeform Responses to CSV',
|
|
23
|
+
* Params: [{
|
|
24
|
+
* Name: 'CompanyID',
|
|
25
|
+
* Value: '12345'
|
|
26
|
+
* }, {
|
|
27
|
+
* Name: 'FormID',
|
|
28
|
+
* Value: 'abc123'
|
|
29
|
+
* }, {
|
|
30
|
+
* Name: 'IncludeMetadata',
|
|
31
|
+
* Value: true
|
|
32
|
+
* }]
|
|
33
|
+
* });
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
let ExportTypeformCSVAction = class ExportTypeformCSVAction extends typeform_base_action_1.TypeformBaseAction {
|
|
37
|
+
get Description() {
|
|
38
|
+
return 'Exports Typeform responses to CSV format for use in spreadsheets, data analysis tools, or archival. Supports custom delimiters and optional metadata columns.';
|
|
39
|
+
}
|
|
40
|
+
async InternalRunAction(params) {
|
|
41
|
+
try {
|
|
42
|
+
const contextUser = params.ContextUser;
|
|
43
|
+
if (!contextUser) {
|
|
44
|
+
return {
|
|
45
|
+
Success: false,
|
|
46
|
+
ResultCode: 'MISSING_CONTEXT_USER',
|
|
47
|
+
Message: 'Context user is required for Typeform API calls'
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
const companyId = this.getParamValue(params.Params, 'CompanyID');
|
|
51
|
+
const formId = this.getParamValue(params.Params, 'FormID');
|
|
52
|
+
if (!formId) {
|
|
53
|
+
return {
|
|
54
|
+
Success: false,
|
|
55
|
+
ResultCode: 'MISSING_FORM_ID',
|
|
56
|
+
Message: 'FormID parameter is required'
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
// Securely retrieve API token using company integration
|
|
60
|
+
const apiToken = await this.getSecureAPIToken(companyId, contextUser);
|
|
61
|
+
const since = this.getParamValue(params.Params, 'Since');
|
|
62
|
+
const until = this.getParamValue(params.Params, 'Until');
|
|
63
|
+
const completed = this.getParamValue(params.Params, 'Completed');
|
|
64
|
+
const includeMetadata = this.getParamValue(params.Params, 'IncludeMetadata') !== false;
|
|
65
|
+
const delimiter = this.getParamValue(params.Params, 'Delimiter') || ',';
|
|
66
|
+
const maxResponses = this.getParamValue(params.Params, 'MaxResponses') || 10000;
|
|
67
|
+
const tfResponses = await this.getAllTypeformResponses(formId, apiToken, {
|
|
68
|
+
since,
|
|
69
|
+
until,
|
|
70
|
+
completed,
|
|
71
|
+
maxResponses
|
|
72
|
+
});
|
|
73
|
+
if (tfResponses.length === 0) {
|
|
74
|
+
return {
|
|
75
|
+
Success: true,
|
|
76
|
+
ResultCode: 'NO_DATA',
|
|
77
|
+
Message: 'No responses found matching the criteria'
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
const responses = tfResponses.map(r => this.normalizeTypeformResponse(r));
|
|
81
|
+
const { csv, headers } = this.convertToCSV(responses, includeMetadata, delimiter);
|
|
82
|
+
const outputParams = [
|
|
83
|
+
{
|
|
84
|
+
Name: 'CSVData',
|
|
85
|
+
Type: 'Output',
|
|
86
|
+
Value: csv
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
Name: 'RowCount',
|
|
90
|
+
Type: 'Output',
|
|
91
|
+
Value: responses.length
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
Name: 'Headers',
|
|
95
|
+
Type: 'Output',
|
|
96
|
+
Value: headers
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
Name: 'ColumnCount',
|
|
100
|
+
Type: 'Output',
|
|
101
|
+
Value: headers.length
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
Name: 'FileSize',
|
|
105
|
+
Type: 'Output',
|
|
106
|
+
Value: Buffer.byteLength(csv, 'utf8')
|
|
107
|
+
}
|
|
108
|
+
];
|
|
109
|
+
for (const outputParam of outputParams) {
|
|
110
|
+
const existingParam = params.Params.find(p => p.Name === outputParam.Name);
|
|
111
|
+
if (existingParam) {
|
|
112
|
+
existingParam.Value = outputParam.Value;
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
params.Params.push(outputParam);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return {
|
|
119
|
+
Success: true,
|
|
120
|
+
ResultCode: 'SUCCESS',
|
|
121
|
+
Message: `Successfully exported ${responses.length} responses to CSV (${headers.length} columns, ${Buffer.byteLength(csv, 'utf8')} bytes)`
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
catch (error) {
|
|
125
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
126
|
+
return {
|
|
127
|
+
Success: false,
|
|
128
|
+
ResultCode: 'ERROR',
|
|
129
|
+
Message: this.buildFormErrorMessage('Export Typeform to CSV', errorMessage, error)
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
get Params() {
|
|
134
|
+
return [
|
|
135
|
+
{
|
|
136
|
+
Name: 'CompanyID',
|
|
137
|
+
Type: 'Input',
|
|
138
|
+
Value: null,
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
Name: 'FormID',
|
|
142
|
+
Type: 'Input',
|
|
143
|
+
Value: null,
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
Name: 'Since',
|
|
147
|
+
Type: 'Input',
|
|
148
|
+
Value: null,
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
Name: 'Until',
|
|
152
|
+
Type: 'Input',
|
|
153
|
+
Value: null,
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
Name: 'Completed',
|
|
157
|
+
Type: 'Input',
|
|
158
|
+
Value: null,
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
Name: 'IncludeMetadata',
|
|
162
|
+
Type: 'Input',
|
|
163
|
+
Value: true,
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
Name: 'Delimiter',
|
|
167
|
+
Type: 'Input',
|
|
168
|
+
Value: ',',
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
Name: 'MaxResponses',
|
|
172
|
+
Type: 'Input',
|
|
173
|
+
Value: 10000,
|
|
174
|
+
}
|
|
175
|
+
];
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
exports.ExportTypeformCSVAction = ExportTypeformCSVAction;
|
|
179
|
+
exports.ExportTypeformCSVAction = ExportTypeformCSVAction = __decorate([
|
|
180
|
+
(0, global_1.RegisterClass)(actions_1.BaseAction, 'Export Typeform Responses to CSV')
|
|
181
|
+
], ExportTypeformCSVAction);
|
|
182
|
+
//# sourceMappingURL=export-csv.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export-csv.action.js","sourceRoot":"","sources":["../../../../src/providers/typeform/actions/export-csv.action.ts"],"names":[],"mappings":";;;;;;;;;AAAA,mDAAuD;AACvD,kEAA6D;AAE7D,qDAAqD;AAErD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEI,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,yCAAkB;IAE3D,IAAW,WAAW;QAClB,OAAO,+JAA+J,CAAC;IAC3K,CAAC;IAES,KAAK,CAAC,iBAAiB,CAAC,MAAuB;QACrD,IAAI,CAAC;YACD,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;YACvC,IAAI,CAAC,WAAW,EAAE,CAAC;gBACf,OAAO;oBACH,OAAO,EAAE,KAAK;oBACd,UAAU,EAAE,sBAAsB;oBAClC,OAAO,EAAE,iDAAiD;iBAC7D,CAAC;YACN,CAAC;YAED,MAAM,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;YAEjE,MAAM,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;YAC3D,IAAI,CAAC,MAAM,EAAE,CAAC;gBACV,OAAO;oBACH,OAAO,EAAE,KAAK;oBACd,UAAU,EAAE,iBAAiB;oBAC7B,OAAO,EAAE,8BAA8B;iBAC1C,CAAC;YACN,CAAC;YAED,wDAAwD;YACxD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;YAEtE,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YACzD,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM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W,MAAM;QACb,OAAO;YACH;gBACI,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,IAAI;aACd;YACD;gBACI,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,IAAI;aACd;YACD;gBACI,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,IAAI;aACd;YACD;gBACI,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,IAAI;aACd;YACD;gBACI,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,IAAI;aACd;YACD;gBACI,IAAI,EAAE,iBAAiB;gBACvB,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,IAAI;aACd;YACD;gBACI,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,GAAG;aACb;YACD;gBACI,IAAI,EAAE,cAAc;gBACpB,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,KAAK;aACf;SACJ,CAAC;IACN,CAAC;CACJ,CAAA;AA1JY,0DAAuB;kCAAvB,uBAAuB;IADnC,IAAA,sBAAa,EAAC,oBAAU,EAAE,kCAAkC,CAAC;GACjD,uBAAuB,CA0JnC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { TypeformBaseAction } from '../typeform-base.action';
|
|
2
|
+
import { ActionParam, ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
|
|
3
|
+
/**
|
|
4
|
+
* Action to retrieve details of a Typeform including all fields, settings, and logic
|
|
5
|
+
*
|
|
6
|
+
* Security: API credentials are retrieved securely from Company Integrations table or environment variables.
|
|
7
|
+
* Never pass API tokens as action parameters.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* await runAction({
|
|
12
|
+
* ActionName: 'Get Typeform Details',
|
|
13
|
+
* Params: [{
|
|
14
|
+
* Name: 'CompanyID',
|
|
15
|
+
* Value: '12345'
|
|
16
|
+
* }, {
|
|
17
|
+
* Name: 'FormID',
|
|
18
|
+
* Value: 'abc123'
|
|
19
|
+
* }]
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare class GetTypeformAction extends TypeformBaseAction {
|
|
24
|
+
get Description(): string;
|
|
25
|
+
protected InternalRunAction(params: RunActionParams): Promise<ActionResultSimple>;
|
|
26
|
+
get Params(): ActionParam[];
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=get-form.action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-form.action.d.ts","sourceRoot":"","sources":["../../../../src/providers/typeform/actions/get-form.action.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAGhG;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBACa,iBAAkB,SAAQ,kBAAkB;IAErD,IAAW,WAAW,IAAI,MAAM,CAE/B;cAEe,iBAAiB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC;IA8HvF,IAAW,MAAM,IAAI,WAAW,EAAE,CAajC;CACJ"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.GetTypeformAction = void 0;
|
|
10
|
+
const global_1 = require("@memberjunction/global");
|
|
11
|
+
const typeform_base_action_1 = require("../typeform-base.action");
|
|
12
|
+
const actions_1 = require("@memberjunction/actions");
|
|
13
|
+
/**
|
|
14
|
+
* Action to retrieve details of a Typeform including all fields, settings, and logic
|
|
15
|
+
*
|
|
16
|
+
* Security: API credentials are retrieved securely from Company Integrations table or environment variables.
|
|
17
|
+
* Never pass API tokens as action parameters.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```typescript
|
|
21
|
+
* await runAction({
|
|
22
|
+
* ActionName: 'Get Typeform Details',
|
|
23
|
+
* Params: [{
|
|
24
|
+
* Name: 'CompanyID',
|
|
25
|
+
* Value: '12345'
|
|
26
|
+
* }, {
|
|
27
|
+
* Name: 'FormID',
|
|
28
|
+
* Value: 'abc123'
|
|
29
|
+
* }]
|
|
30
|
+
* });
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
let GetTypeformAction = class GetTypeformAction extends typeform_base_action_1.TypeformBaseAction {
|
|
34
|
+
get Description() {
|
|
35
|
+
return 'Retrieves complete details of a Typeform including title, fields, logic jumps, settings, theme, and metadata. Use this to inspect or backup form configurations.';
|
|
36
|
+
}
|
|
37
|
+
async InternalRunAction(params) {
|
|
38
|
+
try {
|
|
39
|
+
const contextUser = params.ContextUser;
|
|
40
|
+
if (!contextUser) {
|
|
41
|
+
return {
|
|
42
|
+
Success: false,
|
|
43
|
+
ResultCode: 'MISSING_CONTEXT_USER',
|
|
44
|
+
Message: 'Context user is required for Typeform API calls'
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
const companyId = this.getParamValue(params.Params, 'CompanyID');
|
|
48
|
+
const formId = this.getParamValue(params.Params, 'FormID');
|
|
49
|
+
if (!formId) {
|
|
50
|
+
return {
|
|
51
|
+
Success: false,
|
|
52
|
+
ResultCode: 'MISSING_FORM_ID',
|
|
53
|
+
Message: 'FormID parameter is required'
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
// Securely retrieve API token using company integration
|
|
57
|
+
const apiToken = await this.getSecureAPIToken(companyId, contextUser);
|
|
58
|
+
const response = await this.getAxiosInstance(apiToken).get(`/forms/${formId}`);
|
|
59
|
+
const form = response.data;
|
|
60
|
+
const fieldCount = form.fields?.length || 0;
|
|
61
|
+
const fieldTypes = form.fields?.map((f) => f.type) || [];
|
|
62
|
+
const uniqueFieldTypes = [...new Set(fieldTypes)];
|
|
63
|
+
const hasLogic = form.logic && form.logic.length > 0;
|
|
64
|
+
const hasHiddenFields = form.hidden && form.hidden.length > 0;
|
|
65
|
+
const summary = {
|
|
66
|
+
id: form.id,
|
|
67
|
+
title: form.title,
|
|
68
|
+
fieldCount,
|
|
69
|
+
uniqueFieldTypes,
|
|
70
|
+
hasLogic,
|
|
71
|
+
hasHiddenFields,
|
|
72
|
+
theme: form.theme_id || form.theme?.name,
|
|
73
|
+
workspace: form.workspace?.href,
|
|
74
|
+
createdAt: form._links?.display ? new Date() : undefined,
|
|
75
|
+
lastUpdated: form.last_updated_at ? new Date(form.last_updated_at) : undefined
|
|
76
|
+
};
|
|
77
|
+
const outputParams = [
|
|
78
|
+
{
|
|
79
|
+
Name: 'Form',
|
|
80
|
+
Type: 'Output',
|
|
81
|
+
Value: form
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
Name: 'FormID',
|
|
85
|
+
Type: 'Output',
|
|
86
|
+
Value: form.id
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
Name: 'Title',
|
|
90
|
+
Type: 'Output',
|
|
91
|
+
Value: form.title
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
Name: 'Fields',
|
|
95
|
+
Type: 'Output',
|
|
96
|
+
Value: form.fields
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
Name: 'FieldCount',
|
|
100
|
+
Type: 'Output',
|
|
101
|
+
Value: fieldCount
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
Name: 'Settings',
|
|
105
|
+
Type: 'Output',
|
|
106
|
+
Value: form.settings
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
Name: 'Logic',
|
|
110
|
+
Type: 'Output',
|
|
111
|
+
Value: form.logic
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
Name: 'Theme',
|
|
115
|
+
Type: 'Output',
|
|
116
|
+
Value: form.theme
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
Name: 'HiddenFields',
|
|
120
|
+
Type: 'Output',
|
|
121
|
+
Value: form.hidden
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
Name: 'Summary',
|
|
125
|
+
Type: 'Output',
|
|
126
|
+
Value: summary
|
|
127
|
+
}
|
|
128
|
+
];
|
|
129
|
+
for (const outputParam of outputParams) {
|
|
130
|
+
const existingParam = params.Params.find(p => p.Name === outputParam.Name);
|
|
131
|
+
if (existingParam) {
|
|
132
|
+
existingParam.Value = outputParam.Value;
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
params.Params.push(outputParam);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return {
|
|
139
|
+
Success: true,
|
|
140
|
+
ResultCode: 'SUCCESS',
|
|
141
|
+
Message: `Successfully retrieved form "${form.title}" with ${fieldCount} fields`
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
catch (error) {
|
|
145
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
146
|
+
return {
|
|
147
|
+
Success: false,
|
|
148
|
+
ResultCode: 'ERROR',
|
|
149
|
+
Message: this.buildFormErrorMessage('Get Typeform Details', errorMessage, error)
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
get Params() {
|
|
154
|
+
return [
|
|
155
|
+
{
|
|
156
|
+
Name: 'CompanyID',
|
|
157
|
+
Type: 'Input',
|
|
158
|
+
Value: null,
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
Name: 'FormID',
|
|
162
|
+
Type: 'Input',
|
|
163
|
+
Value: null,
|
|
164
|
+
}
|
|
165
|
+
];
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
exports.GetTypeformAction = GetTypeformAction;
|
|
169
|
+
exports.GetTypeformAction = GetTypeformAction = __decorate([
|
|
170
|
+
(0, global_1.RegisterClass)(actions_1.BaseAction, 'Get Typeform Details')
|
|
171
|
+
], GetTypeformAction);
|
|
172
|
+
//# sourceMappingURL=get-form.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-form.action.js","sourceRoot":"","sources":["../../../../src/providers/typeform/actions/get-form.action.ts"],"names":[],"mappings":";;;;;;;;;AAAA,mDAAuD;AACvD,kEAA6D;AAE7D,qDAAqD;AAErD;;;;;;;;;;;;;;;;;;;GAmBG;AAEI,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,yCAAkB;IAErD,IAAW,WAAW;QAClB,OAAO,kKAAkK,CAAC;IAC9K,CAAC;IAES,KAAK,CAAC,iBAAiB,CAAC,MAAuB;QACrD,IAAI,CAAC;YACD,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;YACvC,IAAI,CAAC,WAAW,EAAE,CAAC;gBACf,OAAO;oBACH,OAAO,EAAE,KAAK;oBACd,UAAU,EAAE,sBAAsB;oBAClC,OAAO,EAAE,iDAAiD;iBAC7D,CAAC;YACN,CAAC;YAED,MAAM,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;YAEjE,MAAM,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;YAC3D,IAAI,CAAC,MAAM,EAAE,CAAC;gBACV,OAAO;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