@memberjunction/actions-bizapps-formbuilders 3.4.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. package/.turbo/turbo-build.log +2 -2
  2. package/CHANGELOG.md +41 -0
  3. package/README.md +331 -432
  4. package/dist/base/base-form-builder.action.js +15 -15
  5. package/dist/base/base-form-builder.action.js.map +1 -1
  6. package/dist/base/index.d.ts +1 -1
  7. package/dist/base/index.js +1 -17
  8. package/dist/base/index.js.map +1 -1
  9. package/dist/index.d.ts +5 -5
  10. package/dist/index.js +5 -21
  11. package/dist/index.js.map +1 -1
  12. package/dist/providers/google-forms/actions/export-csv.action.d.ts +1 -5
  13. package/dist/providers/google-forms/actions/export-csv.action.d.ts.map +1 -1
  14. package/dist/providers/google-forms/actions/export-csv.action.js +7 -17
  15. package/dist/providers/google-forms/actions/export-csv.action.js.map +1 -1
  16. package/dist/providers/google-forms/actions/get-form.action.d.ts +1 -5
  17. package/dist/providers/google-forms/actions/get-form.action.d.ts.map +1 -1
  18. package/dist/providers/google-forms/actions/get-form.action.js +7 -17
  19. package/dist/providers/google-forms/actions/get-form.action.js.map +1 -1
  20. package/dist/providers/google-forms/actions/get-single-response.action.d.ts +1 -5
  21. package/dist/providers/google-forms/actions/get-single-response.action.d.ts.map +1 -1
  22. package/dist/providers/google-forms/actions/get-single-response.action.js +7 -17
  23. package/dist/providers/google-forms/actions/get-single-response.action.js.map +1 -1
  24. package/dist/providers/google-forms/actions/get-statistics.action.d.ts +1 -5
  25. package/dist/providers/google-forms/actions/get-statistics.action.d.ts.map +1 -1
  26. package/dist/providers/google-forms/actions/get-statistics.action.js +7 -17
  27. package/dist/providers/google-forms/actions/get-statistics.action.js.map +1 -1
  28. package/dist/providers/google-forms/actions/index.d.ts +4 -9
  29. package/dist/providers/google-forms/actions/index.d.ts.map +1 -1
  30. package/dist/providers/google-forms/actions/index.js +4 -37
  31. package/dist/providers/google-forms/actions/index.js.map +1 -1
  32. package/dist/providers/google-forms/googleforms-base.action.d.ts +1 -1
  33. package/dist/providers/google-forms/googleforms-base.action.js +23 -26
  34. package/dist/providers/google-forms/googleforms-base.action.js.map +1 -1
  35. package/dist/providers/google-forms/index.d.ts +2 -2
  36. package/dist/providers/google-forms/index.js +2 -18
  37. package/dist/providers/google-forms/index.js.map +1 -1
  38. package/dist/providers/jotform/actions/create-form.action.d.ts +1 -5
  39. package/dist/providers/jotform/actions/create-form.action.d.ts.map +1 -1
  40. package/dist/providers/jotform/actions/create-form.action.js +7 -17
  41. package/dist/providers/jotform/actions/create-form.action.js.map +1 -1
  42. package/dist/providers/jotform/actions/export-csv.action.d.ts +1 -5
  43. package/dist/providers/jotform/actions/export-csv.action.d.ts.map +1 -1
  44. package/dist/providers/jotform/actions/export-csv.action.js +7 -17
  45. package/dist/providers/jotform/actions/export-csv.action.js.map +1 -1
  46. package/dist/providers/jotform/actions/get-form.action.d.ts +1 -5
  47. package/dist/providers/jotform/actions/get-form.action.d.ts.map +1 -1
  48. package/dist/providers/jotform/actions/get-form.action.js +7 -17
  49. package/dist/providers/jotform/actions/get-form.action.js.map +1 -1
  50. package/dist/providers/jotform/actions/get-single-submission.action.d.ts +1 -5
  51. package/dist/providers/jotform/actions/get-single-submission.action.d.ts.map +1 -1
  52. package/dist/providers/jotform/actions/get-single-submission.action.js +7 -17
  53. package/dist/providers/jotform/actions/get-single-submission.action.js.map +1 -1
  54. package/dist/providers/jotform/actions/get-statistics.action.d.ts +1 -5
  55. package/dist/providers/jotform/actions/get-statistics.action.d.ts.map +1 -1
  56. package/dist/providers/jotform/actions/get-statistics.action.js +7 -17
  57. package/dist/providers/jotform/actions/get-statistics.action.js.map +1 -1
  58. package/dist/providers/jotform/actions/get-submissions.action.d.ts +1 -5
  59. package/dist/providers/jotform/actions/get-submissions.action.d.ts.map +1 -1
  60. package/dist/providers/jotform/actions/get-submissions.action.js +7 -17
  61. package/dist/providers/jotform/actions/get-submissions.action.js.map +1 -1
  62. package/dist/providers/jotform/actions/index.d.ts +8 -13
  63. package/dist/providers/jotform/actions/index.d.ts.map +1 -1
  64. package/dist/providers/jotform/actions/index.js +8 -49
  65. package/dist/providers/jotform/actions/index.js.map +1 -1
  66. package/dist/providers/jotform/actions/update-form.action.d.ts +1 -5
  67. package/dist/providers/jotform/actions/update-form.action.d.ts.map +1 -1
  68. package/dist/providers/jotform/actions/update-form.action.js +7 -17
  69. package/dist/providers/jotform/actions/update-form.action.js.map +1 -1
  70. package/dist/providers/jotform/actions/watch-new-submissions.action.d.ts +1 -5
  71. package/dist/providers/jotform/actions/watch-new-submissions.action.d.ts.map +1 -1
  72. package/dist/providers/jotform/actions/watch-new-submissions.action.js +7 -17
  73. package/dist/providers/jotform/actions/watch-new-submissions.action.js.map +1 -1
  74. package/dist/providers/jotform/index.d.ts +2 -2
  75. package/dist/providers/jotform/index.js +2 -18
  76. package/dist/providers/jotform/index.js.map +1 -1
  77. package/dist/providers/jotform/jotform-base.action.d.ts +1 -1
  78. package/dist/providers/jotform/jotform-base.action.js +25 -28
  79. package/dist/providers/jotform/jotform-base.action.js.map +1 -1
  80. package/dist/providers/surveymonkey/actions/create-survey.action.d.ts +1 -5
  81. package/dist/providers/surveymonkey/actions/create-survey.action.d.ts.map +1 -1
  82. package/dist/providers/surveymonkey/actions/create-survey.action.js +7 -17
  83. package/dist/providers/surveymonkey/actions/create-survey.action.js.map +1 -1
  84. package/dist/providers/surveymonkey/actions/export-csv.action.d.ts +1 -5
  85. package/dist/providers/surveymonkey/actions/export-csv.action.d.ts.map +1 -1
  86. package/dist/providers/surveymonkey/actions/export-csv.action.js +7 -17
  87. package/dist/providers/surveymonkey/actions/export-csv.action.js.map +1 -1
  88. package/dist/providers/surveymonkey/actions/get-responses.action.d.ts +1 -5
  89. package/dist/providers/surveymonkey/actions/get-responses.action.d.ts.map +1 -1
  90. package/dist/providers/surveymonkey/actions/get-responses.action.js +7 -17
  91. package/dist/providers/surveymonkey/actions/get-responses.action.js.map +1 -1
  92. package/dist/providers/surveymonkey/actions/get-single-response.action.d.ts +1 -5
  93. package/dist/providers/surveymonkey/actions/get-single-response.action.d.ts.map +1 -1
  94. package/dist/providers/surveymonkey/actions/get-single-response.action.js +7 -17
  95. package/dist/providers/surveymonkey/actions/get-single-response.action.js.map +1 -1
  96. package/dist/providers/surveymonkey/actions/get-statistics.action.d.ts +1 -5
  97. package/dist/providers/surveymonkey/actions/get-statistics.action.d.ts.map +1 -1
  98. package/dist/providers/surveymonkey/actions/get-statistics.action.js +7 -17
  99. package/dist/providers/surveymonkey/actions/get-statistics.action.js.map +1 -1
  100. package/dist/providers/surveymonkey/actions/get-survey.action.d.ts +1 -5
  101. package/dist/providers/surveymonkey/actions/get-survey.action.d.ts.map +1 -1
  102. package/dist/providers/surveymonkey/actions/get-survey.action.js +7 -17
  103. package/dist/providers/surveymonkey/actions/get-survey.action.js.map +1 -1
  104. package/dist/providers/surveymonkey/actions/index.d.ts +8 -13
  105. package/dist/providers/surveymonkey/actions/index.d.ts.map +1 -1
  106. package/dist/providers/surveymonkey/actions/index.js +8 -49
  107. package/dist/providers/surveymonkey/actions/index.js.map +1 -1
  108. package/dist/providers/surveymonkey/actions/update-survey.action.d.ts +1 -5
  109. package/dist/providers/surveymonkey/actions/update-survey.action.d.ts.map +1 -1
  110. package/dist/providers/surveymonkey/actions/update-survey.action.js +7 -17
  111. package/dist/providers/surveymonkey/actions/update-survey.action.js.map +1 -1
  112. package/dist/providers/surveymonkey/actions/watch-new-responses.action.d.ts +1 -5
  113. package/dist/providers/surveymonkey/actions/watch-new-responses.action.d.ts.map +1 -1
  114. package/dist/providers/surveymonkey/actions/watch-new-responses.action.js +7 -17
  115. package/dist/providers/surveymonkey/actions/watch-new-responses.action.js.map +1 -1
  116. package/dist/providers/surveymonkey/index.d.ts +2 -2
  117. package/dist/providers/surveymonkey/index.js +2 -18
  118. package/dist/providers/surveymonkey/index.js.map +1 -1
  119. package/dist/providers/surveymonkey/surveymonkey-base.action.d.ts +1 -1
  120. package/dist/providers/surveymonkey/surveymonkey-base.action.js +27 -30
  121. package/dist/providers/surveymonkey/surveymonkey-base.action.js.map +1 -1
  122. package/dist/providers/typeform/actions/create-form.action.d.ts +1 -5
  123. package/dist/providers/typeform/actions/create-form.action.d.ts.map +1 -1
  124. package/dist/providers/typeform/actions/create-form.action.js +7 -17
  125. package/dist/providers/typeform/actions/create-form.action.js.map +1 -1
  126. package/dist/providers/typeform/actions/export-csv.action.d.ts +1 -5
  127. package/dist/providers/typeform/actions/export-csv.action.d.ts.map +1 -1
  128. package/dist/providers/typeform/actions/export-csv.action.js +7 -17
  129. package/dist/providers/typeform/actions/export-csv.action.js.map +1 -1
  130. package/dist/providers/typeform/actions/get-file-content.action.d.ts +1 -5
  131. package/dist/providers/typeform/actions/get-file-content.action.d.ts.map +1 -1
  132. package/dist/providers/typeform/actions/get-file-content.action.js +16 -29
  133. package/dist/providers/typeform/actions/get-file-content.action.js.map +1 -1
  134. package/dist/providers/typeform/actions/get-form.action.d.ts +1 -5
  135. package/dist/providers/typeform/actions/get-form.action.d.ts.map +1 -1
  136. package/dist/providers/typeform/actions/get-form.action.js +7 -17
  137. package/dist/providers/typeform/actions/get-form.action.js.map +1 -1
  138. package/dist/providers/typeform/actions/get-forms.action.d.ts +1 -2
  139. package/dist/providers/typeform/actions/get-forms.action.d.ts.map +1 -1
  140. package/dist/providers/typeform/actions/get-forms.action.js +7 -16
  141. package/dist/providers/typeform/actions/get-forms.action.js.map +1 -1
  142. package/dist/providers/typeform/actions/get-responses.action.d.ts +1 -5
  143. package/dist/providers/typeform/actions/get-responses.action.d.ts.map +1 -1
  144. package/dist/providers/typeform/actions/get-responses.action.js +9 -19
  145. package/dist/providers/typeform/actions/get-responses.action.js.map +1 -1
  146. package/dist/providers/typeform/actions/get-single-response.action.d.ts +1 -5
  147. package/dist/providers/typeform/actions/get-single-response.action.d.ts.map +1 -1
  148. package/dist/providers/typeform/actions/get-single-response.action.js +9 -19
  149. package/dist/providers/typeform/actions/get-single-response.action.js.map +1 -1
  150. package/dist/providers/typeform/actions/get-statistics.action.d.ts +1 -5
  151. package/dist/providers/typeform/actions/get-statistics.action.d.ts.map +1 -1
  152. package/dist/providers/typeform/actions/get-statistics.action.js +7 -17
  153. package/dist/providers/typeform/actions/get-statistics.action.js.map +1 -1
  154. package/dist/providers/typeform/actions/index.d.ts +10 -15
  155. package/dist/providers/typeform/actions/index.d.ts.map +1 -1
  156. package/dist/providers/typeform/actions/index.js +10 -55
  157. package/dist/providers/typeform/actions/index.js.map +1 -1
  158. package/dist/providers/typeform/actions/update-form.action.d.ts +1 -5
  159. package/dist/providers/typeform/actions/update-form.action.d.ts.map +1 -1
  160. package/dist/providers/typeform/actions/update-form.action.js +7 -17
  161. package/dist/providers/typeform/actions/update-form.action.js.map +1 -1
  162. package/dist/providers/typeform/actions/watch-new-responses.action.d.ts +1 -5
  163. package/dist/providers/typeform/actions/watch-new-responses.action.d.ts.map +1 -1
  164. package/dist/providers/typeform/actions/watch-new-responses.action.js +7 -17
  165. package/dist/providers/typeform/actions/watch-new-responses.action.js.map +1 -1
  166. package/dist/providers/typeform/index.d.ts +2 -2
  167. package/dist/providers/typeform/index.js +2 -18
  168. package/dist/providers/typeform/index.js.map +1 -1
  169. package/dist/providers/typeform/typeform-base.action.d.ts +1 -1
  170. package/dist/providers/typeform/typeform-base.action.js +26 -29
  171. package/dist/providers/typeform/typeform-base.action.js.map +1 -1
  172. package/dist/shared/file-content-processor.d.ts +0 -1
  173. package/dist/shared/file-content-processor.d.ts.map +1 -1
  174. package/dist/shared/file-content-processor.js +8 -38
  175. package/dist/shared/file-content-processor.js.map +1 -1
  176. package/package.json +13 -12
  177. package/src/providers/google-forms/actions/export-csv.action.ts +1 -8
  178. package/src/providers/google-forms/actions/get-form.action.ts +1 -8
  179. package/src/providers/google-forms/actions/get-single-response.action.ts +1 -8
  180. package/src/providers/google-forms/actions/get-statistics.action.ts +1 -8
  181. package/src/providers/google-forms/actions/index.ts +0 -17
  182. package/src/providers/jotform/actions/create-form.action.ts +1 -8
  183. package/src/providers/jotform/actions/export-csv.action.ts +1 -8
  184. package/src/providers/jotform/actions/get-form.action.ts +1 -8
  185. package/src/providers/jotform/actions/get-single-submission.action.ts +1 -8
  186. package/src/providers/jotform/actions/get-statistics.action.ts +1 -8
  187. package/src/providers/jotform/actions/get-submissions.action.ts +1 -8
  188. package/src/providers/jotform/actions/index.ts +0 -25
  189. package/src/providers/jotform/actions/update-form.action.ts +1 -8
  190. package/src/providers/jotform/actions/watch-new-submissions.action.ts +1 -8
  191. package/src/providers/surveymonkey/actions/create-survey.action.ts +1 -8
  192. package/src/providers/surveymonkey/actions/export-csv.action.ts +1 -8
  193. package/src/providers/surveymonkey/actions/get-responses.action.ts +1 -8
  194. package/src/providers/surveymonkey/actions/get-single-response.action.ts +1 -8
  195. package/src/providers/surveymonkey/actions/get-statistics.action.ts +1 -8
  196. package/src/providers/surveymonkey/actions/get-survey.action.ts +1 -8
  197. package/src/providers/surveymonkey/actions/index.ts +0 -25
  198. package/src/providers/surveymonkey/actions/update-survey.action.ts +1 -8
  199. package/src/providers/surveymonkey/actions/watch-new-responses.action.ts +1 -8
  200. package/src/providers/typeform/actions/create-form.action.ts +0 -7
  201. package/src/providers/typeform/actions/export-csv.action.ts +0 -7
  202. package/src/providers/typeform/actions/get-file-content.action.ts +0 -7
  203. package/src/providers/typeform/actions/get-form.action.ts +0 -7
  204. package/src/providers/typeform/actions/get-forms.action.ts +0 -6
  205. package/src/providers/typeform/actions/get-responses.action.ts +0 -7
  206. package/src/providers/typeform/actions/get-single-response.action.ts +0 -7
  207. package/src/providers/typeform/actions/get-statistics.action.ts +0 -7
  208. package/src/providers/typeform/actions/index.ts +0 -29
  209. package/src/providers/typeform/actions/update-form.action.ts +0 -7
  210. package/src/providers/typeform/actions/watch-new-responses.action.ts +0 -7
  211. package/src/shared/file-content-processor.ts +3 -3
  212. package/tsconfig.json +4 -13
package/README.md CHANGED
@@ -1,238 +1,73 @@
1
- # Form Builder Actions for MemberJunction
2
-
3
- This package provides integration actions for popular form builder and survey platforms, enabling AI agents, workflows, and applications to programmatically interact with forms, retrieve responses, and analyze submission data.
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
- ### ✅ Typeform (Implemented)
8
- Complete integration with Typeform's Responses API and Create API.
9
- - **8 Actions**: Get responses, get single response, get statistics, export CSV, watch new responses, get form details, create form, update form
10
- - **Authentication**: Personal access token (Bearer)
11
- - **Capabilities**: Full CRUD - read responses and manage forms
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
- ## Authentication
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
- ### Typeform API Token
181
+ ### Credential Resolution Order
246
182
 
247
- 1. Go to https://admin.typeform.com/account#/section/tokens
248
- 2. Create a new personal access token
249
- 3. Grant required scopes:
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 Variables (Recommended)
187
+ ### Environment Variable Examples
255
188
 
256
189
  ```bash
257
- export BIZAPPS_TYPEFORM_{COMPANY_ID}_API_TOKEN=tfp_...
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 (Alternative)
209
+ ### Database Configuration
210
+
211
+ Store credentials in the `Company Integrations` entity linked to the appropriate Integration record:
261
212
 
262
- Store tokens in `Company Integrations` table with Integration Name = "Typeform"
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
- ### Example 1: AI Agent Analyzing Survey Responses
225
+ ### Retrieving Form Responses
269
226
 
270
227
  ```typescript
271
- import { RunView } from '@memberjunction/core';
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 responses = getResponsesResult.Params.find(p => p.Name === 'Responses').Value;
230
+ const engine = ActionEngineServer.Instance;
286
231
 
287
- // AI analyzes sentiment
288
- const aiResult = await promptRunner.ExecutePrompt({
289
- prompt: 'Analyze customer satisfaction from these survey responses',
290
- data: { responses }
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
- ### Example 2: Automated Form Creation
250
+ ### Exporting Responses to CSV
295
251
 
296
252
  ```typescript
297
- // AI generates a customer feedback form
298
- const formData = {
299
- title: 'Q1 2024 Customer Feedback Survey',
300
- fields: [
301
- {
302
- type: 'short_text',
303
- title: 'What is your name?',
304
- ref: 'name'
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 formUrl = result.Params.find(p => p.Name === 'FormURL').Value;
345
- console.log(`Form created: ${formUrl}`);
263
+ const csvData = exportResult.Params.find(p => p.Name === 'CSVData')?.Value;
346
264
  ```
347
265
 
348
- ### Example 3: Real-Time Response Monitoring
266
+ ### Creating a Form Programmatically
349
267
 
350
268
  ```typescript
351
- // Check for new responses every 5 minutes
352
- setInterval(async () => {
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
- { Name: 'FormID', Value: 'abc123' },
357
- { Name: 'APIToken', Value: 'tfp_...' },
358
- { Name: 'LastCheckedTimestamp', Value: lastChecked },
359
- { Name: 'OnlyCompleted', Value: true }
360
- ]
361
- });
362
-
363
- const newResponses = result.Params.find(p => p.Name === 'NewResponses').Value;
364
- const hasNewResponses = result.Params.find(p => p.Name === 'HasNewResponses').Value;
365
-
366
- if (hasNewResponses) {
367
- // Send notifications
368
- for (const response of newResponses) {
369
- await sendNotification({
370
- subject: 'New Form Submission',
371
- body: `Received response from ${response.responseId}`,
372
- data: response
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
- // Update last checked timestamp
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
- ### Example 4: Export and Analyze
301
+ ### Watching for New Responses
383
302
 
384
303
  ```typescript
385
- // Export responses to CSV
386
- const exportResult = await runAction({
387
- ActionName: 'Export Typeform Responses to CSV',
388
- Params: [
389
- { Name: 'FormID', Value: 'abc123' },
390
- { Name: 'APIToken', Value: 'tfp_...' },
391
- { Name: 'Since', Value: '2024-01-01T00:00:00Z' },
392
- { Name: 'IncludeMetadata', Value: true }
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 csvData = exportResult.Params.find(p => p.Name === 'CSVData').Value;
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
- // Save to file storage
399
- await fs.writeFile('responses.csv', csvData);
320
+ ## File Content Processing
400
321
 
401
- // Or get statistics
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 codes:
335
+ All actions return consistent error information through the `ActionResultSimple` interface:
422
336
 
423
- - `SUCCESS` - Operation completed
424
- - `MISSING_FORM_ID` - FormID parameter required
425
- - `MISSING_API_TOKEN` - APIToken parameter required
426
- - `MISSING_CONTEXT_USER` - Context user required
427
- - `ERROR` - General error (check Message for details)
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
- Typeform-specific errors are automatically handled:
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
- Typeform API rate limits:
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
- The package automatically:
445
- - Retries on 429 errors
446
- - Respects `Retry-After` headers
447
- - Implements exponential backoff
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
- ## Best Practices
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
- ### 1. Use GetAllPages Wisely
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
- ### 2. Cache Form Details
460
- Form structure changes infrequently. Cache the result of `Get Typeform Details` to avoid unnecessary API calls.
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
- ### 3. Update Forms Safely
463
- Always use `MergeWithExisting=true` when updating forms unless you're intentionally replacing the entire form.
384
+ ## Adding a New Provider
464
385
 
465
- ### 4. Monitor in Batches
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. Extend `BaseFormBuilderAction`
481
- 3. Implement platform-specific API client
482
- 4. Create actions for common operations
483
- 5. Add tests
484
- 6. Update this README
485
-
486
- ---
487
-
488
- ## License
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`