@activepieces/piece-deftform 0.0.4 → 0.0.6

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 (45) hide show
  1. package/package.json +7 -12
  2. package/src/index.js +28 -46
  3. package/src/index.d.ts +0 -4
  4. package/src/index.d.ts.map +0 -1
  5. package/src/index.js.map +0 -1
  6. package/src/lib/actions/add-form-response.d.ts +0 -5
  7. package/src/lib/actions/add-form-response.d.ts.map +0 -1
  8. package/src/lib/actions/add-form-response.js +0 -42
  9. package/src/lib/actions/add-form-response.js.map +0 -1
  10. package/src/lib/actions/get-all-forms.d.ts +0 -2
  11. package/src/lib/actions/get-all-forms.d.ts.map +0 -1
  12. package/src/lib/actions/get-all-forms.js +0 -54
  13. package/src/lib/actions/get-all-forms.js.map +0 -1
  14. package/src/lib/actions/get-form-fields.d.ts +0 -4
  15. package/src/lib/actions/get-form-fields.d.ts.map +0 -1
  16. package/src/lib/actions/get-form-fields.js +0 -44
  17. package/src/lib/actions/get-form-fields.js.map +0 -1
  18. package/src/lib/actions/get-form-responses.d.ts +0 -4
  19. package/src/lib/actions/get-form-responses.d.ts.map +0 -1
  20. package/src/lib/actions/get-form-responses.js +0 -44
  21. package/src/lib/actions/get-form-responses.js.map +0 -1
  22. package/src/lib/actions/get-submission-pdf.d.ts +0 -4
  23. package/src/lib/actions/get-submission-pdf.d.ts.map +0 -1
  24. package/src/lib/actions/get-submission-pdf.js +0 -38
  25. package/src/lib/actions/get-submission-pdf.js.map +0 -1
  26. package/src/lib/actions/get-workspace.d.ts +0 -2
  27. package/src/lib/actions/get-workspace.d.ts.map +0 -1
  28. package/src/lib/actions/get-workspace.js +0 -28
  29. package/src/lib/actions/get-workspace.js.map +0 -1
  30. package/src/lib/actions/update-form-settings.d.ts +0 -43
  31. package/src/lib/actions/update-form-settings.d.ts.map +0 -1
  32. package/src/lib/actions/update-form-settings.js +0 -286
  33. package/src/lib/actions/update-form-settings.js.map +0 -1
  34. package/src/lib/auth.d.ts +0 -2
  35. package/src/lib/auth.d.ts.map +0 -1
  36. package/src/lib/auth.js +0 -38
  37. package/src/lib/auth.js.map +0 -1
  38. package/src/lib/common/index.d.ts +0 -18
  39. package/src/lib/common/index.d.ts.map +0 -1
  40. package/src/lib/common/index.js +0 -85
  41. package/src/lib/common/index.js.map +0 -1
  42. package/src/lib/triggers/new-form-response.d.ts +0 -11
  43. package/src/lib/triggers/new-form-response.d.ts.map +0 -1
  44. package/src/lib/triggers/new-form-response.js +0 -52
  45. package/src/lib/triggers/new-form-response.js.map +0 -1
@@ -1,44 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getFormFields = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- const auth_1 = require("../auth");
8
- const common_1 = require("../common");
9
- exports.getFormFields = (0, pieces_framework_1.createAction)({
10
- auth: auth_1.deftformAuth,
11
- name: 'get_form_fields',
12
- displayName: 'Get Form Fields',
13
- description: 'Retrieves only the fields of a specific form. Great for understanding the structure before building automations.',
14
- audience: 'both',
15
- aiMetadata: { description: 'Fetch the field definitions of one form (label, type, required flag, options, validation). Use it to learn a form schema before submitting a response with Add Form Response, since that action keys values by field UUID. Requires the form id. Read-only and idempotent.', idempotent: true },
16
- props: {
17
- formId: common_1.DeftformCommon.formDropdown,
18
- },
19
- run(context) {
20
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
21
- const response = yield (0, common_1.deftformApiCall)({
22
- token: context.auth.secret_text,
23
- method: pieces_common_1.HttpMethod.GET,
24
- path: `/forms/${context.propsValue.formId}/fields`,
25
- });
26
- return response.body.data.map((field) => {
27
- var _a, _b, _c, _d, _e, _f, _g, _h;
28
- const f = field;
29
- return {
30
- id: (_a = f['id']) !== null && _a !== void 0 ? _a : null,
31
- name: (_b = f['name']) !== null && _b !== void 0 ? _b : null,
32
- label: (_c = f['label']) !== null && _c !== void 0 ? _c : null,
33
- type: (_d = f['type']) !== null && _d !== void 0 ? _d : null,
34
- required: (_e = f['required']) !== null && _e !== void 0 ? _e : null,
35
- options: Array.isArray(f['options']) ? f['options'] : null,
36
- default_value: (_f = f['default_value']) !== null && _f !== void 0 ? _f : null,
37
- placeholder: (_g = f['placeholder']) !== null && _g !== void 0 ? _g : null,
38
- validation: (_h = f['validation']) !== null && _h !== void 0 ? _h : null,
39
- };
40
- });
41
- });
42
- },
43
- });
44
- //# sourceMappingURL=get-form-fields.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-form-fields.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-form-fields.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,+DAAyD;AACzD,kCAAuC;AACvC,sCAA4D;AAE/C,QAAA,aAAa,GAAG,IAAA,+BAAY,EAAC;IACtC,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,kHAAkH;IAC/H,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,4QAA4Q,EAAE,UAAU,EAAE,IAAI,EAAE;IAC3T,KAAK,EAAE;QACH,MAAM,EAAE,uBAAc,CAAC,YAAY;KACtC;IACK,GAAG,CAAC,OAAO;;YACb,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAe,EAAsB;gBACxD,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,WAAW;gBAC/B,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,IAAI,EAAE,UAAU,OAAO,CAAC,UAAU,CAAC,MAAM,SAAS;aACrD,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;;gBACpC,MAAM,CAAC,GAAG,KAAgC,CAAC;gBAC3C,OAAO;oBACH,EAAE,EAAE,MAAA,CAAC,CAAC,IAAI,CAAC,mCAAI,IAAI;oBACnB,IAAI,EAAE,MAAA,CAAC,CAAC,MAAM,CAAC,mCAAI,IAAI;oBACvB,KAAK,EAAE,MAAA,CAAC,CAAC,OAAO,CAAC,mCAAI,IAAI;oBACzB,IAAI,EAAE,MAAA,CAAC,CAAC,MAAM,CAAC,mCAAI,IAAI;oBACvB,QAAQ,EAAE,MAAA,CAAC,CAAC,UAAU,CAAC,mCAAI,IAAI;oBAC/B,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI;oBAC1D,aAAa,EAAE,MAAA,CAAC,CAAC,eAAe,CAAC,mCAAI,IAAI;oBACzC,WAAW,EAAE,MAAA,CAAC,CAAC,aAAa,CAAC,mCAAI,IAAI;oBACrC,UAAU,EAAE,MAAA,CAAC,CAAC,YAAY,CAAC,mCAAI,IAAI;iBACtC,CAAC;YACN,CAAC,CAAC,CAAC;QACP,CAAC;KAAA;CACJ,CAAC,CAAC"}
@@ -1,4 +0,0 @@
1
- export declare const getFormResponses: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- formId: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
3
- }>;
4
- //# sourceMappingURL=get-form-responses.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-form-responses.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-form-responses.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB;;EAyC3B,CAAC"}
@@ -1,44 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getFormResponses = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- const auth_1 = require("../auth");
8
- const common_1 = require("../common");
9
- exports.getFormResponses = (0, pieces_framework_1.createAction)({
10
- auth: auth_1.deftformAuth,
11
- name: 'get_form_responses',
12
- displayName: 'Get Form Responses',
13
- description: 'Retrieves all submissions (responses) for a specific form. Useful for reporting and data exports.',
14
- audience: 'both',
15
- aiMetadata: { description: 'Retrieve all submitted responses for one form, with each response answers flattened by field key plus submission metadata (id, uuid, number, timestamps). Use it for reporting, exports, or to look up a response UUID needed by Get Submission PDF. Requires the form id. Read-only and idempotent.', idempotent: true },
16
- props: {
17
- formId: common_1.DeftformCommon.formDropdown,
18
- },
19
- run(context) {
20
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
21
- const response = yield (0, common_1.deftformApiCall)({
22
- token: context.auth.secret_text,
23
- method: pieces_common_1.HttpMethod.GET,
24
- path: `/responses/${context.propsValue.formId}`,
25
- });
26
- return response.body.data.map((item) => {
27
- var _a, _b, _c, _d, _e, _f, _g;
28
- const i = item;
29
- const responseFields = {};
30
- const responses = i['responses'];
31
- if (responses) {
32
- for (const r of responses) {
33
- const value = r.value;
34
- responseFields[r.key] = Array.isArray(value)
35
- ? value.map((v) => (typeof v === 'object' && v !== null ? JSON.stringify(v) : String(v))).join(', ')
36
- : value !== null && value !== void 0 ? value : null;
37
- }
38
- }
39
- return Object.assign(Object.assign({}, responseFields), { id: (_a = i['id']) !== null && _a !== void 0 ? _a : null, uuid: (_b = i['uuid']) !== null && _b !== void 0 ? _b : null, number: (_c = i['number']) !== null && _c !== void 0 ? _c : null, number_formatted: (_d = i['number_formatted']) !== null && _d !== void 0 ? _d : null, form_id: (_e = i['form_id']) !== null && _e !== void 0 ? _e : null, created_at: (_f = i['created_at']) !== null && _f !== void 0 ? _f : null, updated_at: (_g = i['updated_at']) !== null && _g !== void 0 ? _g : null });
40
- });
41
- });
42
- },
43
- });
44
- //# sourceMappingURL=get-form-responses.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-form-responses.js","sourceRoot":"","sources":["../../../../src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AAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;4BACpG,CAAC,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,IAAI,CAAC;oBACxB,CAAC;gBACL,CAAC;gBACD,uCACO,cAAc,KACjB,EAAE,EAAE,MAAA,CAAC,CAAC,IAAI,CAAC,mCAAI,IAAI,EACnB,IAAI,EAAE,MAAA,CAAC,CAAC,MAAM,CAAC,mCAAI,IAAI,EACvB,MAAM,EAAE,MAAA,CAAC,CAAC,QAAQ,CAAC,mCAAI,IAAI,EAC3B,gBAAgB,EAAE,MAAA,CAAC,CAAC,kBAAkB,CAAC,mCAAI,IAAI,EAC/C,OAAO,EAAE,MAAA,CAAC,CAAC,SAAS,CAAC,mCAAI,IAAI,EAC7B,UAAU,EAAE,MAAA,CAAC,CAAC,YAAY,CAAC,mCAAI,IAAI,EACnC,UAAU,EAAE,MAAA,CAAC,CAAC,YAAY,CAAC,mCAAI,IAAI,IACrC;YACN,CAAC,CAAC,CAAC;QACP,CAAC;KAAA;CACJ,CAAC,CAAC"}
@@ -1,4 +0,0 @@
1
- export declare const getSubmissionPdf: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- responseUuid: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
- }>;
4
- //# sourceMappingURL=get-submission-pdf.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-submission-pdf.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-submission-pdf.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB;;EA0B3B,CAAC"}
@@ -1,38 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getSubmissionPdf = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- const auth_1 = require("../auth");
8
- const common_1 = require("../common");
9
- exports.getSubmissionPdf = (0, pieces_framework_1.createAction)({
10
- auth: auth_1.deftformAuth,
11
- name: 'get_submission_pdf',
12
- displayName: 'Get Submission PDF',
13
- description: 'Generates a PDF download link for a specific form submission by its unique response UUID.',
14
- audience: 'both',
15
- aiMetadata: { description: 'Get a downloadable PDF link for a single form submission, identified by its response UUID (obtainable from Get Form Responses). Use it when you need a printable or shareable copy of one response. Read-only and idempotent.', idempotent: true },
16
- props: {
17
- responseUuid: pieces_framework_1.Property.ShortText({
18
- displayName: 'Response UUID',
19
- description: 'The unique identifier of the submission. You can find this in the form responses list.',
20
- required: true,
21
- }),
22
- },
23
- run(context) {
24
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
25
- var _a, _b, _c, _d;
26
- const response = yield (0, common_1.deftformApiCall)({
27
- token: context.auth.secret_text,
28
- method: pieces_common_1.HttpMethod.GET,
29
- path: `/response/${context.propsValue.responseUuid}/pdf`,
30
- });
31
- return {
32
- pdf_url: (_d = (_b = (_a = response.body.data) === null || _a === void 0 ? void 0 : _a.pdf_url) !== null && _b !== void 0 ? _b : (_c = response.body.data) === null || _c === void 0 ? void 0 : _c.url) !== null && _d !== void 0 ? _d : null,
33
- response_uuid: context.propsValue.responseUuid,
34
- };
35
- });
36
- },
37
- });
38
- //# sourceMappingURL=get-submission-pdf.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-submission-pdf.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-submission-pdf.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,kCAAuC;AACvC,sCAA4C;AAE/B,QAAA,gBAAgB,GAAG,IAAA,+BAAY,EAAC;IACzC,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,oBAAoB;IACjC,WAAW,EAAE,2FAA2F;IACxG,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,+NAA+N,EAAE,UAAU,EAAE,IAAI,EAAE;IAC9Q,KAAK,EAAE;QACH,YAAY,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,eAAe;YAC5B,WAAW,EAAE,wFAAwF;YACrG,QAAQ,EAAE,IAAI;SACjB,CAAC;KACL;IACK,GAAG,CAAC,OAAO;;;YACb,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAe,EAAgD;gBAClF,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,WAAW;gBAC/B,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,IAAI,EAAE,aAAa,OAAO,CAAC,UAAU,CAAC,YAAY,MAAM;aAC3D,CAAC,CAAC;YAEH,OAAO;gBACH,OAAO,EAAE,MAAA,MAAA,MAAA,QAAQ,CAAC,IAAI,CAAC,IAAI,0CAAE,OAAO,mCAAI,MAAA,QAAQ,CAAC,IAAI,CAAC,IAAI,0CAAE,GAAG,mCAAI,IAAI;gBACvE,aAAa,EAAE,OAAO,CAAC,UAAU,CAAC,YAAY;aACjD,CAAC;QACN,CAAC;KAAA;CACJ,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const getWorkspaceDetails: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {}>;
2
- //# sourceMappingURL=get-workspace.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-workspace.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-workspace.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,mBAAmB,yHAgB9B,CAAC"}
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getWorkspaceDetails = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- const auth_1 = require("../auth");
8
- const common_1 = require("../common");
9
- exports.getWorkspaceDetails = (0, pieces_framework_1.createAction)({
10
- auth: auth_1.deftformAuth,
11
- name: 'get_workspace_details',
12
- displayName: 'Get Workspace Details',
13
- description: 'Retrieves all information about your Deftform workspace. Useful as a connection test.',
14
- audience: 'both',
15
- aiMetadata: { description: 'Fetch the Deftform workspace details (plan, limits, account-level settings). Use it to confirm the connection works or to read workspace-level context before working with forms. Read-only and idempotent; takes no input.', idempotent: true },
16
- props: {},
17
- run(context) {
18
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
19
- const response = yield (0, common_1.deftformApiCall)({
20
- token: context.auth.secret_text,
21
- method: pieces_common_1.HttpMethod.GET,
22
- path: '/workspace',
23
- });
24
- return (0, common_1.flattenObject)(response.body);
25
- });
26
- },
27
- });
28
- //# sourceMappingURL=get-workspace.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-workspace.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-workspace.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,+DAAyD;AACzD,kCAAuC;AACvC,sCAA2D;AAE9C,QAAA,mBAAmB,GAAG,IAAA,+BAAY,EAAC;IAC5C,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE,uBAAuB;IACpC,WAAW,EAAE,uFAAuF;IACpG,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,6NAA6N,EAAE,UAAU,EAAE,IAAI,EAAE;IAC5Q,KAAK,EAAE,EAAE;IACH,GAAG,CAAC,OAAO;;YACb,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAe,EAA0B;gBAC5D,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,WAAW;gBAC/B,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,IAAI,EAAE,YAAY;aACrB,CAAC,CAAC;YACH,OAAO,IAAA,sBAAa,EAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACxC,CAAC;KAAA;CACJ,CAAC,CAAC"}
@@ -1,43 +0,0 @@
1
- export declare const updateFormSettings: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- formId: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
3
- generalHeader: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
4
- name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
- description: import("@activepieces/pieces-framework").LongTextProperty<false>;
6
- isClosed: import("@activepieces/pieces-framework").CheckboxProperty<false>;
7
- responsesLimit: import("@activepieces/pieces-framework").NumberProperty<false>;
8
- afterSubmissionHeader: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
9
- afterMessage: import("@activepieces/pieces-framework").LongTextProperty<false>;
10
- afterRedirectUrl: import("@activepieces/pieces-framework").ShortTextProperty<false>;
11
- afterRedirectDelay: import("@activepieces/pieces-framework").NumberProperty<false>;
12
- ctaLabel: import("@activepieces/pieces-framework").ShortTextProperty<false>;
13
- ctaLabelContinue: import("@activepieces/pieces-framework").ShortTextProperty<false>;
14
- closedMessage: import("@activepieces/pieces-framework").LongTextProperty<false>;
15
- adminEmailHeader: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
16
- adminEmailSubject: import("@activepieces/pieces-framework").ShortTextProperty<false>;
17
- adminEmailNote: import("@activepieces/pieces-framework").LongTextProperty<false>;
18
- adminEmailAttachPdf: import("@activepieces/pieces-framework").CheckboxProperty<false>;
19
- includeResponseInEmail: import("@activepieces/pieces-framework").CheckboxProperty<false>;
20
- afterMessageEmail: import("@activepieces/pieces-framework").LongTextProperty<false>;
21
- afterMessageEmailSubject: import("@activepieces/pieces-framework").ShortTextProperty<false>;
22
- seoHeader: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
23
- seoTitle: import("@activepieces/pieces-framework").ShortTextProperty<false>;
24
- seoDescription: import("@activepieces/pieces-framework").ShortTextProperty<false>;
25
- seoAllowBots: import("@activepieces/pieces-framework").CheckboxProperty<false>;
26
- integrationsHeader: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
27
- discordEnabled: import("@activepieces/pieces-framework").CheckboxProperty<false>;
28
- slackEnabled: import("@activepieces/pieces-framework").CheckboxProperty<false>;
29
- googleSheetsEnabled: import("@activepieces/pieces-framework").CheckboxProperty<false>;
30
- hubspotEnabled: import("@activepieces/pieces-framework").CheckboxProperty<false>;
31
- securityHeader: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
32
- captcha: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
33
- captureLocation: import("@activepieces/pieces-framework").CheckboxProperty<false>;
34
- layoutHeader: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
35
- showFormTitle: import("@activepieces/pieces-framework").CheckboxProperty<false>;
36
- showMultipageProgress: import("@activepieces/pieces-framework").CheckboxProperty<false>;
37
- aiSummaryEnabled: import("@activepieces/pieces-framework").CheckboxProperty<false>;
38
- sendPdfToRespondent: import("@activepieces/pieces-framework").CheckboxProperty<false>;
39
- numberHeader: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
40
- numberPrefix: import("@activepieces/pieces-framework").ShortTextProperty<false>;
41
- numberSuffix: import("@activepieces/pieces-framework").ShortTextProperty<false>;
42
- }>;
43
- //# sourceMappingURL=update-form-settings.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"update-form-settings.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/update-form-settings.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmQ7B,CAAC"}
@@ -1,286 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updateFormSettings = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- const auth_1 = require("../auth");
8
- const common_1 = require("../common");
9
- exports.updateFormSettings = (0, pieces_framework_1.createAction)({
10
- auth: auth_1.deftformAuth,
11
- name: 'update_form_settings',
12
- displayName: 'Update Form Settings',
13
- description: 'Updates any combination of form settings via a single call — from title and status to integrations, SEO, and security.',
14
- audience: 'both',
15
- aiMetadata: { description: 'Update one form configuration in a single call, covering any subset of general info, after-submission behaviour, admin/respondent email, SEO, integration toggles (Slack, Discord, Google Sheets, HubSpot), security/CAPTCHA, layout, and submission numbering. Only the fields you provide are changed; omitted fields are left untouched. Requires the form id. Idempotent: re-sending the same values leaves the form in the same state.', idempotent: true },
16
- props: {
17
- formId: common_1.DeftformCommon.formDropdown,
18
- generalHeader: pieces_framework_1.Property.MarkDown({
19
- value: '## General Settings',
20
- }),
21
- name: pieces_framework_1.Property.ShortText({
22
- displayName: 'Form Name',
23
- description: 'New display name of the form. Leave empty to keep the current value.',
24
- required: false,
25
- }),
26
- description: pieces_framework_1.Property.LongText({
27
- displayName: 'Form Description',
28
- description: 'New description shown on the public form page.',
29
- required: false,
30
- }),
31
- isClosed: pieces_framework_1.Property.Checkbox({
32
- displayName: 'Close Form',
33
- description: 'When checked, the form stops accepting new submissions.',
34
- required: false,
35
- }),
36
- responsesLimit: pieces_framework_1.Property.Number({
37
- displayName: 'Responses Limit',
38
- description: 'Maximum number of submissions allowed. Leave empty for unlimited responses.',
39
- required: false,
40
- }),
41
- afterSubmissionHeader: pieces_framework_1.Property.MarkDown({
42
- value: '## After-Submission Behaviour',
43
- }),
44
- afterMessage: pieces_framework_1.Property.LongText({
45
- displayName: 'After-Submission Message',
46
- description: 'Message shown on screen after the user submits the form.',
47
- required: false,
48
- }),
49
- afterRedirectUrl: pieces_framework_1.Property.ShortText({
50
- displayName: 'After-Submission Redirect URL',
51
- description: 'URL to redirect the respondent to after submission (instead of showing a message).',
52
- required: false,
53
- }),
54
- afterRedirectDelay: pieces_framework_1.Property.Number({
55
- displayName: 'Redirect Delay (seconds)',
56
- description: 'Number of seconds to wait before redirecting. Leave empty for instant redirect.',
57
- required: false,
58
- }),
59
- ctaLabel: pieces_framework_1.Property.ShortText({
60
- displayName: 'CTA Label',
61
- description: 'Text on the primary button shown after submission (e.g. "Download").',
62
- required: false,
63
- }),
64
- ctaLabelContinue: pieces_framework_1.Property.ShortText({
65
- displayName: 'CTA Label Continue',
66
- description: 'Text on the secondary button shown after submission (e.g. "Next").',
67
- required: false,
68
- }),
69
- closedMessage: pieces_framework_1.Property.LongText({
70
- displayName: 'Closed Form Message',
71
- description: 'Message shown when a user tries to access a closed form.',
72
- required: false,
73
- }),
74
- adminEmailHeader: pieces_framework_1.Property.MarkDown({
75
- value: '## Admin Notification Email',
76
- }),
77
- adminEmailSubject: pieces_framework_1.Property.ShortText({
78
- displayName: 'Notification Email Subject',
79
- description: 'Subject line of the email sent to admins on each new submission.',
80
- required: false,
81
- }),
82
- adminEmailNote: pieces_framework_1.Property.LongText({
83
- displayName: 'Notification Email Note',
84
- description: 'Custom note added to the top of the admin notification email.',
85
- required: false,
86
- }),
87
- adminEmailAttachPdf: pieces_framework_1.Property.Checkbox({
88
- displayName: 'Attach Submission PDF',
89
- description: 'Attach a PDF version of the submission to the admin email.',
90
- required: false,
91
- }),
92
- includeResponseInEmail: pieces_framework_1.Property.Checkbox({
93
- displayName: 'Include Response in Email',
94
- description: 'Include the full response data in the admin notification body.',
95
- required: false,
96
- }),
97
- afterMessageEmail: pieces_framework_1.Property.LongText({
98
- displayName: 'Respondent Confirmation Email Message',
99
- description: 'Message sent to the respondent in their confirmation email (if enabled).',
100
- required: false,
101
- }),
102
- afterMessageEmailSubject: pieces_framework_1.Property.ShortText({
103
- displayName: 'Respondent Confirmation Email Subject',
104
- description: 'Subject line of the confirmation email sent to the respondent.',
105
- required: false,
106
- }),
107
- seoHeader: pieces_framework_1.Property.MarkDown({
108
- value: '## SEO Settings',
109
- }),
110
- seoTitle: pieces_framework_1.Property.ShortText({
111
- displayName: 'SEO Title',
112
- description: 'Custom HTML title tag for the public form page.',
113
- required: false,
114
- }),
115
- seoDescription: pieces_framework_1.Property.ShortText({
116
- displayName: 'SEO Description',
117
- description: 'Meta description for the public form page.',
118
- required: false,
119
- }),
120
- seoAllowBots: pieces_framework_1.Property.Checkbox({
121
- displayName: 'Allow Search-Engine Bots',
122
- description: 'When checked, search engines may index the public form page.',
123
- required: false,
124
- }),
125
- integrationsHeader: pieces_framework_1.Property.MarkDown({
126
- value: '## Integrations',
127
- }),
128
- discordEnabled: pieces_framework_1.Property.Checkbox({
129
- displayName: 'Discord Notifications',
130
- description: 'When checked, a notification is sent to the configured Discord channel on each submission.',
131
- required: false,
132
- }),
133
- slackEnabled: pieces_framework_1.Property.Checkbox({
134
- displayName: 'Slack Notifications',
135
- description: 'When checked, a notification is sent to the configured Slack channel on each submission.',
136
- required: false,
137
- }),
138
- googleSheetsEnabled: pieces_framework_1.Property.Checkbox({
139
- displayName: 'Google Sheets Integration',
140
- description: 'When checked, submissions are automatically synced to Google Sheets.',
141
- required: false,
142
- }),
143
- hubspotEnabled: pieces_framework_1.Property.Checkbox({
144
- displayName: 'HubSpot Integration',
145
- description: 'When checked, submissions are pushed to HubSpot as contacts or deals.',
146
- required: false,
147
- }),
148
- securityHeader: pieces_framework_1.Property.MarkDown({
149
- value: '## Security',
150
- }),
151
- captcha: pieces_framework_1.Property.StaticDropdown({
152
- displayName: 'CAPTCHA',
153
- description: 'Protection against spam bots.',
154
- required: false,
155
- options: {
156
- options: [
157
- { label: 'ALTCHA', value: 'altcha' },
158
- { label: 'Turnstile (Cloudflare)', value: 'turnstile' },
159
- { label: 'reCAPTCHA', value: 'recaptcha' },
160
- { label: 'None', value: 'none' },
161
- ],
162
- },
163
- }),
164
- captureLocation: pieces_framework_1.Property.Checkbox({
165
- displayName: 'Capture Location',
166
- description: 'Record the respondent location (IP-based geolocation).',
167
- required: false,
168
- }),
169
- layoutHeader: pieces_framework_1.Property.MarkDown({
170
- value: '## Layout & Display',
171
- }),
172
- showFormTitle: pieces_framework_1.Property.Checkbox({
173
- displayName: 'Show Form Title',
174
- description: 'Display the form title at the top of the public page.',
175
- required: false,
176
- }),
177
- showMultipageProgress: pieces_framework_1.Property.Checkbox({
178
- displayName: 'Show Multi-Page Progress',
179
- description: 'Show a progress bar when the form has multiple pages.',
180
- required: false,
181
- }),
182
- aiSummaryEnabled: pieces_framework_1.Property.Checkbox({
183
- displayName: 'AI Summary',
184
- description: 'Enable the AI-powered summary on the form dashboard.',
185
- required: false,
186
- }),
187
- sendPdfToRespondent: pieces_framework_1.Property.Checkbox({
188
- displayName: 'Send PDF to Respondent',
189
- description: 'Attach a PDF version of the submission to the respondent confirmation email.',
190
- required: false,
191
- }),
192
- numberHeader: pieces_framework_1.Property.MarkDown({
193
- value: '## Submission Numbering',
194
- }),
195
- numberPrefix: pieces_framework_1.Property.ShortText({
196
- displayName: 'Number Prefix',
197
- description: 'Text added before the submission number (e.g. "INV-").',
198
- required: false,
199
- }),
200
- numberSuffix: pieces_framework_1.Property.ShortText({
201
- displayName: 'Number Suffix',
202
- description: 'Text added after the submission number (e.g. "-A").',
203
- required: false,
204
- }),
205
- },
206
- run(context) {
207
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
208
- var _a, _b, _c, _d, _e, _f;
209
- const body = {};
210
- if (context.propsValue.name !== undefined)
211
- body.name = context.propsValue.name;
212
- if (context.propsValue.description !== undefined)
213
- body.description = context.propsValue.description;
214
- if (context.propsValue.isClosed !== undefined)
215
- body.is_closed = context.propsValue.isClosed;
216
- if (context.propsValue.responsesLimit !== undefined)
217
- body.responses_limit = context.propsValue.responsesLimit;
218
- if (context.propsValue.afterMessage !== undefined)
219
- body.after_message = context.propsValue.afterMessage;
220
- if (context.propsValue.afterRedirectUrl !== undefined)
221
- body.after_redirect_url = context.propsValue.afterRedirectUrl;
222
- if (context.propsValue.afterRedirectDelay !== undefined)
223
- body.after_redirect_delay = context.propsValue.afterRedirectDelay;
224
- if (context.propsValue.ctaLabel !== undefined)
225
- body.cta_label = context.propsValue.ctaLabel;
226
- if (context.propsValue.ctaLabelContinue !== undefined)
227
- body.cta_label_continue = context.propsValue.ctaLabelContinue;
228
- if (context.propsValue.closedMessage !== undefined)
229
- body.closed_message = context.propsValue.closedMessage;
230
- if (context.propsValue.adminEmailSubject !== undefined)
231
- body.admin_email_subject = context.propsValue.adminEmailSubject;
232
- if (context.propsValue.adminEmailNote !== undefined)
233
- body.admin_email_note = context.propsValue.adminEmailNote;
234
- if (context.propsValue.adminEmailAttachPdf !== undefined)
235
- body.admin_email_attach_pdf = context.propsValue.adminEmailAttachPdf;
236
- if (context.propsValue.includeResponseInEmail !== undefined)
237
- body.include_response_in_email = context.propsValue.includeResponseInEmail;
238
- if (context.propsValue.afterMessageEmail !== undefined)
239
- body.after_message_email = context.propsValue.afterMessageEmail;
240
- if (context.propsValue.afterMessageEmailSubject !== undefined)
241
- body.after_message_email_subject = context.propsValue.afterMessageEmailSubject;
242
- if (context.propsValue.seoTitle !== undefined)
243
- body.seo_title = context.propsValue.seoTitle;
244
- if (context.propsValue.seoDescription !== undefined)
245
- body.seo_description = context.propsValue.seoDescription;
246
- if (context.propsValue.seoAllowBots !== undefined)
247
- body.seo_allow_bots = context.propsValue.seoAllowBots;
248
- if (context.propsValue.discordEnabled !== undefined)
249
- body.discord_enabled = context.propsValue.discordEnabled;
250
- if (context.propsValue.slackEnabled !== undefined)
251
- body.slack_enabled = context.propsValue.slackEnabled;
252
- if (context.propsValue.googleSheetsEnabled !== undefined)
253
- body.google_sheets_enabled = context.propsValue.googleSheetsEnabled;
254
- if (context.propsValue.hubspotEnabled !== undefined)
255
- body.hubspot_enabled = context.propsValue.hubspotEnabled;
256
- if (context.propsValue.captcha !== undefined)
257
- body.captcha = context.propsValue.captcha;
258
- if (context.propsValue.captureLocation !== undefined)
259
- body.capture_location = context.propsValue.captureLocation;
260
- if (context.propsValue.showFormTitle !== undefined)
261
- body.show_formtitle = context.propsValue.showFormTitle;
262
- if (context.propsValue.showMultipageProgress !== undefined)
263
- body.show_multipage_progress = context.propsValue.showMultipageProgress;
264
- if (context.propsValue.aiSummaryEnabled !== undefined)
265
- body.ai_summary_enabled = context.propsValue.aiSummaryEnabled;
266
- if (context.propsValue.sendPdfToRespondent !== undefined)
267
- body.send_pdf_to_respondent = context.propsValue.sendPdfToRespondent;
268
- if (context.propsValue.numberPrefix !== undefined)
269
- body.number_prefix = context.propsValue.numberPrefix;
270
- if (context.propsValue.numberSuffix !== undefined)
271
- body.number_suffix = context.propsValue.numberSuffix;
272
- const response = yield (0, common_1.deftformApiCall)({
273
- token: context.auth.secret_text,
274
- method: pieces_common_1.HttpMethod.POST,
275
- path: `/forms/${context.propsValue.formId}/settings`,
276
- body,
277
- });
278
- return {
279
- id: (_b = (_a = response.body.data) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : null,
280
- name: (_d = (_c = response.body.data) === null || _c === void 0 ? void 0 : _c.name) !== null && _d !== void 0 ? _d : null,
281
- updated_at: (_f = (_e = response.body.data) === null || _e === void 0 ? void 0 : _e.updated_at) !== null && _f !== void 0 ? _f : null,
282
- };
283
- });
284
- },
285
- });
286
- //# sourceMappingURL=update-form-settings.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"update-form-settings.js","sourceRoot":"","sources":["../../../../src/lib/actions/update-form-settings.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,kCAAuC;AACvC,sCAA4D;AAE/C,QAAA,kBAAkB,GAAG,IAAA,+BAAY,EAAC;IAC3C,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,sBAAsB;IACnC,WAAW,EAAE,wHAAwH;IACrI,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,6aAA6a,EAAE,UAAU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pieces-framework").SecretTextProperty<true>;
2
- //# sourceMappingURL=auth.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/lib/auth.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,mEA6BvB,CAAC"}
package/src/lib/auth.js DELETED
@@ -1,38 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deftformAuth = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- exports.deftformAuth = pieces_framework_1.PieceAuth.SecretText({
8
- displayName: 'API Key',
9
- description: `To get your Deftform API key:
10
- 1. Log in to your Deftform workspace at https://deftform.com
11
- 2. Go to **Settings > API** (https://deftform.com/settings/api)
12
- 3. Click **Create API Key**
13
- 4. Copy the key and paste it here
14
-
15
- Need help? See https://deftform.com/docs/api`,
16
- required: true,
17
- validate: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
18
- try {
19
- yield pieces_common_1.httpClient.sendRequest({
20
- method: pieces_common_1.HttpMethod.GET,
21
- url: 'https://deftform.com/api/v1/workspace',
22
- headers: {
23
- Accept: 'application/json',
24
- 'Content-Type': 'application/json',
25
- },
26
- authentication: {
27
- type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
28
- token: auth,
29
- },
30
- });
31
- return { valid: true };
32
- }
33
- catch (e) {
34
- return { valid: false, error: 'Invalid API Key. Make sure you copied the full key from Deftform.' };
35
- }
36
- }),
37
- });
38
- //# sourceMappingURL=auth.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/lib/auth.ts"],"names":[],"mappings":";;;;AAAA,qEAA2D;AAC3D,+DAAyF;AAE5E,QAAA,YAAY,GAAG,4BAAS,CAAC,UAAU,CAAC;IAC7C,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE;;;;;;6CAM4B;IACzC,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;QACrB,IAAI,CAAC;YACD,MAAM,0BAAU,CAAC,WAAW,CAAC;gBACzB,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,uCAAuC;gBAC5C,OAAO,EAAE;oBACL,MAAM,EAAE,kBAAkB;oBAC1B,cAAc,EAAE,kBAAkB;iBACrC;gBACD,cAAc,EAAE;oBACZ,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,IAAI;iBACd;aACJ,CAAC,CAAC;YACH,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;QAC3B,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACT,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,mEAAmE,EAAE,CAAC;QACxG,CAAC;IACL,CAAC,CAAA;CACJ,CAAC,CAAC"}
@@ -1,18 +0,0 @@
1
- import { HttpMethod, HttpMessageBody, HttpResponse } from '@activepieces/pieces-common';
2
- export declare function deftformApiCall<T extends HttpMessageBody>({ token, method, path, body, queryParams, }: {
3
- token: string;
4
- method: HttpMethod;
5
- path: string;
6
- body?: unknown;
7
- queryParams?: Record<string, string>;
8
- }): Promise<HttpResponse<T>>;
9
- export declare function getApiToken(context: {
10
- auth: {
11
- secret_text: string;
12
- };
13
- }): string;
14
- export declare function flattenObject(obj: Record<string, unknown>, prefix?: string): Record<string, unknown>;
15
- export declare const DeftformCommon: {
16
- formDropdown: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
17
- };
18
- //# sourceMappingURL=index.d.ts.map