@memberjunction/actions-bizapps-formbuilders 4.0.0 → 4.2.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/.turbo/turbo-build.log
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @memberjunction/actions-bizapps-formbuilders
|
|
2
2
|
|
|
3
|
+
## 4.2.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- @memberjunction/actions-base@4.2.0
|
|
8
|
+
- @memberjunction/actions@4.2.0
|
|
9
|
+
- @memberjunction/core@4.2.0
|
|
10
|
+
- @memberjunction/core-entities@4.2.0
|
|
11
|
+
- @memberjunction/global@4.2.0
|
|
12
|
+
|
|
13
|
+
## 4.1.0
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- 9fab8ca: ESM Compatibility
|
|
18
|
+
- Updated dependencies [77839a9]
|
|
19
|
+
- Updated dependencies [2ea241f]
|
|
20
|
+
- Updated dependencies [5af036f]
|
|
21
|
+
- @memberjunction/core@4.1.0
|
|
22
|
+
- @memberjunction/core-entities@4.1.0
|
|
23
|
+
- @memberjunction/actions-base@4.1.0
|
|
24
|
+
- @memberjunction/actions@4.1.0
|
|
25
|
+
- @memberjunction/global@4.1.0
|
|
26
|
+
|
|
3
27
|
## 4.0.0
|
|
4
28
|
|
|
5
29
|
### Major Changes
|
package/README.md
CHANGED
|
@@ -1,238 +1,73 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# @memberjunction/actions-bizapps-formbuilders
|
|
2
|
+
|
|
3
|
+
Form builder and survey platform integration actions for MemberJunction. This package provides a unified interface across four major form/survey platforms, enabling AI agents, workflows, and applications to programmatically retrieve responses, analyze submissions, and manage forms through the MemberJunction Actions framework.
|
|
4
|
+
|
|
5
|
+
This package is part of the [BizApps Actions](../README.md) collection within the broader [MemberJunction Actions Framework](../../README.md). For core action architecture, design philosophy, and when to use actions versus direct code, see the [Actions CLAUDE.md](../../CLAUDE.md).
|
|
6
|
+
|
|
7
|
+
## Architecture
|
|
8
|
+
|
|
9
|
+
The package follows a three-tier class hierarchy: a shared base class providing common form operations, provider-specific base classes handling API authentication and data normalization, and individual action classes implementing specific operations.
|
|
10
|
+
|
|
11
|
+
```mermaid
|
|
12
|
+
graph TD
|
|
13
|
+
subgraph Framework["Actions Framework"]
|
|
14
|
+
BA["BaseAction<br/>@memberjunction/actions"]
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
subgraph Base["Shared Base Layer"]
|
|
18
|
+
BFBA["BaseFormBuilderAction<br/>Credential management, CSV export,<br/>statistics helpers, response normalization"]
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
subgraph Providers["Provider Base Classes"]
|
|
22
|
+
TF["TypeformBaseAction<br/>Bearer token auth<br/>Axios + rate limiting"]
|
|
23
|
+
JF["JotFormBaseAction<br/>API key (query param)<br/>Regional endpoints"]
|
|
24
|
+
SM["SurveyMonkeyBaseAction<br/>OAuth 2.0 Bearer<br/>Paginated responses"]
|
|
25
|
+
GF["GoogleFormsBaseAction<br/>OAuth 2.0 Bearer<br/>Read-only API"]
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
subgraph Actions["Action Classes (34 total)"]
|
|
29
|
+
TFA["Typeform Actions (10)"]
|
|
30
|
+
JFA["JotForm Actions (8)"]
|
|
31
|
+
SMA["SurveyMonkey Actions (8)"]
|
|
32
|
+
GFA["Google Forms Actions (4)"]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
subgraph Shared["Shared Utilities"]
|
|
36
|
+
FCP["FileContentProcessor<br/>PDF, Excel, Word,<br/>image extraction"]
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
BA --> BFBA
|
|
40
|
+
BFBA --> TF
|
|
41
|
+
BFBA --> JF
|
|
42
|
+
BFBA --> SM
|
|
43
|
+
BFBA --> GF
|
|
44
|
+
TF --> TFA
|
|
45
|
+
JF --> JFA
|
|
46
|
+
SM --> SMA
|
|
47
|
+
GF --> GFA
|
|
48
|
+
TFA -.-> FCP
|
|
49
|
+
|
|
50
|
+
style Framework fill:#64748b,stroke:#475569,color:#fff
|
|
51
|
+
style Base fill:#2d6a9f,stroke:#1a4971,color:#fff
|
|
52
|
+
style TF fill:#7c5295,stroke:#563a6b,color:#fff
|
|
53
|
+
style JF fill:#7c5295,stroke:#563a6b,color:#fff
|
|
54
|
+
style SM fill:#7c5295,stroke:#563a6b,color:#fff
|
|
55
|
+
style GF fill:#7c5295,stroke:#563a6b,color:#fff
|
|
56
|
+
style TFA fill:#2d8659,stroke:#1a5c3a,color:#fff
|
|
57
|
+
style JFA fill:#2d8659,stroke:#1a5c3a,color:#fff
|
|
58
|
+
style SMA fill:#2d8659,stroke:#1a5c3a,color:#fff
|
|
59
|
+
style GFA fill:#2d8659,stroke:#1a5c3a,color:#fff
|
|
60
|
+
style FCP fill:#b8762f,stroke:#8a5722,color:#fff
|
|
61
|
+
```
|
|
4
62
|
|
|
5
63
|
## Supported Platforms
|
|
6
64
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
### ✅ JotForm (Implemented)
|
|
14
|
-
Complete integration with JotForm's Submissions API and Form API.
|
|
15
|
-
- **8 Actions**: Get submissions, get single submission, get statistics, export CSV, watch new submissions, get form details, create form, update form
|
|
16
|
-
- **Authentication**: API key (query parameter)
|
|
17
|
-
- **Regional Support**: US, EU, and HIPAA endpoints
|
|
18
|
-
- **Capabilities**: Full CRUD - read submissions and manage forms
|
|
19
|
-
|
|
20
|
-
### ✅ SurveyMonkey (Implemented)
|
|
21
|
-
Complete integration with SurveyMonkey's Responses API and Surveys API.
|
|
22
|
-
- **8 Actions**: Get responses, get single response, get statistics, export CSV, watch new responses, get survey details, create survey, update survey
|
|
23
|
-
- **Authentication**: OAuth 2.0 access token
|
|
24
|
-
- **Capabilities**: Full CRUD - read responses and manage surveys
|
|
25
|
-
|
|
26
|
-
### ✅ Google Forms (Implemented)
|
|
27
|
-
Read-only integration with Google Forms API.
|
|
28
|
-
- **5 Actions**: Get responses, get single response, get statistics, export CSV, get form details
|
|
29
|
-
- **Authentication**: OAuth 2.0 access token with Google Cloud credentials
|
|
30
|
-
- **Capabilities**: Read-only - retrieve responses and form configuration (no create/update API available)
|
|
31
|
-
- **Integration**: Works seamlessly with Google Workspace
|
|
32
|
-
|
|
33
|
-
### 🔜 Future Platforms
|
|
34
|
-
|
|
35
|
-
#### Microsoft Forms
|
|
36
|
-
**Why**: Seamless Microsoft 365 integration
|
|
37
|
-
- Forms and quizzes
|
|
38
|
-
- Excel export
|
|
39
|
-
- Teams integration
|
|
40
|
-
- Education features
|
|
41
|
-
- **Note**: No official public API currently available
|
|
42
|
-
|
|
43
|
-
#### Formstack
|
|
44
|
-
**Why**: Enterprise workflow automation
|
|
45
|
-
- Document generation
|
|
46
|
-
- Salesforce integration
|
|
47
|
-
- HIPAA compliance
|
|
48
|
-
- Advanced routing
|
|
49
|
-
|
|
50
|
-
#### Wufoo
|
|
51
|
-
**Why**: User-friendly with strong reporting
|
|
52
|
-
- Payment processing
|
|
53
|
-
- Report designer
|
|
54
|
-
- Entry management
|
|
55
|
-
- Custom themes
|
|
56
|
-
|
|
57
|
-
#### Typeform Alternatives
|
|
58
|
-
- **Tally** - Open-source, free alternative
|
|
59
|
-
- **Fillout** - Modern, flexible forms
|
|
60
|
-
- **Paperform** - Long-form capable
|
|
61
|
-
|
|
62
|
-
---
|
|
63
|
-
|
|
64
|
-
## Typeform Actions
|
|
65
|
-
|
|
66
|
-
### Response Actions
|
|
67
|
-
|
|
68
|
-
#### 1. Get Typeform Responses
|
|
69
|
-
Retrieve responses with comprehensive filtering options.
|
|
70
|
-
|
|
71
|
-
**Parameters:**
|
|
72
|
-
- `FormID` - Typeform form ID
|
|
73
|
-
- `APIToken` - Personal access token
|
|
74
|
-
- `PageSize` - Results per page (1-1000)
|
|
75
|
-
- `Since` / `Until` - Date range filters
|
|
76
|
-
- `Completed` - Filter by completion status
|
|
77
|
-
- `Sort` - Order results
|
|
78
|
-
- `Query` - Text search
|
|
79
|
-
- `GetAllPages` - Auto-paginate through all responses
|
|
80
|
-
|
|
81
|
-
**Use Cases:**
|
|
82
|
-
- Data analysis and reporting
|
|
83
|
-
- CRM integration
|
|
84
|
-
- Response monitoring
|
|
85
|
-
- Workflow triggers
|
|
86
|
-
|
|
87
|
-
---
|
|
88
|
-
|
|
89
|
-
#### 2. Get Single Typeform Response
|
|
90
|
-
Retrieve specific response by token.
|
|
91
|
-
|
|
92
|
-
**Parameters:**
|
|
93
|
-
- `FormID` - Form ID
|
|
94
|
-
- `ResponseToken` - Unique response identifier
|
|
95
|
-
- `APIToken` - Access token
|
|
96
|
-
|
|
97
|
-
**Use Cases:**
|
|
98
|
-
- Response lookup
|
|
99
|
-
- Detail verification
|
|
100
|
-
- Follow-up workflows
|
|
101
|
-
|
|
102
|
-
---
|
|
103
|
-
|
|
104
|
-
#### 3. Get Typeform Response Statistics
|
|
105
|
-
Calculate aggregate analytics from responses.
|
|
106
|
-
|
|
107
|
-
**Parameters:**
|
|
108
|
-
- `FormID` - Form ID
|
|
109
|
-
- `APIToken` - Access token
|
|
110
|
-
- `Since` / `Until` - Analysis date range
|
|
111
|
-
- `IncludeTopAnswers` - Popular answers analysis
|
|
112
|
-
- `MaxResponses` - Analysis limit
|
|
113
|
-
|
|
114
|
-
**Output:**
|
|
115
|
-
- Total/completed/partial counts
|
|
116
|
-
- Completion rate
|
|
117
|
-
- Daily/hourly distribution
|
|
118
|
-
- Popular answers by field
|
|
119
|
-
|
|
120
|
-
**Use Cases:**
|
|
121
|
-
- Dashboard reporting
|
|
122
|
-
- Form performance analysis
|
|
123
|
-
- A/B testing insights
|
|
124
|
-
- Trend identification
|
|
125
|
-
|
|
126
|
-
---
|
|
127
|
-
|
|
128
|
-
#### 4. Export Typeform Responses to CSV
|
|
129
|
-
Convert responses to CSV format.
|
|
130
|
-
|
|
131
|
-
**Parameters:**
|
|
132
|
-
- `FormID` - Form ID
|
|
133
|
-
- `APIToken` - Access token
|
|
134
|
-
- `Since` / `Until` - Date range
|
|
135
|
-
- `IncludeMetadata` - Include browser/platform data
|
|
136
|
-
- `Delimiter` - CSV separator
|
|
137
|
-
|
|
138
|
-
**Use Cases:**
|
|
139
|
-
- Excel/Google Sheets import
|
|
140
|
-
- Data archival
|
|
141
|
-
- Third-party tool integration
|
|
142
|
-
- Backup creation
|
|
143
|
-
|
|
144
|
-
---
|
|
145
|
-
|
|
146
|
-
#### 5. Watch for New Typeform Responses
|
|
147
|
-
Poll for new submissions since last check.
|
|
148
|
-
|
|
149
|
-
**Parameters:**
|
|
150
|
-
- `FormID` - Form ID
|
|
151
|
-
- `APIToken` - Access token
|
|
152
|
-
- `LastCheckedTimestamp` - Previous check time
|
|
153
|
-
- `OnlyCompleted` - Filter partial responses
|
|
154
|
-
|
|
155
|
-
**Use Cases:**
|
|
156
|
-
- Real-time notifications
|
|
157
|
-
- Workflow automation
|
|
158
|
-
- Auto-responders
|
|
159
|
-
- CRM sync triggers
|
|
160
|
-
|
|
161
|
-
---
|
|
162
|
-
|
|
163
|
-
### Form Management Actions
|
|
164
|
-
|
|
165
|
-
#### 6. Get Typeform Details
|
|
166
|
-
Retrieve complete form configuration.
|
|
167
|
-
|
|
168
|
-
**Parameters:**
|
|
169
|
-
- `FormID` - Form ID
|
|
170
|
-
- `APIToken` - Access token
|
|
171
|
-
|
|
172
|
-
**Output:**
|
|
173
|
-
- Title, fields, settings
|
|
174
|
-
- Logic jumps
|
|
175
|
-
- Theme configuration
|
|
176
|
-
- Hidden fields
|
|
177
|
-
- Workspace info
|
|
178
|
-
|
|
179
|
-
**Use Cases:**
|
|
180
|
-
- Form backup
|
|
181
|
-
- Configuration inspection
|
|
182
|
-
- Template creation
|
|
183
|
-
- Migration prep
|
|
184
|
-
|
|
185
|
-
---
|
|
186
|
-
|
|
187
|
-
#### 7. Create Typeform
|
|
188
|
-
Create new forms programmatically.
|
|
189
|
-
|
|
190
|
-
**Parameters:**
|
|
191
|
-
- `APIToken` - Access token with create permissions
|
|
192
|
-
- `Title` - Form title
|
|
193
|
-
- `Fields` - Array of field definitions
|
|
194
|
-
- `Settings` - Form settings (optional)
|
|
195
|
-
- `Logic` - Conditional logic (optional)
|
|
196
|
-
- `ThemeID` - Visual theme (optional)
|
|
197
|
-
- `WorkspaceID` - Workspace assignment (optional)
|
|
198
|
-
|
|
199
|
-
**Field Types Supported:**
|
|
200
|
-
- `short_text`, `long_text`, `email`, `number`
|
|
201
|
-
- `dropdown`, `multiple_choice`, `yes_no`
|
|
202
|
-
- `rating`, `opinion_scale`, `date`
|
|
203
|
-
- `phone_number`, `website`, `file_upload`
|
|
204
|
-
- `payment`, `legal`, `matrix`, `ranking`, `picture_choice`
|
|
205
|
-
|
|
206
|
-
**Use Cases:**
|
|
207
|
-
- Dynamic form generation
|
|
208
|
-
- Template instantiation
|
|
209
|
-
- AI-generated surveys
|
|
210
|
-
- Event registration automation
|
|
211
|
-
|
|
212
|
-
---
|
|
213
|
-
|
|
214
|
-
#### 8. Update Typeform
|
|
215
|
-
Modify existing forms safely.
|
|
216
|
-
|
|
217
|
-
**Parameters:**
|
|
218
|
-
- `FormID` - Form to update
|
|
219
|
-
- `APIToken` - Access token
|
|
220
|
-
- `MergeWithExisting` - Safe update mode (default: true)
|
|
221
|
-
- `Title` - New title (optional)
|
|
222
|
-
- `Fields` - Updated fields (optional)
|
|
223
|
-
- `Settings` - Updated settings (optional)
|
|
224
|
-
|
|
225
|
-
**⚠️ Important:**
|
|
226
|
-
- `MergeWithExisting=true` - Fetches current form and merges changes (SAFE)
|
|
227
|
-
- `MergeWithExisting=false` - Replaces entire form (DANGEROUS - omitted fields are deleted)
|
|
228
|
-
|
|
229
|
-
**Use Cases:**
|
|
230
|
-
- Form title updates
|
|
231
|
-
- Adding/removing fields
|
|
232
|
-
- Settings adjustments
|
|
233
|
-
- Logic jump modifications
|
|
234
|
-
|
|
235
|
-
---
|
|
65
|
+
| Platform | Auth Method | Actions | Capabilities |
|
|
66
|
+
|----------|------------|---------|-------------|
|
|
67
|
+
| **Typeform** | Bearer token (personal access token) | 10 | Full CRUD: responses, forms, file content |
|
|
68
|
+
| **JotForm** | API key (query parameter) | 8 | Full CRUD: submissions, forms |
|
|
69
|
+
| **SurveyMonkey** | OAuth 2.0 Bearer token | 8 | Full CRUD: responses, surveys, collectors |
|
|
70
|
+
| **Google Forms** | OAuth 2.0 Bearer token | 4 | Read-only: responses, form details |
|
|
236
71
|
|
|
237
72
|
## Installation
|
|
238
73
|
|
|
@@ -240,259 +75,323 @@ Modify existing forms safely.
|
|
|
240
75
|
npm install @memberjunction/actions-bizapps-formbuilders
|
|
241
76
|
```
|
|
242
77
|
|
|
243
|
-
|
|
78
|
+
This package is part of the MemberJunction monorepo. When working within the monorepo, add the dependency to your package's `package.json` and run `npm install` at the repository root.
|
|
79
|
+
|
|
80
|
+
## Actions Reference
|
|
81
|
+
|
|
82
|
+
### Typeform Actions (10)
|
|
83
|
+
|
|
84
|
+
| Action Class | Registration Name | Description |
|
|
85
|
+
|-------------|------------------|-------------|
|
|
86
|
+
| `GetTypeformResponsesAction` | `GetTypeformResponsesAction` | Retrieve responses with filtering, pagination, and auto-paginate support |
|
|
87
|
+
| `GetSingleTypeformResponseAction` | `GetSingleTypeformResponseAction` | Retrieve a specific response by token |
|
|
88
|
+
| `GetTypeformStatisticsAction` | `GetTypeformStatisticsAction` | Calculate aggregate analytics (completion rates, distributions, top answers) |
|
|
89
|
+
| `ExportTypeformCSVAction` | `ExportTypeformCSVAction` | Export responses to CSV format with optional metadata |
|
|
90
|
+
| `WatchNewTypeformResponsesAction` | `WatchNewTypeformResponsesAction` | Poll for new submissions since a given timestamp |
|
|
91
|
+
| `GetTypeformAction` | `GetTypeformAction` | Retrieve complete form configuration and field definitions |
|
|
92
|
+
| `GetTypeformFormsAction` | `GetTypeformFormsAction` | List all forms in a workspace |
|
|
93
|
+
| `TypeformGetFileContentAction` | `TypeformGetFileContentAction` | Download and process file upload answers (PDF, Excel, Word, images) |
|
|
94
|
+
| `CreateTypeformAction` | `CreateTypeformAction` | Create new forms programmatically with fields, settings, and logic |
|
|
95
|
+
| `UpdateTypeformAction` | `UpdateTypeformAction` | Modify existing forms with safe merge mode |
|
|
96
|
+
|
|
97
|
+
### JotForm Actions (8)
|
|
98
|
+
|
|
99
|
+
| Action Class | Registration Name | Description |
|
|
100
|
+
|-------------|------------------|-------------|
|
|
101
|
+
| `GetJotFormSubmissionsAction` | `GetJotFormSubmissionsAction` | Retrieve submissions with filtering and pagination |
|
|
102
|
+
| `GetSingleJotFormSubmissionAction` | `GetSingleJotFormSubmissionAction` | Retrieve a specific submission by ID |
|
|
103
|
+
| `GetJotFormStatisticsAction` | `GetJotFormStatisticsAction` | Calculate aggregate analytics from submissions |
|
|
104
|
+
| `ExportJotFormCSVAction` | `ExportJotFormCSVAction` | Export submissions to CSV format |
|
|
105
|
+
| `WatchNewJotFormSubmissionsAction` | `WatchNewJotFormSubmissionsAction` | Poll for new submissions since a given timestamp |
|
|
106
|
+
| `GetJotFormAction` | `GetJotFormAction` | Retrieve form details and questions |
|
|
107
|
+
| `CreateJotFormAction` | `CreateJotFormAction` | Create new forms with questions and properties |
|
|
108
|
+
| `UpdateJotFormAction` | `UpdateJotFormAction` | Modify existing form configuration |
|
|
109
|
+
|
|
110
|
+
### SurveyMonkey Actions (8)
|
|
111
|
+
|
|
112
|
+
| Action Class | Registration Name | Description |
|
|
113
|
+
|-------------|------------------|-------------|
|
|
114
|
+
| `GetSurveyMonkeyResponsesAction` | `GetSurveyMonkeyResponsesAction` | Retrieve responses with date range and status filtering |
|
|
115
|
+
| `GetSingleSurveyMonkeyResponseAction` | `GetSingleSurveyMonkeyResponseAction` | Retrieve a specific response by ID |
|
|
116
|
+
| `GetSurveyMonkeyStatisticsAction` | `GetSurveyMonkeyStatisticsAction` | Calculate aggregate analytics from responses |
|
|
117
|
+
| `ExportSurveyMonkeyCSVAction` | `ExportSurveyMonkeyCSVAction` | Export responses to CSV format |
|
|
118
|
+
| `WatchNewSurveyMonkeyResponsesAction` | `WatchNewSurveyMonkeyResponsesAction` | Poll for new responses since a given timestamp |
|
|
119
|
+
| `GetSurveyMonkeyAction` | `GetSurveyMonkeyAction` | Retrieve survey details and configuration |
|
|
120
|
+
| `CreateSurveyMonkeyAction` | `CreateSurveyMonkeyAction` | Create new surveys with pages and questions |
|
|
121
|
+
| `UpdateSurveyMonkeyAction` | `UpdateSurveyMonkeyAction` | Modify existing survey properties |
|
|
122
|
+
|
|
123
|
+
### Google Forms Actions (4)
|
|
124
|
+
|
|
125
|
+
| Action Class | Registration Name | Description |
|
|
126
|
+
|-------------|------------------|-------------|
|
|
127
|
+
| `GetSingleGoogleFormsResponseAction` | `GetSingleGoogleFormsResponseAction` | Retrieve a specific response by ID |
|
|
128
|
+
| `GetGoogleFormsStatisticsAction` | `GetGoogleFormsStatisticsAction` | Calculate aggregate analytics from responses |
|
|
129
|
+
| `ExportGoogleFormsCSVAction` | `ExportGoogleFormsCSVAction` | Export responses to CSV format |
|
|
130
|
+
| `GetGoogleFormAction` | `GetGoogleFormAction` | Retrieve form details, questions, and quiz settings |
|
|
131
|
+
|
|
132
|
+
> **Note**: Google Forms API is read-only. There are no endpoints for creating or updating forms programmatically.
|
|
133
|
+
|
|
134
|
+
## Common Data Model
|
|
135
|
+
|
|
136
|
+
All providers normalize their responses into a shared `FormResponse` interface, enabling provider-agnostic processing downstream.
|
|
137
|
+
|
|
138
|
+
```mermaid
|
|
139
|
+
classDiagram
|
|
140
|
+
class FormResponse {
|
|
141
|
+
+string responseId
|
|
142
|
+
+string formId
|
|
143
|
+
+Date submittedAt
|
|
144
|
+
+boolean completed
|
|
145
|
+
+FormAnswer[] answerDetails
|
|
146
|
+
+Record answers
|
|
147
|
+
+metadata
|
|
148
|
+
+calculatedFields
|
|
149
|
+
+hiddenFields
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
class FormAnswer {
|
|
153
|
+
+string fieldId
|
|
154
|
+
+string fieldType
|
|
155
|
+
+string question
|
|
156
|
+
+answer
|
|
157
|
+
+string[] choices
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
class FormStatistics {
|
|
161
|
+
+number totalResponses
|
|
162
|
+
+number completedResponses
|
|
163
|
+
+number partialResponses
|
|
164
|
+
+number completionRate
|
|
165
|
+
+number averageCompletionTime
|
|
166
|
+
+Record responsesByDate
|
|
167
|
+
+topAnswers
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
FormResponse --> FormAnswer : answerDetails
|
|
171
|
+
|
|
172
|
+
style FormResponse fill:#2d6a9f,stroke:#1a4971,color:#fff
|
|
173
|
+
style FormAnswer fill:#7c5295,stroke:#563a6b,color:#fff
|
|
174
|
+
style FormStatistics fill:#2d8659,stroke:#1a5c3a,color:#fff
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Authentication and Credentials
|
|
178
|
+
|
|
179
|
+
All form builder actions use a secure credential resolution chain. Credentials are never passed as direct action parameters; instead, they are resolved from environment variables or the MemberJunction `Company Integrations` entity.
|
|
244
180
|
|
|
245
|
-
###
|
|
181
|
+
### Credential Resolution Order
|
|
246
182
|
|
|
247
|
-
1.
|
|
248
|
-
2.
|
|
249
|
-
3.
|
|
250
|
-
- `forms:read` - Read form responses
|
|
251
|
-
- `forms:write` - Create/update forms
|
|
252
|
-
- `responses:read` - Read form responses
|
|
183
|
+
1. **Environment variables** (company-specific): `BIZAPPS_{PROVIDER}_{COMPANY_ID}_{CREDENTIAL_TYPE}`
|
|
184
|
+
2. **Environment variables** (default): `BIZAPPS_{PROVIDER}_{CREDENTIAL_TYPE}`
|
|
185
|
+
3. **Database** (Company Integrations entity): `AccessToken`, `APIKey` fields
|
|
253
186
|
|
|
254
|
-
### Environment
|
|
187
|
+
### Environment Variable Examples
|
|
255
188
|
|
|
256
189
|
```bash
|
|
257
|
-
|
|
190
|
+
# Typeform - Personal access token
|
|
191
|
+
export BIZAPPS_TYPEFORM_API_TOKEN=tfp_your_token_here
|
|
192
|
+
export BIZAPPS_TYPEFORM_12345_API_TOKEN=tfp_company_specific_token
|
|
193
|
+
|
|
194
|
+
# JotForm - API key
|
|
195
|
+
export BIZAPPS_JOTFORM_API_KEY=your_jotform_api_key
|
|
196
|
+
export BIZAPPS_JOTFORM_12345_API_KEY=company_specific_key
|
|
197
|
+
|
|
198
|
+
# SurveyMonkey - OAuth 2.0 access token
|
|
199
|
+
export BIZAPPS_SURVEYMONKEY_ACCESS_TOKEN=your_oauth_token
|
|
200
|
+
|
|
201
|
+
# Google Forms - OAuth 2.0 access token
|
|
202
|
+
export BIZAPPS_GOOGLE_FORMS_ACCESS_TOKEN=your_google_oauth_token
|
|
203
|
+
|
|
204
|
+
# OAuth2 client credentials (for token refresh)
|
|
205
|
+
export BIZAPPS_TYPEFORM_CLIENT_ID=your_client_id
|
|
206
|
+
export BIZAPPS_TYPEFORM_CLIENT_SECRET=your_client_secret
|
|
258
207
|
```
|
|
259
208
|
|
|
260
|
-
### Database Configuration
|
|
209
|
+
### Database Configuration
|
|
210
|
+
|
|
211
|
+
Store credentials in the `Company Integrations` entity linked to the appropriate Integration record:
|
|
261
212
|
|
|
262
|
-
|
|
213
|
+
```sql
|
|
214
|
+
-- 1. Create Integration record for the platform
|
|
215
|
+
INSERT INTO Integration (Name, Description, NavigationBaseURL, ClassName)
|
|
216
|
+
VALUES ('Typeform', 'Typeform form builder', 'https://api.typeform.com', 'TypeformIntegration');
|
|
263
217
|
|
|
264
|
-
|
|
218
|
+
-- 2. Link to Company with credentials
|
|
219
|
+
INSERT INTO CompanyIntegration (CompanyID, IntegrationID, AccessToken, IsActive)
|
|
220
|
+
VALUES (@CompanyID, @IntegrationID, 'tfp_your_token', 1);
|
|
221
|
+
```
|
|
265
222
|
|
|
266
223
|
## Usage Examples
|
|
267
224
|
|
|
268
|
-
###
|
|
225
|
+
### Retrieving Form Responses
|
|
269
226
|
|
|
270
227
|
```typescript
|
|
271
|
-
import {
|
|
272
|
-
import { AIPromptRunner } from '@memberjunction/ai-prompts';
|
|
273
|
-
|
|
274
|
-
// Get recent responses
|
|
275
|
-
const getResponsesResult = await runAction({
|
|
276
|
-
ActionName: 'Get Typeform Responses',
|
|
277
|
-
Params: [
|
|
278
|
-
{ Name: 'FormID', Value: 'abc123' },
|
|
279
|
-
{ Name: 'APIToken', Value: 'tfp_...' },
|
|
280
|
-
{ Name: 'Since', Value: '2024-01-01T00:00:00Z' },
|
|
281
|
-
{ Name: 'GetAllPages', Value: true }
|
|
282
|
-
]
|
|
283
|
-
});
|
|
228
|
+
import { ActionEngineServer } from '@memberjunction/actions';
|
|
284
229
|
|
|
285
|
-
const
|
|
230
|
+
const engine = ActionEngineServer.Instance;
|
|
286
231
|
|
|
287
|
-
//
|
|
288
|
-
const
|
|
289
|
-
|
|
290
|
-
|
|
232
|
+
// Get Typeform responses with date filtering
|
|
233
|
+
const result = await engine.RunAction({
|
|
234
|
+
Action: engine.Actions.find(a => a.Name === 'Get Typeform Responses'),
|
|
235
|
+
Params: [
|
|
236
|
+
{ Name: 'CompanyID', Type: 'Input', Value: 'company-123' },
|
|
237
|
+
{ Name: 'FormID', Type: 'Input', Value: 'abc123' },
|
|
238
|
+
{ Name: 'Since', Type: 'Input', Value: '2024-01-01T00:00:00Z' },
|
|
239
|
+
{ Name: 'GetAllPages', Type: 'Input', Value: true }
|
|
240
|
+
],
|
|
241
|
+
ContextUser: currentUser
|
|
291
242
|
});
|
|
243
|
+
|
|
244
|
+
if (result.Success) {
|
|
245
|
+
const responses = result.Params.find(p => p.Name === 'Responses')?.Value;
|
|
246
|
+
console.log(`Retrieved ${responses.length} responses`);
|
|
247
|
+
}
|
|
292
248
|
```
|
|
293
249
|
|
|
294
|
-
###
|
|
250
|
+
### Exporting Responses to CSV
|
|
295
251
|
|
|
296
252
|
```typescript
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
},
|
|
306
|
-
{
|
|
307
|
-
type: 'email',
|
|
308
|
-
title: 'What is your email address?',
|
|
309
|
-
ref: 'email',
|
|
310
|
-
validations: { required: true }
|
|
311
|
-
},
|
|
312
|
-
{
|
|
313
|
-
type: 'rating',
|
|
314
|
-
title: 'How satisfied are you with our product?',
|
|
315
|
-
ref: 'satisfaction',
|
|
316
|
-
properties: {
|
|
317
|
-
steps: 5,
|
|
318
|
-
shape: 'star'
|
|
319
|
-
}
|
|
320
|
-
},
|
|
321
|
-
{
|
|
322
|
-
type: 'long_text',
|
|
323
|
-
title: 'What could we improve?',
|
|
324
|
-
ref: 'feedback'
|
|
325
|
-
}
|
|
326
|
-
],
|
|
327
|
-
settings: {
|
|
328
|
-
is_public: true,
|
|
329
|
-
show_progress_bar: true,
|
|
330
|
-
show_typeform_branding: false
|
|
331
|
-
}
|
|
332
|
-
};
|
|
333
|
-
|
|
334
|
-
const result = await runAction({
|
|
335
|
-
ActionName: 'Create Typeform',
|
|
336
|
-
Params: [
|
|
337
|
-
{ Name: 'APIToken', Value: 'tfp_...' },
|
|
338
|
-
{ Name: 'Title', Value: formData.title },
|
|
339
|
-
{ Name: 'Fields', Value: formData.fields },
|
|
340
|
-
{ Name: 'Settings', Value: formData.settings }
|
|
341
|
-
]
|
|
253
|
+
const exportResult = await engine.RunAction({
|
|
254
|
+
Action: engine.Actions.find(a => a.Name === 'Export JotForm Responses to CSV'),
|
|
255
|
+
Params: [
|
|
256
|
+
{ Name: 'CompanyID', Type: 'Input', Value: 'company-123' },
|
|
257
|
+
{ Name: 'FormID', Type: 'Input', Value: '240123456789' },
|
|
258
|
+
{ Name: 'IncludeMetadata', Type: 'Input', Value: true }
|
|
259
|
+
],
|
|
260
|
+
ContextUser: currentUser
|
|
342
261
|
});
|
|
343
262
|
|
|
344
|
-
const
|
|
345
|
-
console.log(`Form created: ${formUrl}`);
|
|
263
|
+
const csvData = exportResult.Params.find(p => p.Name === 'CSVData')?.Value;
|
|
346
264
|
```
|
|
347
265
|
|
|
348
|
-
###
|
|
266
|
+
### Creating a Form Programmatically
|
|
349
267
|
|
|
350
268
|
```typescript
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
const result = await runAction({
|
|
354
|
-
ActionName: 'Watch for New Typeform Responses',
|
|
269
|
+
const createResult = await engine.RunAction({
|
|
270
|
+
Action: engine.Actions.find(a => a.Name === 'Create Typeform'),
|
|
355
271
|
Params: [
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
272
|
+
{ Name: 'CompanyID', Type: 'Input', Value: 'company-123' },
|
|
273
|
+
{ Name: 'Title', Type: 'Input', Value: 'Customer Feedback Survey' },
|
|
274
|
+
{
|
|
275
|
+
Name: 'Fields', Type: 'Input', Value: [
|
|
276
|
+
{
|
|
277
|
+
type: 'short_text',
|
|
278
|
+
title: 'What is your name?',
|
|
279
|
+
ref: 'name'
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
type: 'rating',
|
|
283
|
+
title: 'How satisfied are you?',
|
|
284
|
+
ref: 'satisfaction',
|
|
285
|
+
properties: { steps: 5, shape: 'star' }
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
type: 'long_text',
|
|
289
|
+
title: 'Any additional feedback?',
|
|
290
|
+
ref: 'feedback'
|
|
291
|
+
}
|
|
292
|
+
]
|
|
293
|
+
}
|
|
294
|
+
],
|
|
295
|
+
ContextUser: currentUser
|
|
296
|
+
});
|
|
375
297
|
|
|
376
|
-
|
|
377
|
-
lastChecked = result.Params.find(p => p.Name === 'LastChecked').Value;
|
|
378
|
-
}
|
|
379
|
-
}, 5 * 60 * 1000); // Every 5 minutes
|
|
298
|
+
const formUrl = createResult.Params.find(p => p.Name === 'FormURL')?.Value;
|
|
380
299
|
```
|
|
381
300
|
|
|
382
|
-
###
|
|
301
|
+
### Watching for New Responses
|
|
383
302
|
|
|
384
303
|
```typescript
|
|
385
|
-
//
|
|
386
|
-
const
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
304
|
+
// Poll for new SurveyMonkey responses
|
|
305
|
+
const watchResult = await engine.RunAction({
|
|
306
|
+
Action: engine.Actions.find(a => a.Name === 'Watch for New SurveyMonkey Responses'),
|
|
307
|
+
Params: [
|
|
308
|
+
{ Name: 'CompanyID', Type: 'Input', Value: 'company-123' },
|
|
309
|
+
{ Name: 'SurveyID', Type: 'Input', Value: 'survey-456' },
|
|
310
|
+
{ Name: 'LastCheckedTimestamp', Type: 'Input', Value: '2024-06-01T00:00:00Z' },
|
|
311
|
+
{ Name: 'OnlyCompleted', Type: 'Input', Value: true }
|
|
312
|
+
],
|
|
313
|
+
ContextUser: currentUser
|
|
394
314
|
});
|
|
395
315
|
|
|
396
|
-
const
|
|
316
|
+
const hasNew = watchResult.Params.find(p => p.Name === 'HasNewResponses')?.Value;
|
|
317
|
+
const newResponses = watchResult.Params.find(p => p.Name === 'NewResponses')?.Value;
|
|
318
|
+
```
|
|
397
319
|
|
|
398
|
-
|
|
399
|
-
await fs.writeFile('responses.csv', csvData);
|
|
320
|
+
## File Content Processing
|
|
400
321
|
|
|
401
|
-
|
|
402
|
-
const statsResult = await runAction({
|
|
403
|
-
ActionName: 'Get Typeform Response Statistics',
|
|
404
|
-
Params: [
|
|
405
|
-
{ Name: 'FormID', Value: 'abc123' },
|
|
406
|
-
{ Name: 'APIToken', Value: 'tfp_...' },
|
|
407
|
-
{ Name: 'Since', Value: '2024-01-01T00:00:00Z' },
|
|
408
|
-
{ Name: 'IncludeTopAnswers', Value: true }
|
|
409
|
-
]
|
|
410
|
-
});
|
|
411
|
-
|
|
412
|
-
const stats = statsResult.Params.find(p => p.Name === 'Statistics').Value;
|
|
413
|
-
console.log(`Completion Rate: ${stats.completionRate}%`);
|
|
414
|
-
console.log(`Total Responses: ${stats.totalResponses}`);
|
|
415
|
-
```
|
|
322
|
+
The package includes a `FileContentProcessor` utility used by the Typeform `GetFileContentAction` to intelligently extract content from file upload answers. It supports multiple file formats:
|
|
416
323
|
|
|
417
|
-
|
|
324
|
+
| Format | Processing | Output |
|
|
325
|
+
|--------|-----------|--------|
|
|
326
|
+
| PDF | Text extraction via `pdf-parse` | Plain text |
|
|
327
|
+
| Excel (.xlsx, .xls) | Sheet parsing via `exceljs` | Structured JSON |
|
|
328
|
+
| Word (.docx, .doc) | Text extraction via `mammoth` | Plain text |
|
|
329
|
+
| Images | Base64 encoding | Base64 string (for LLM vision) |
|
|
330
|
+
| Text/JSON/XML/CSV | UTF-8 decoding | Plain text |
|
|
331
|
+
| Other binary | Base64 encoding | Base64 string |
|
|
418
332
|
|
|
419
333
|
## Error Handling
|
|
420
334
|
|
|
421
|
-
All actions return consistent error
|
|
335
|
+
All actions return consistent error information through the `ActionResultSimple` interface:
|
|
422
336
|
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
337
|
+
| Result Code | Description |
|
|
338
|
+
|------------|-------------|
|
|
339
|
+
| `SUCCESS` | Operation completed successfully |
|
|
340
|
+
| `MISSING_FORM_ID` | Required FormID parameter was not provided |
|
|
341
|
+
| `MISSING_API_TOKEN` | No API credentials could be resolved |
|
|
342
|
+
| `MISSING_CONTEXT_USER` | Context user is required for credential lookup |
|
|
343
|
+
| `ERROR` | General error (check Message for details) |
|
|
428
344
|
|
|
429
|
-
|
|
430
|
-
- 401 - Invalid API token
|
|
431
|
-
- 403 - Insufficient permissions
|
|
432
|
-
- 404 - Form/response not found
|
|
433
|
-
- 429 - Rate limit (automatic retry with backoff)
|
|
345
|
+
Each provider automatically handles platform-specific HTTP errors:
|
|
434
346
|
|
|
435
|
-
|
|
347
|
+
- **401** - Invalid or expired API token
|
|
348
|
+
- **403** - Insufficient permissions / scope
|
|
349
|
+
- **404** - Form or response not found
|
|
350
|
+
- **429** - Rate limit exceeded (automatic retry with exponential backoff)
|
|
436
351
|
|
|
437
352
|
## Rate Limiting
|
|
438
353
|
|
|
439
|
-
|
|
440
|
-
- Free plan: 100 requests/minute
|
|
441
|
-
- Basic plan: 200 requests/minute
|
|
442
|
-
- Plus/Business: Higher limits
|
|
354
|
+
All providers include built-in rate limit handling with automatic retry:
|
|
443
355
|
|
|
444
|
-
|
|
445
|
-
-
|
|
446
|
-
-
|
|
447
|
-
-
|
|
356
|
+
- Respects `Retry-After` headers when provided
|
|
357
|
+
- Falls back to 60-second wait when no header is present
|
|
358
|
+
- Adds 100ms delays between pagination requests to avoid hitting limits
|
|
359
|
+
- JotForm: Regional endpoints (US, EU, HIPAA) for data residency compliance
|
|
448
360
|
|
|
449
|
-
|
|
361
|
+
## Dependencies
|
|
450
362
|
|
|
451
|
-
|
|
363
|
+
| Package | Purpose |
|
|
364
|
+
|---------|---------|
|
|
365
|
+
| `@memberjunction/actions` | Action engine and `BaseAction` class |
|
|
366
|
+
| `@memberjunction/actions-base` | `ActionParam` types and base interfaces |
|
|
367
|
+
| `@memberjunction/core` | `RunView`, `Metadata`, `UserInfo`, logging |
|
|
368
|
+
| `@memberjunction/core-entities` | `CompanyIntegrationEntity` for credential lookup |
|
|
369
|
+
| `@memberjunction/global` | `@RegisterClass` decorator |
|
|
370
|
+
| `axios` | HTTP client for all provider API calls |
|
|
371
|
+
| `exceljs` | Excel file parsing in `FileContentProcessor` |
|
|
372
|
+
| `mammoth` | Word document text extraction |
|
|
373
|
+
| `pdf-parse` | PDF text extraction |
|
|
452
374
|
|
|
453
|
-
|
|
454
|
-
Only use `GetAllPages=true` when you need complete data. For large forms, consider:
|
|
455
|
-
- Date range filtering (`Since`/`Until`)
|
|
456
|
-
- Limiting with `MaxResponses`
|
|
457
|
-
- Pagination with `After`/`Before` tokens
|
|
375
|
+
## Related Packages
|
|
458
376
|
|
|
459
|
-
|
|
460
|
-
|
|
377
|
+
- [@memberjunction/actions](../../Engine/readme.md) - Action execution engine
|
|
378
|
+
- [@memberjunction/actions-base](../../Base/README.md) - Base classes and interfaces
|
|
379
|
+
- [@memberjunction/core-actions](../../CoreActions/readme.md) - Pre-built core actions
|
|
380
|
+
- [@memberjunction/actions-bizapps-accounting](../Accounting/README.md) - Accounting integrations
|
|
381
|
+
- [@memberjunction/actions-bizapps-lms](../LMS/README.md) - LMS integrations
|
|
382
|
+
- [@memberjunction/actions-bizapps-crm](../CRM/README.md) - CRM integrations
|
|
461
383
|
|
|
462
|
-
|
|
463
|
-
Always use `MergeWithExisting=true` when updating forms unless you're intentionally replacing the entire form.
|
|
384
|
+
## Adding a New Provider
|
|
464
385
|
|
|
465
|
-
|
|
466
|
-
When watching for new responses, use reasonable poll intervals:
|
|
467
|
-
- High-traffic forms: 1-5 minutes
|
|
468
|
-
- Low-traffic forms: 15-60 minutes
|
|
469
|
-
|
|
470
|
-
### 5. Export in Chunks
|
|
471
|
-
For large datasets, export responses in date ranges rather than all at once.
|
|
472
|
-
|
|
473
|
-
---
|
|
474
|
-
|
|
475
|
-
## Contributing
|
|
476
|
-
|
|
477
|
-
To add a new form platform:
|
|
386
|
+
To integrate a new form/survey platform:
|
|
478
387
|
|
|
479
388
|
1. Create provider directory: `src/providers/{platform}/`
|
|
480
|
-
2.
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
ISC
|
|
491
|
-
|
|
492
|
-
---
|
|
493
|
-
|
|
494
|
-
## Support
|
|
495
|
-
|
|
496
|
-
- Documentation: https://docs.memberjunction.com
|
|
497
|
-
- GitHub Issues: https://github.com/MemberJunction/MJ/issues
|
|
498
|
-
- Typeform API Docs: https://developer.typeform.com
|
|
389
|
+
2. Implement a provider base class extending `BaseFormBuilderAction` with:
|
|
390
|
+
- `formPlatform` and `integrationName` properties
|
|
391
|
+
- Axios instance with authentication and rate limit interceptors
|
|
392
|
+
- API client methods for the provider's endpoints
|
|
393
|
+
- Response normalization to the shared `FormResponse` interface
|
|
394
|
+
- Provider-specific error handling
|
|
395
|
+
3. Create individual action classes in `src/providers/{platform}/actions/`
|
|
396
|
+
4. Export all classes from `src/providers/{platform}/index.ts`
|
|
397
|
+
5. Add the provider export to `src/index.ts`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LogStatus } from '@memberjunction/core';
|
|
2
2
|
import pdfParse from 'pdf-parse';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import ExcelJS from 'exceljs';
|
|
4
|
+
import mammoth from 'mammoth';
|
|
5
5
|
/**
|
|
6
6
|
* Reusable file content processor for Form Builders actions
|
|
7
7
|
* Handles intelligent content extraction from various file formats
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-content-processor.js","sourceRoot":"","sources":["../../src/shared/file-content-processor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,
|
|
1
|
+
{"version":3,"file":"file-content-processor.js","sourceRoot":"","sources":["../../src/shared/file-content-processor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,OAAO,MAAM,SAAS,CAAC;AAoC9B;;;GAGG;AACH,MAAM,OAAO,oBAAoB;aACL,0BAAqB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC,GAAC,OAAO;IAEzE;;OAEG;IACH,MAAM,CAAC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C,qBAAqB,CAAC,EAAE,CAAC;YAC7C,OAAO,aAAa,CAAC;QACzB,CAAC;aAAM,IAAI,IAAI,CAAC,MAAM,CAAC,qBAAqB,CAAC,EAAE,CAAC;YAC5C,OAAO,UAAU,CAAC;QACtB,CAAC;aAAM,CAAC;YACJ,OAAO,QAAQ,CAAC;QACpB,CAAC;IACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/actions-bizapps-formbuilders",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.2.0",
|
|
5
5
|
"description": "Form builder and survey platform integration actions for MemberJunction",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
"author": "MemberJunction",
|
|
25
25
|
"license": "ISC",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@memberjunction/actions": "4.
|
|
28
|
-
"@memberjunction/actions-base": "4.
|
|
29
|
-
"@memberjunction/core": "4.
|
|
30
|
-
"@memberjunction/core-entities": "4.
|
|
31
|
-
"@memberjunction/global": "4.
|
|
27
|
+
"@memberjunction/actions": "4.2.0",
|
|
28
|
+
"@memberjunction/actions-base": "4.2.0",
|
|
29
|
+
"@memberjunction/core": "4.2.0",
|
|
30
|
+
"@memberjunction/core-entities": "4.2.0",
|
|
31
|
+
"@memberjunction/global": "4.2.0",
|
|
32
32
|
"axios": "^1.13.4",
|
|
33
33
|
"exceljs": "^4.4.0",
|
|
34
34
|
"mammoth": "^1.11.0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LogStatus } from '@memberjunction/core';
|
|
2
2
|
import pdfParse from 'pdf-parse';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import ExcelJS from 'exceljs';
|
|
4
|
+
import mammoth from 'mammoth';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* File content processing options
|