@activepieces/piece-esignatures 0.0.1

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/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # pieces-esignatures
2
+
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Building
6
+
7
+ Run `nx build pieces-esignatures` to build the library.
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@activepieces/piece-esignatures",
3
+ "version": "0.0.1",
4
+ "type": "commonjs",
5
+ "main": "./src/index.js",
6
+ "types": "./src/index.d.ts",
7
+ "dependencies": {
8
+ "@sinclair/typebox": "0.34.11",
9
+ "axios": "1.13.1",
10
+ "axios-retry": "4.4.1",
11
+ "deepmerge-ts": "7.1.0",
12
+ "mime-types": "2.1.35",
13
+ "nanoid": "3.3.8",
14
+ "semver": "7.6.0",
15
+ "socket.io-client": "4.8.1",
16
+ "tslib": "^2.3.0",
17
+ "zod": "4.1.13",
18
+ "@activepieces/pieces-common": "0.10.1",
19
+ "@activepieces/pieces-framework": "0.22.2",
20
+ "@activepieces/shared": "0.30.1"
21
+ },
22
+ "resolutions": {
23
+ "rollup": "npm:@rollup/wasm-node"
24
+ }
25
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare const esignatures: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").SecretTextProperty<true>>;
package/src/index.js ADDED
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.esignatures = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const auth_1 = require("./lib/common/auth");
7
+ const shared_1 = require("@activepieces/shared");
8
+ const create_contract_1 = require("./lib/actions/create-contract");
9
+ const pieces_common_1 = require("@activepieces/pieces-common");
10
+ exports.esignatures = (0, pieces_framework_1.createPiece)({
11
+ displayName: 'eSignatures',
12
+ auth: auth_1.esignaturesAuth,
13
+ minimumSupportedRelease: '0.36.1',
14
+ logoUrl: 'https://cdn.activepieces.com/pieces/esignatures.png',
15
+ authors: ['sanket-a11y'],
16
+ categories: [shared_1.PieceCategory.SALES_AND_CRM],
17
+ actions: [
18
+ create_contract_1.createContract,
19
+ (0, pieces_common_1.createCustomApiCallAction)({
20
+ baseUrl: () => `https://esignatures.com/api`,
21
+ authLocation: 'queryParams',
22
+ auth: auth_1.esignaturesAuth,
23
+ authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
24
+ return {
25
+ token: `${auth.secret_text}`,
26
+ };
27
+ }),
28
+ }),
29
+ ],
30
+ triggers: [],
31
+ });
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/esignatures/src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAA6D;AAC7D,4CAAoD;AACpD,iDAAqD;AACrD,mEAA+D;AAC/D,+DAAwE;AAE3D,QAAA,WAAW,GAAG,IAAA,8BAAW,EAAC;IACrC,WAAW,EAAE,aAAa;IAC1B,IAAI,EAAE,sBAAe;IACrB,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,qDAAqD;IAC9D,OAAO,EAAE,CAAC,aAAa,CAAC;IACxB,UAAU,EAAE,CAAC,sBAAa,CAAC,aAAa,CAAC;IACzC,OAAO,EAAE;QACP,gCAAc;QACd,IAAA,yCAAyB,EAAC;YACxB,OAAO,EAAE,GAAG,EAAE,CAAC,6BAA6B;YAC5C,YAAY,EAAE,aAAa;YAC3B,IAAI,EAAE,sBAAe;YACrB,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAC1B,OAAO;oBACL,KAAK,EAAE,GAAG,IAAI,CAAC,WAAW,EAAE;iBAC7B,CAAC;YACJ,CAAC,CAAA;SACF,CAAC;KACH;IACD,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ export declare const createContract: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ templateId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ title: import("@activepieces/pieces-framework").ShortTextProperty<false>;
4
+ locale: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
5
+ metadata: import("@activepieces/pieces-framework").ShortTextProperty<false>;
6
+ expiresInHours: import("@activepieces/pieces-framework").NumberProperty<false>;
7
+ customWebhookUrl: import("@activepieces/pieces-framework").ShortTextProperty<false>;
8
+ assignedUserEmail: import("@activepieces/pieces-framework").ShortTextProperty<false>;
9
+ labels: import("@activepieces/pieces-framework").ArrayProperty<false>;
10
+ test: import("@activepieces/pieces-framework").CheckboxProperty<false>;
11
+ saveAsDraft: import("@activepieces/pieces-framework").CheckboxProperty<false>;
12
+ signers: import("@activepieces/pieces-framework").ArrayProperty<true>;
13
+ }>;
@@ -0,0 +1,137 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createContract = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const auth_1 = require("../common/auth");
7
+ const pieces_common_1 = require("@activepieces/pieces-common");
8
+ exports.createContract = (0, pieces_framework_1.createAction)({
9
+ auth: auth_1.esignaturesAuth,
10
+ name: 'createContract',
11
+ displayName: 'Create Contract',
12
+ description: 'Create a new contract from a template in eSignatures',
13
+ props: {
14
+ templateId: pieces_framework_1.Property.ShortText({
15
+ displayName: 'Template ID',
16
+ description: 'The ID of the template to use for the contract',
17
+ required: true,
18
+ }),
19
+ title: pieces_framework_1.Property.ShortText({
20
+ displayName: 'Contract Title',
21
+ description: 'Unique title for the contract (defaults to template title if not specified)',
22
+ required: false,
23
+ }),
24
+ locale: pieces_framework_1.Property.StaticDropdown({
25
+ displayName: 'Language',
26
+ description: 'Language setting for the signer page and emails',
27
+ required: false,
28
+ options: {
29
+ disabled: false,
30
+ options: [
31
+ { label: 'Czech', value: 'cz' },
32
+ { label: 'Danish', value: 'da' },
33
+ { label: 'German', value: 'de' },
34
+ { label: 'Greek', value: 'el' },
35
+ { label: 'English', value: 'en' },
36
+ { label: 'English (UK)', value: 'en-GB' },
37
+ { label: 'Spanish', value: 'es' },
38
+ { label: 'Finnish', value: 'fi' },
39
+ { label: 'French', value: 'fr' },
40
+ { label: 'Croatian', value: 'hr' },
41
+ { label: 'Hungarian', value: 'hu' },
42
+ { label: 'Indonesian', value: 'id' },
43
+ { label: 'Italian', value: 'it' },
44
+ { label: 'Japanese', value: 'ja' },
45
+ { label: 'Dutch', value: 'nl' },
46
+ { label: 'Norwegian', value: 'no' },
47
+ { label: 'Polish', value: 'pl' },
48
+ { label: 'Portuguese', value: 'pt' },
49
+ { label: 'Romanian', value: 'ro' },
50
+ { label: 'Serbian', value: 'rs' },
51
+ { label: 'Slovak', value: 'sk' },
52
+ { label: 'Slovenian', value: 'sl' },
53
+ { label: 'Swedish', value: 'sv' },
54
+ { label: 'Vietnamese', value: 'vi' },
55
+ { label: 'Chinese (Simplified)', value: 'zh-CN' },
56
+ ],
57
+ },
58
+ }),
59
+ metadata: pieces_framework_1.Property.ShortText({
60
+ displayName: 'Metadata',
61
+ description: 'Custom data to attach to the contract',
62
+ required: false,
63
+ }),
64
+ expiresInHours: pieces_framework_1.Property.Number({
65
+ displayName: 'Expires In Hours',
66
+ description: 'Sets the expiry time (in hours) for the contract',
67
+ required: false,
68
+ }),
69
+ customWebhookUrl: pieces_framework_1.Property.ShortText({
70
+ displayName: 'Custom Webhook URL',
71
+ description: 'Custom URL for webhook notifications',
72
+ required: false,
73
+ }),
74
+ assignedUserEmail: pieces_framework_1.Property.ShortText({
75
+ displayName: 'Assigned User Email',
76
+ description: 'Email to assign management of the contract',
77
+ required: false,
78
+ }),
79
+ labels: pieces_framework_1.Property.Array({
80
+ displayName: 'Labels',
81
+ description: 'Labels to assign to the contract (for grouping)',
82
+ required: false,
83
+ }),
84
+ test: pieces_framework_1.Property.Checkbox({
85
+ displayName: 'Test Contract',
86
+ description: 'Mark as test/demo contract with no fees charged',
87
+ required: false,
88
+ }),
89
+ saveAsDraft: pieces_framework_1.Property.Checkbox({
90
+ displayName: 'Save as Draft',
91
+ description: 'Save as draft instead of sending to signers',
92
+ required: false,
93
+ }),
94
+ signers: pieces_framework_1.Property.Array({
95
+ displayName: 'Signers',
96
+ description: 'List of individuals required to sign (name, email, and/or mobile)',
97
+ required: true,
98
+ }),
99
+ },
100
+ run(_a) {
101
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
102
+ const payload = {
103
+ template_id: propsValue.templateId,
104
+ };
105
+ if (propsValue.title)
106
+ payload.title = propsValue.title;
107
+ if (propsValue.locale)
108
+ payload.locale = propsValue.locale;
109
+ if (propsValue.metadata)
110
+ payload.metadata = propsValue.metadata;
111
+ if (propsValue.expiresInHours !== undefined)
112
+ payload.expires_in_hours = propsValue.expiresInHours.toString();
113
+ if (propsValue.customWebhookUrl)
114
+ payload.custom_webhook_url = propsValue.customWebhookUrl;
115
+ if (propsValue.assignedUserEmail)
116
+ payload.assigned_user_email = propsValue.assignedUserEmail;
117
+ if (propsValue.labels)
118
+ payload.labels = propsValue.labels;
119
+ if (propsValue.test !== undefined)
120
+ payload.test = propsValue.test ? 'yes' : 'no';
121
+ if (propsValue.saveAsDraft !== undefined)
122
+ payload.save_as_draft = propsValue.saveAsDraft ? 'yes' : 'no';
123
+ if (propsValue.signers)
124
+ payload.signers = propsValue.signers;
125
+ const response = yield pieces_common_1.httpClient.sendRequest({
126
+ method: pieces_common_1.HttpMethod.POST,
127
+ url: `https://esignatures.com/api/contracts?token=${auth.secret_text}`,
128
+ headers: {
129
+ 'Content-Type': 'application/json',
130
+ },
131
+ body: payload,
132
+ });
133
+ return response.body;
134
+ });
135
+ },
136
+ });
137
+ //# sourceMappingURL=create-contract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-contract.js","sourceRoot":"","s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0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.esignaturesAuth = void 0;
4
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
5
+ exports.esignaturesAuth = pieces_framework_1.PieceAuth.SecretText({
6
+ displayName: 'API Key',
7
+ description: 'Esignatures API Key',
8
+ required: true,
9
+ });
10
+ //# sourceMappingURL=auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/esignatures/src/lib/common/auth.ts"],"names":[],"mappings":";;;AAAA,qEAA2D;AAE9C,QAAA,eAAe,GAAG,4BAAS,CAAC,UAAU,CAAC;IAClD,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE,qBAAqB;IAClC,QAAQ,EAAE,IAAI;CACf,CAAC,CAAC"}
File without changes
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/esignatures/src/lib/common/client.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import { TriggerStrategy } from '@activepieces/pieces-framework';
2
+ export declare const contractSentToASigner: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").SecretTextProperty<true>, {}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {}>;
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.contractSentToASigner = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const auth_1 = require("../common/auth");
7
+ exports.contractSentToASigner = (0, pieces_framework_1.createTrigger)({
8
+ auth: auth_1.esignaturesAuth,
9
+ name: 'contractSentToASigner',
10
+ displayName: 'Contract Sent to a Signer',
11
+ description: '',
12
+ props: {},
13
+ sampleData: {
14
+ status: 'contract-sent-to-signer',
15
+ data: {
16
+ signer: {
17
+ id: '386b8eb0-aac5-43ce-aa5e-500d5d548934',
18
+ name: 'test',
19
+ email: 'test@gmail.com',
20
+ mobile: null,
21
+ company_name: 'ss',
22
+ signing_order: '1',
23
+ auto_sign: 'no',
24
+ redirect_url: '',
25
+ events: [
26
+ {
27
+ event: 'email_contract_sent',
28
+ timestamp: '2025-12-16T10:30:15.390Z',
29
+ },
30
+ ],
31
+ },
32
+ contract: {
33
+ id: '4efd01d4-d82b-438d-be3e-07099b35bebc',
34
+ status: 'sent',
35
+ title: 'Sample Consulting Agreement',
36
+ metadata: '',
37
+ labels: [],
38
+ source: 'ui',
39
+ test: 'yes',
40
+ expires_at: '2025-12-30T10:30:12Z',
41
+ assigned_user_email: 'test@gmail.com',
42
+ },
43
+ },
44
+ },
45
+ type: pieces_framework_1.TriggerStrategy.WEBHOOK,
46
+ onEnable(context) {
47
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
48
+ // implement webhook creation logic
49
+ });
50
+ },
51
+ onDisable(context) {
52
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
53
+ // implement webhook deletion logic
54
+ });
55
+ },
56
+ run(context) {
57
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
58
+ const body = context.payload.body;
59
+ if (body.status === 'contract-sent-to-signer') {
60
+ return [context.payload.body];
61
+ }
62
+ return [];
63
+ });
64
+ },
65
+ });
66
+ //# sourceMappingURL=contract-sent-to-a-signer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contract-sent-to-a-signer.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/esignatures/src/lib/triggers/contract-sent-to-a-signer.ts"],"names":[],"mappings":";;;;AAAA,qEAAgF;AAChF,yCAAiD;AACpC,QAA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,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { TriggerStrategy } from '@activepieces/pieces-framework';
2
+ export declare const contractSigned: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").SecretTextProperty<true>, {}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {}>;
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.contractSigned = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const auth_1 = require("../common/auth");
7
+ exports.contractSigned = (0, pieces_framework_1.createTrigger)({
8
+ auth: auth_1.esignaturesAuth,
9
+ name: 'contractSigned',
10
+ displayName: 'Contract Signed',
11
+ description: 'Triggers when a contract is signed',
12
+ props: {},
13
+ sampleData: {
14
+ status: 'contract-signed',
15
+ data: {
16
+ contract: {
17
+ id: '4efd01d4-d82b-438d-be3e-07099b35bebc',
18
+ status: 'signed',
19
+ title: 'Sample Consulting Agreement',
20
+ metadata: '',
21
+ labels: [],
22
+ source: 'ui',
23
+ test: 'yes',
24
+ contract_pdf_url: '',
25
+ signers: [
26
+ {
27
+ id: '386b8eb0-aac5-43ce-aa5e-500d5d548934',
28
+ name: 'sanket',
29
+ email: 'sanketnannaware21@gmail.com',
30
+ mobile: null,
31
+ company_name: 'ss',
32
+ signing_order: '1',
33
+ auto_sign: 'no',
34
+ redirect_url: '',
35
+ events: [
36
+ {
37
+ event: 'email_contract_sent',
38
+ timestamp: '2025-12-16T10:30:15.390Z',
39
+ },
40
+ {
41
+ event: 'contract_viewed',
42
+ timestamp: '2025-12-16T10:30:33.362Z',
43
+ remote_ip: '152.59.8.216',
44
+ },
45
+ {
46
+ event: 'sign_contract',
47
+ timestamp: '2025-12-16T10:30:43.039Z',
48
+ remote_ip: '152.59.8.216',
49
+ },
50
+ {
51
+ event: 'email_final_contract_sent',
52
+ timestamp: '2025-12-16T10:30:44.116Z',
53
+ },
54
+ ],
55
+ signer_field_values: { 'Signer field 1': '1' },
56
+ },
57
+ ],
58
+ finalized_at: '2025-12-16T10:30:43Z',
59
+ assigned_user_email: 'test@gmail.com',
60
+ },
61
+ },
62
+ },
63
+ type: pieces_framework_1.TriggerStrategy.WEBHOOK,
64
+ onEnable(context) {
65
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
66
+ // implement webhook creation logic
67
+ });
68
+ },
69
+ onDisable(context) {
70
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
71
+ // implement webhook deletion logic
72
+ });
73
+ },
74
+ run(context) {
75
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
76
+ const body = context.payload.body;
77
+ if (body.status === 'contract-signed') {
78
+ return [context.payload.body];
79
+ }
80
+ return [];
81
+ });
82
+ },
83
+ });
84
+ //# sourceMappingURL=contract-signed.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contract-signed.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/esignatures/src/lib/triggers/contract-signed.ts"],"names":[],"mappings":";;;;AAAA,qEAAgF;AAChF,yCAAiD;AACpC,QAAA,cAAc,GAAG,IAAA,gCAAa,EAAC;IAC1C,IAAI,EAAE,sBAAe;IACrB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,oCAAoC;IACjD,KAAK,EAAE,EAAE;IACT,UAAU,EAAE;QACV,MAAM,EAAE,iBAAiB;QACzB,IAAI,EAAE;YACJ,QAAQ,EAAE;gBACR,EAAE,EAAE,sCAAsC;gBAC1C,MAAM,EAAE,QAAQ;gBAChB,KAAK,EAAE,6BAA6B;gBACpC,QAAQ,EAAE,EAAE;gBACZ,MAAM,EAAE,EAAE;gBACV,MAAM,EAAE,IAAI;gB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activepieces/pieces-framework';
2
+ export declare const signatureReceived: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").SecretTextProperty<true>, {}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {}>;
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.signatureReceived = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const auth_1 = require("../common/auth");
7
+ exports.signatureReceived = (0, pieces_framework_1.createTrigger)({
8
+ auth: auth_1.esignaturesAuth,
9
+ name: 'signatureReceived',
10
+ displayName: 'Signature Received',
11
+ description: 'Trigger when a singer has signed the contract',
12
+ props: {},
13
+ sampleData: {
14
+ status: 'signer-signed',
15
+ data: {
16
+ signer: {
17
+ id: '6signer6-9999',
18
+ name: 'Sam Signer',
19
+ email: 'sam@tenants.com',
20
+ mobile: '+12481234567',
21
+ company_name: 'ACME Corp',
22
+ signing_order: '1',
23
+ auto_sign: 'no',
24
+ redirect_url: '',
25
+ signer_field_values: {
26
+ city: 'Boston',
27
+ preferred_contact: 'Phone',
28
+ },
29
+ },
30
+ contract: {
31
+ id: '1contr11-2222',
32
+ title: 'Sample NDA',
33
+ metadata: 'ID0001',
34
+ source: 'api',
35
+ test: 'no',
36
+ },
37
+ },
38
+ },
39
+ type: pieces_framework_1.TriggerStrategy.WEBHOOK,
40
+ onEnable(context) {
41
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
42
+ // implement webhook creation logic
43
+ });
44
+ },
45
+ onDisable(context) {
46
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
47
+ // implement webhook deletion logic
48
+ });
49
+ },
50
+ run(context) {
51
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
52
+ const body = context.payload.body;
53
+ if (body.status === 'signer-signed') {
54
+ return [context.payload.body];
55
+ }
56
+ return [];
57
+ });
58
+ },
59
+ });
60
+ //# sourceMappingURL=signature-received.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signature-received.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/esignatures/src/lib/triggers/signature-received.ts"],"names":[],"mappings":";;;;AAAA,qEAAgF;AAChF,yCAAiD;AACpC,QAAA,iBAAiB,GAAG,IAAA,gCAAa,EAAC;IAC7C,IAAI,EAAE,sBAAe;IACrB,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,oBAAoB;IACjC,WAAW,EAAE,+CAA+C;IAC5D,KAAK,EAAE,EAAE;IACT,UAAU,EAAE;QACV,MAAM,EAAE,eAAe;QACvB,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,EAAE,EAAE,eAAe;gBACnB,IAAI,EAAE,YAAY;gBAClB,KAAK,EAAE,iBAAiB;gBACxB,MAAM,EAAE,cAAc;gBACtB,YAAY,EAAE,WAAW;gBACzB,aAAa,EAAE,GAAG;gBAClB,SAAS,EAAE,IAAI;gBACf,YAAY,EAAE,EAAE;gBAChB,mBAAmB,EAAE;oBACnB,IAAI,EAAE,QAAQ;oBACd,iBAAiB,EAAE,OAAO;iBAC3B;aACF;YACD,QAAQ,EAAE;gBACR,EAAE,EAAE,eAAe;gBACnB,KAAK,EAAE,YAAY;gBACnB,QAAQ,EAAE,QAAQ;gBAClB,MAAM,EAAE,KAAK;gBACb,IAAI,EAAE,IAAI;aACX;SACF;KACF;IACD,IAAI,EAAE,kCAAe,CAAC,OAAO;IACvB,QAAQ,CAAC,OAAO;;YACpB,mCAAmC;QACrC,CAAC;KAAA;IACK,SAAS,CAAC,OAAO;;YACrB,mCAAmC;QACrC,CAAC;KAAA;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,IAAW,CAAC;YACzC,IAAI,IAAI,CAAC,MAAM,KAAK,eAAe,EAAE,CAAC;gBACpC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAChC,CAAC;YACD,OAAO,EAAE,CAAC;QACZ,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { TriggerStrategy } from '@activepieces/pieces-framework';
2
+ export declare const signerDeclined: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").SecretTextProperty<true>, {}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {}>;
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.signerDeclined = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const auth_1 = require("../common/auth");
7
+ exports.signerDeclined = (0, pieces_framework_1.createTrigger)({
8
+ auth: auth_1.esignaturesAuth,
9
+ name: 'signerDeclined',
10
+ displayName: 'Signer declined',
11
+ description: 'Trigger when a signer has declined to sign the contract',
12
+ props: {},
13
+ sampleData: {
14
+ status: 'signer-declined',
15
+ data: {
16
+ signer: {
17
+ id: '6signer6-9999',
18
+ name: 'Sam Signer',
19
+ email: 'sam@tenants.com',
20
+ mobile: '+12481234567',
21
+ company_name: 'ACME Corp',
22
+ signing_order: '1',
23
+ auto_sign: 'no',
24
+ redirect_url: '',
25
+ events: [
26
+ {
27
+ event: 'signature_declined',
28
+ reason_for_decline: 'Commencement date is 5th of June',
29
+ timestamp: '2015-10-22T18:19:35.979',
30
+ },
31
+ ],
32
+ },
33
+ contract: {
34
+ id: '1contr11-2222',
35
+ title: 'Sample NDA',
36
+ metadata: 'ID0001',
37
+ source: 'api',
38
+ test: 'no',
39
+ },
40
+ },
41
+ },
42
+ type: pieces_framework_1.TriggerStrategy.WEBHOOK,
43
+ onEnable(context) {
44
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
45
+ // implement webhook creation logic
46
+ });
47
+ },
48
+ onDisable(context) {
49
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
50
+ // implement webhook deletion logic
51
+ });
52
+ },
53
+ run(context) {
54
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
55
+ const body = context.payload.body;
56
+ if (body.status === 'signer-declined') {
57
+ return [context.payload.body];
58
+ }
59
+ return [];
60
+ });
61
+ },
62
+ });
63
+ //# sourceMappingURL=signer-declined.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signer-declined.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/esignatures/src/lib/triggers/signer-declined.ts"],"names":[],"mappings":";;;;AAAA,qEAAgF;AAChF,yCAAiD;AACpC,QAAA,cAAc,GAAG,IAAA,gCAAa,EAAC;IAC1C,IAAI,EAAE,sBAAe;IACrB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,yDAAyD;IACtE,KAAK,EAAE,EAAE;IACT,UAAU,EAAE;QACV,MAAM,EAAE,iBAAiB;QACzB,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,EAAE,EAAE,eAAe;gBACnB,IAAI,EAAE,YAAY;gBAClB,KAAK,EAAE,iBAAiB;gBACxB,MAAM,EAAE,cAAc;gBACtB,YAAY,EAAE,WAAW;gBACzB,aAAa,EAAE,GAAG;gBAClB,SAAS,EAAE,IAAI;gBACf,YAAY,EAAE,EAAE;gBAChB,MAAM,EAAE;oBACN;wBACE,KAAK,EAAE,oBAAoB;wBAC3B,kBAAkB,EAAE,kCAAkC;wBACtD,SAAS,EAAE,yBAAyB;qBACrC;iBACF;aACF;YACD,QAAQ,EAAE;gBACR,EAAE,EAAE,eAAe;gBACnB,KAAK,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