@activepieces/piece-pipedrive 0.2.2 → 0.3.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/package.json +11 -8
- package/src/index.d.ts +2 -1
- package/src/index.js +22 -3
- package/src/index.js.map +1 -1
- package/src/lib/actions/add-person.action/add-person.action.d.ts +8 -1
- package/src/lib/actions/add-person.action/add-person.action.js +56 -133
- package/src/lib/actions/add-person.action/add-person.action.js.map +1 -1
- package/src/lib/common/index.d.ts +0 -1
- package/src/lib/common/index.js +1 -10
- package/src/lib/common/index.js.map +1 -1
- package/src/lib/trigger/new-activity.d.ts +2 -1
- package/src/lib/trigger/new-activity.js +85 -84
- package/src/lib/trigger/new-activity.js.map +1 -1
- package/src/lib/trigger/new-deal.d.ts +2 -1
- package/src/lib/trigger/new-deal.js +127 -132
- package/src/lib/trigger/new-deal.js.map +1 -1
- package/src/lib/trigger/new-person.d.ts +2 -1
- package/src/lib/trigger/new-person.js +86 -85
- package/src/lib/trigger/new-person.js.map +1 -1
- package/src/lib/trigger/updated-deal.d.ts +2 -1
- package/src/lib/trigger/updated-deal.js +126 -131
- package/src/lib/trigger/updated-deal.js.map +1 -1
- package/src/lib/trigger/updated-person.d.ts +2 -1
- package/src/lib/trigger/updated-person.js +86 -85
- package/src/lib/trigger/updated-person.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-pipedrive",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@sinclair/typebox": "0.26.8",
|
|
6
|
-
"axios": "1.
|
|
6
|
+
"axios": "^1.6.3",
|
|
7
|
+
"dayjs": "1.11.9",
|
|
8
|
+
"is-base64": "1.1.0",
|
|
7
9
|
"lodash": "4.17.21",
|
|
8
|
-
"nanoid": "3.3.
|
|
9
|
-
"
|
|
10
|
-
"@activepieces/
|
|
11
|
-
"@activepieces/pieces-
|
|
12
|
-
"
|
|
10
|
+
"nanoid": "3.3.6",
|
|
11
|
+
"semver": "7.5.4",
|
|
12
|
+
"@activepieces/pieces-common": "0.2.8",
|
|
13
|
+
"@activepieces/pieces-framework": "0.7.14",
|
|
14
|
+
"@activepieces/shared": "0.10.66",
|
|
15
|
+
"tslib": "2.6.2"
|
|
13
16
|
},
|
|
14
17
|
"main": "./src/index.js",
|
|
15
|
-
"
|
|
18
|
+
"type": "commonjs"
|
|
16
19
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const pipedriveAuth: import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>;
|
|
2
|
+
export declare const pipedrive: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
|
package/src/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.pipedrive = void 0;
|
|
3
|
+
exports.pipedrive = exports.pipedriveAuth = void 0;
|
|
4
4
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
5
5
|
const add_person_action_1 = require("./lib/actions/add-person.action/add-person.action");
|
|
6
6
|
const new_person_1 = require("./lib/trigger/new-person");
|
|
@@ -8,10 +8,29 @@ const new_deal_1 = require("./lib/trigger/new-deal");
|
|
|
8
8
|
const new_activity_1 = require("./lib/trigger/new-activity");
|
|
9
9
|
const updated_person_1 = require("./lib/trigger/updated-person");
|
|
10
10
|
const updated_deal_1 = require("./lib/trigger/updated-deal");
|
|
11
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
12
|
+
exports.pipedriveAuth = pieces_framework_1.PieceAuth.OAuth2({
|
|
13
|
+
description: '',
|
|
14
|
+
authUrl: 'https://oauth.pipedrive.com/oauth/authorize',
|
|
15
|
+
tokenUrl: 'https://oauth.pipedrive.com/oauth/token',
|
|
16
|
+
required: true,
|
|
17
|
+
scope: ['admin', 'contacts:full', 'users:read'],
|
|
18
|
+
});
|
|
11
19
|
exports.pipedrive = (0, pieces_framework_1.createPiece)({
|
|
12
|
-
displayName:
|
|
20
|
+
displayName: 'Pipedrive',
|
|
21
|
+
minimumSupportedRelease: '0.5.0',
|
|
13
22
|
logoUrl: 'https://cdn.activepieces.com/pieces/pipedrive.png',
|
|
14
|
-
|
|
23
|
+
auth: exports.pipedriveAuth,
|
|
24
|
+
actions: [
|
|
25
|
+
add_person_action_1.addPerson,
|
|
26
|
+
(0, pieces_common_1.createCustomApiCallAction)({
|
|
27
|
+
baseUrl: () => 'https://api.pipedrive.com/v1',
|
|
28
|
+
auth: exports.pipedriveAuth,
|
|
29
|
+
authMapping: (auth) => ({
|
|
30
|
+
Authorization: `Bearer ${auth.access_token}`,
|
|
31
|
+
}),
|
|
32
|
+
}),
|
|
33
|
+
],
|
|
15
34
|
authors: ['ashrafsamhouri'],
|
|
16
35
|
triggers: [new_person_1.newPerson, new_deal_1.newDeal, new_activity_1.newActivity, updated_person_1.updatedPerson, updated_deal_1.updatedDeal],
|
|
17
36
|
});
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/pipedrive/src/index.ts"],"names":[],"mappings":";;;AAAA,qEAA6F;AAC7F,yFAA8E;AAC9E,yDAAqD;AACrD,qDAAiD;AACjD,6DAAyD;AACzD,iEAA6D;AAC7D,6DAAyD;AACzD,+DAAwE;AAE3D,QAAA,aAAa,GAAG,4BAAS,CAAC,MAAM,CAAC;IAC5C,WAAW,EAAE,EAAE;IACf,OAAO,EAAE,6CAA6C;IACtD,QAAQ,EAAE,yCAAyC;IACnD,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,CAAC,OAAO,EAAE,eAAe,EAAE,YAAY,CAAC;CAChD,CAAC,CAAC;AAEU,QAAA,SAAS,GAAG,IAAA,8BAAW,EAAC;IACnC,WAAW,EAAE,WAAW;IACxB,uBAAuB,EAAE,OAAO;IAChC,OAAO,EAAE,mDAAmD;IAC5D,IAAI,EAAE,qBAAa;IACnB,OAAO,EAAE;QACP,6BAAS;QACT,IAAA,yCAAyB,EAAC;YACxB,OAAO,EAAE,GAAG,EAAE,CAAC,8BAA8B;YAC7C,IAAI,EAAE,qBAAa;YACnB,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;gBACtB,aAAa,EAAE,UAAW,IAA4B,CAAC,YAAY,EAAE;aACtE,CAAC;SACH,CAAC;KACH;IACD,OAAO,EAAE,CAAC,gBAAgB,CAAC;IAC3B,QAAQ,EAAE,CAAC,sBAAS,EAAE,kBAAO,EAAE,0BAAW,EAAE,8BAAa,EAAE,0BAAW,CAAC;CACxE,CAAC,CAAC"}
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
export declare const addPerson: import("@activepieces/pieces-framework").
|
|
1
|
+
export declare const addPerson: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
2
|
+
name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
owner_id: import("@activepieces/pieces-framework").DropdownProperty<string, false> | import("@activepieces/pieces-framework").DropdownProperty<string, true>;
|
|
4
|
+
org_id: import("@activepieces/pieces-framework").DropdownProperty<string, false> | import("@activepieces/pieces-framework").DropdownProperty<string, true>;
|
|
5
|
+
email: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
|
+
phone: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
7
|
+
marketing_status: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false> | import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
8
|
+
}>;
|
|
@@ -4,69 +4,69 @@ exports.addPerson = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
6
|
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const
|
|
7
|
+
const __1 = require("../../..");
|
|
8
8
|
exports.addPerson = (0, pieces_framework_1.createAction)({
|
|
9
|
+
auth: __1.pipedriveAuth,
|
|
9
10
|
name: 'add_person',
|
|
10
|
-
displayName:
|
|
11
|
-
description:
|
|
11
|
+
displayName: 'Add Person',
|
|
12
|
+
description: 'Add a new person to the account',
|
|
12
13
|
props: {
|
|
13
|
-
authentication: common_1.pipedriveCommon.authentication,
|
|
14
14
|
name: pieces_framework_1.Property.ShortText({
|
|
15
15
|
displayName: 'Name',
|
|
16
16
|
description: undefined,
|
|
17
17
|
required: true,
|
|
18
18
|
}),
|
|
19
19
|
owner_id: pieces_framework_1.Property.Dropdown({
|
|
20
|
-
displayName:
|
|
21
|
-
refreshers: [
|
|
20
|
+
displayName: 'Owner',
|
|
21
|
+
refreshers: [],
|
|
22
22
|
description: "The user who owns this Person's record",
|
|
23
23
|
required: false,
|
|
24
|
-
options: (
|
|
25
|
-
if (!
|
|
24
|
+
options: ({ auth }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
25
|
+
if (!auth) {
|
|
26
26
|
return {
|
|
27
27
|
disabled: true,
|
|
28
28
|
options: [],
|
|
29
|
-
placeholder:
|
|
29
|
+
placeholder: 'Connect your account',
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
const authProp =
|
|
32
|
+
const authProp = auth;
|
|
33
33
|
const users = (yield getUsers(authProp)).users;
|
|
34
34
|
return {
|
|
35
35
|
disabled: false,
|
|
36
|
-
options: users.map(u => {
|
|
36
|
+
options: users.map((u) => {
|
|
37
37
|
return {
|
|
38
38
|
label: u.name,
|
|
39
|
-
value: u.id
|
|
39
|
+
value: u.id,
|
|
40
40
|
};
|
|
41
|
-
})
|
|
41
|
+
}),
|
|
42
42
|
};
|
|
43
|
-
})
|
|
43
|
+
}),
|
|
44
44
|
}),
|
|
45
45
|
org_id: pieces_framework_1.Property.Dropdown({
|
|
46
|
-
displayName:
|
|
47
|
-
refreshers: [
|
|
48
|
-
description:
|
|
46
|
+
displayName: 'Organization',
|
|
47
|
+
refreshers: [],
|
|
48
|
+
description: 'The Org of this Person',
|
|
49
49
|
required: false,
|
|
50
|
-
options: (
|
|
51
|
-
if (!
|
|
50
|
+
options: ({ auth }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
51
|
+
if (!auth) {
|
|
52
52
|
return {
|
|
53
53
|
disabled: true,
|
|
54
54
|
options: [],
|
|
55
|
-
placeholder:
|
|
55
|
+
placeholder: 'Connect your account',
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
|
-
const authProp =
|
|
58
|
+
const authProp = auth;
|
|
59
59
|
const orgs = (yield getOrganizations(authProp)).orgs;
|
|
60
60
|
return {
|
|
61
61
|
disabled: false,
|
|
62
|
-
options: orgs.map(o => {
|
|
62
|
+
options: orgs.map((o) => {
|
|
63
63
|
return {
|
|
64
64
|
label: o.name,
|
|
65
|
-
value: o.id
|
|
65
|
+
value: o.id,
|
|
66
66
|
};
|
|
67
|
-
})
|
|
67
|
+
}),
|
|
68
68
|
};
|
|
69
|
-
})
|
|
69
|
+
}),
|
|
70
70
|
}),
|
|
71
71
|
email: pieces_framework_1.Property.ShortText({
|
|
72
72
|
displayName: 'Email',
|
|
@@ -79,143 +79,62 @@ exports.addPerson = (0, pieces_framework_1.createAction)({
|
|
|
79
79
|
required: false,
|
|
80
80
|
}),
|
|
81
81
|
marketing_status: pieces_framework_1.Property.StaticDropdown({
|
|
82
|
-
displayName:
|
|
83
|
-
description:
|
|
82
|
+
displayName: 'Marketing Status',
|
|
83
|
+
description: 'Marketing opt-in status',
|
|
84
84
|
required: false,
|
|
85
85
|
options: {
|
|
86
86
|
disabled: false,
|
|
87
87
|
options: [
|
|
88
88
|
{
|
|
89
|
-
label:
|
|
90
|
-
value:
|
|
89
|
+
label: 'No Consent',
|
|
90
|
+
value: 'no_consent',
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
|
-
label:
|
|
94
|
-
value:
|
|
93
|
+
label: 'Unsubscribed',
|
|
94
|
+
value: 'unsubscribed',
|
|
95
95
|
},
|
|
96
96
|
{
|
|
97
|
-
label:
|
|
98
|
-
value:
|
|
97
|
+
label: 'Subscribed',
|
|
98
|
+
value: 'subscribed',
|
|
99
99
|
},
|
|
100
100
|
{
|
|
101
|
-
label:
|
|
102
|
-
value:
|
|
103
|
-
}
|
|
104
|
-
]
|
|
105
|
-
}
|
|
101
|
+
label: 'Archived',
|
|
102
|
+
value: 'archived',
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
},
|
|
106
106
|
}),
|
|
107
107
|
},
|
|
108
108
|
run(context) {
|
|
109
109
|
var _a, _b;
|
|
110
110
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
111
|
-
const configsWithoutAuthentication =
|
|
112
|
-
|
|
111
|
+
const configsWithoutAuthentication = {
|
|
112
|
+
name: context.propsValue.name,
|
|
113
|
+
owner_id: context.propsValue.owner_id,
|
|
114
|
+
org_id: context.propsValue.org_id,
|
|
115
|
+
phone: context.propsValue.phone,
|
|
116
|
+
email: context.propsValue.email,
|
|
117
|
+
marketing_status: context.propsValue.marketing_status,
|
|
118
|
+
};
|
|
113
119
|
const request = {
|
|
114
120
|
method: pieces_common_1.HttpMethod.POST,
|
|
115
|
-
url: `${context.
|
|
121
|
+
url: `${context.auth.data['api_domain']}/api/v1/persons`,
|
|
116
122
|
body: configsWithoutAuthentication,
|
|
117
123
|
authentication: {
|
|
118
124
|
type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
|
|
119
|
-
token: context.
|
|
125
|
+
token: context.auth.access_token,
|
|
120
126
|
},
|
|
121
127
|
queryParams: {},
|
|
122
128
|
};
|
|
123
129
|
const result = yield pieces_common_1.httpClient.sendRequest(request);
|
|
124
130
|
if ((_a = result.body) === null || _a === void 0 ? void 0 : _a['success']) {
|
|
125
|
-
return (_b = result.body) === null || _b === void 0 ? void 0 : _b[
|
|
131
|
+
return (_b = result.body) === null || _b === void 0 ? void 0 : _b['data'];
|
|
126
132
|
}
|
|
127
133
|
else {
|
|
128
134
|
return result;
|
|
129
135
|
}
|
|
130
136
|
});
|
|
131
137
|
},
|
|
132
|
-
sampleData: {
|
|
133
|
-
"id": 1,
|
|
134
|
-
"company_id": 12,
|
|
135
|
-
"owner_id": {
|
|
136
|
-
"id": 123,
|
|
137
|
-
"name": "Jane Doe",
|
|
138
|
-
"email": "jane@pipedrive.com",
|
|
139
|
-
"has_pic": 1,
|
|
140
|
-
"pic_hash": "2611ace8ac6a3afe2f69ed56f9e08c6b",
|
|
141
|
-
"active_flag": true,
|
|
142
|
-
"value": 123
|
|
143
|
-
},
|
|
144
|
-
"org_id": {
|
|
145
|
-
"name": "Org Name",
|
|
146
|
-
"people_count": 1,
|
|
147
|
-
"owner_id": 123,
|
|
148
|
-
"address": "Mustamäe tee 3a, 10615 Tallinn",
|
|
149
|
-
"active_flag": true,
|
|
150
|
-
"cc_email": "org@pipedrivemail.com",
|
|
151
|
-
"value": 1234
|
|
152
|
-
},
|
|
153
|
-
"name": "Will Smith",
|
|
154
|
-
"first_name": "Will",
|
|
155
|
-
"last_name": "Smith",
|
|
156
|
-
"open_deals_count": 2,
|
|
157
|
-
"related_open_deals_count": 2,
|
|
158
|
-
"closed_deals_count": 3,
|
|
159
|
-
"related_closed_deals_count": 3,
|
|
160
|
-
"participant_open_deals_count": 1,
|
|
161
|
-
"participant_closed_deals_count": 1,
|
|
162
|
-
"email_messages_count": 1,
|
|
163
|
-
"activities_count": 1,
|
|
164
|
-
"done_activities_count": 1,
|
|
165
|
-
"undone_activities_count": 2,
|
|
166
|
-
"files_count": 2,
|
|
167
|
-
"notes_count": 2,
|
|
168
|
-
"followers_count": 3,
|
|
169
|
-
"won_deals_count": 3,
|
|
170
|
-
"related_won_deals_count": 3,
|
|
171
|
-
"lost_deals_count": 1,
|
|
172
|
-
"related_lost_deals_count": 1,
|
|
173
|
-
"active_flag": true,
|
|
174
|
-
"phone": [
|
|
175
|
-
{
|
|
176
|
-
"value": "12345",
|
|
177
|
-
"primary": true,
|
|
178
|
-
"label": "work"
|
|
179
|
-
}
|
|
180
|
-
],
|
|
181
|
-
"email": [
|
|
182
|
-
{
|
|
183
|
-
"value": "12345@email.com",
|
|
184
|
-
"primary": true,
|
|
185
|
-
"label": "work"
|
|
186
|
-
}
|
|
187
|
-
],
|
|
188
|
-
"primary_email": "12345@email.com",
|
|
189
|
-
"first_char": "w",
|
|
190
|
-
"update_time": "2020-05-08 05:30:20",
|
|
191
|
-
"add_time": "2017-10-18 13:23:07",
|
|
192
|
-
"visible_to": "3",
|
|
193
|
-
"marketing_status": "no_consent",
|
|
194
|
-
"picture_id": {
|
|
195
|
-
"item_type": "person",
|
|
196
|
-
"item_id": 25,
|
|
197
|
-
"active_flag": true,
|
|
198
|
-
"add_time": "2020-09-08 08:17:52",
|
|
199
|
-
"update_time": "0000-00-00 00:00:00",
|
|
200
|
-
"added_by_user_id": 967055,
|
|
201
|
-
"pictures": {
|
|
202
|
-
"128": "https://pipedrive-profile-pics.s3.example.com/f8893852574273f2747bf6ef09d11cfb4ac8f269_128.jpg",
|
|
203
|
-
"512": "https://pipedrive-profile-pics.s3.example.com/f8893852574273f2747bf6ef09d11cfb4ac8f269_512.jpg"
|
|
204
|
-
},
|
|
205
|
-
"value": 4
|
|
206
|
-
},
|
|
207
|
-
"next_activity_date": "2019-11-29",
|
|
208
|
-
"next_activity_time": "11:30:00",
|
|
209
|
-
"next_activity_id": 128,
|
|
210
|
-
"last_activity_id": 34,
|
|
211
|
-
"last_activity_date": "2019-11-28",
|
|
212
|
-
"last_incoming_mail_time": "2019-05-29 18:21:42",
|
|
213
|
-
"last_outgoing_mail_time": "2019-05-30 03:45:35",
|
|
214
|
-
"label": 1,
|
|
215
|
-
"org_name": "Organization name",
|
|
216
|
-
"owner_name": "Jane Doe",
|
|
217
|
-
"cc_email": "org@pipedrivemail.com"
|
|
218
|
-
}
|
|
219
138
|
});
|
|
220
139
|
function getUsers(authProp) {
|
|
221
140
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
@@ -230,7 +149,9 @@ function getUsers(authProp) {
|
|
|
230
149
|
};
|
|
231
150
|
const result = yield pieces_common_1.httpClient.sendRequest(request);
|
|
232
151
|
return {
|
|
233
|
-
users: result.body['success'] && result.body['data'] != null
|
|
152
|
+
users: result.body['success'] && result.body['data'] != null
|
|
153
|
+
? result.body['data']
|
|
154
|
+
: [],
|
|
234
155
|
};
|
|
235
156
|
});
|
|
236
157
|
}
|
|
@@ -244,12 +165,14 @@ function getOrganizations(authProp) {
|
|
|
244
165
|
token: authProp.access_token,
|
|
245
166
|
},
|
|
246
167
|
queryParams: {
|
|
247
|
-
limit:
|
|
168
|
+
limit: '500', // max limit is 500 (API restriction)
|
|
248
169
|
},
|
|
249
170
|
};
|
|
250
171
|
const result = yield pieces_common_1.httpClient.sendRequest(request);
|
|
251
172
|
return {
|
|
252
|
-
orgs: result.body['success'] && result.body['data'] != null
|
|
173
|
+
orgs: result.body['success'] && result.body['data'] != null
|
|
174
|
+
? result.body['data']
|
|
175
|
+
: [],
|
|
253
176
|
};
|
|
254
177
|
});
|
|
255
178
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-person.action.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"add-person.action.js","sourceRoot":"","sources":["../../../../../../../../../packages/pieces/community/pipedrive/src/lib/actions/add-person.action/add-person.action.ts"],"names":[],"mappings":";;;;AAAA,qEAIwC;AACxC,+DAKqC;AACrC,gCAAyC;AAE5B,QAAA,SAAS,GAAG,IAAA,+BAAY,EAAC;IACpC,IAAI,EAAE,iBAAa;IACnB,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,YAAY;IACzB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,KAAK,EACH,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI;gBACnD,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;gBACrB,CAAC,CAAkB,EAAE;SAC1B,CAAC;IACJ,CAAC;CAAA;AAED,SAAe,gBAAgB,CAC7B,QAA6B;;QAE7B,MAAM,OAAO,GAAgB;YAC3B,MAAM,EAAE,0BAAU,CAAC,GAAG;YACtB,GAAG,EAAE,GAAG,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,uBAAuB;YAC1D,cAAc,EAAE;gBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;gBACrC,KAAK,EAAE,QAAQ,CAAC,YAAY;aAC7B;YACD,WAAW,EAAE;gBACX,KAAK,EAAE,KAAK,EAAE,qCAAqC;aACpD;SACF,CAAC;QAEF,MAAM,MAAM,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAErD,OAAO;YACL,IAAI,EACF,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI;gBACnD,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;gBACrB,CAAC,CAA0B,EAAE;SAClC,CAAC;IACJ,CAAC;CAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export declare const pipedriveCommon: {
|
|
2
|
-
authentication: import("@activepieces/pieces-framework").OAuth2Property<true, import("@activepieces/pieces-framework").OAuth2Props>;
|
|
3
2
|
subscribeWebhook: (object: string, action: string, webhookUrl: string, apiDomain: string, accessToken: string) => Promise<{
|
|
4
3
|
data: {
|
|
5
4
|
id: string;
|
package/src/lib/common/index.js
CHANGED
|
@@ -2,17 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.pipedriveCommon = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
5
|
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
6
|
exports.pipedriveCommon = {
|
|
8
|
-
authentication: pieces_framework_1.Property.OAuth2({
|
|
9
|
-
description: "",
|
|
10
|
-
displayName: 'Authentication',
|
|
11
|
-
authUrl: "https://oauth.pipedrive.com/oauth/authorize",
|
|
12
|
-
tokenUrl: "https://oauth.pipedrive.com/oauth/token",
|
|
13
|
-
required: true,
|
|
14
|
-
scope: ["admin", "contacts:full", "users:read"]
|
|
15
|
-
}),
|
|
16
7
|
subscribeWebhook: (object, action, webhookUrl, apiDomain, accessToken) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
17
8
|
const request = {
|
|
18
9
|
method: pieces_common_1.HttpMethod.POST,
|
|
@@ -41,6 +32,6 @@ exports.pipedriveCommon = {
|
|
|
41
32
|
},
|
|
42
33
|
};
|
|
43
34
|
return yield pieces_common_1.httpClient.sendRequest(request);
|
|
44
|
-
})
|
|
35
|
+
}),
|
|
45
36
|
};
|
|
46
37
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/pipedrive/src/lib/common/index.ts"],"names":[],"mappings":";;;;AAAA,+DAKqC;AAExB,QAAA,eAAe,GAAG;IAC7B,gBAAgB,EAAE,CAChB,MAAc,EACd,MAAc,EACd,UAAkB,EAClB,SAAiB,EACjB,WAAmB,EACnB,EAAE;QACF,MAAM,OAAO,GAAgB;YAC3B,MAAM,EAAE,0BAAU,CAAC,IAAI;YACvB,GAAG,EAAE,GAAG,SAAS,kBAAkB;YACnC,IAAI,EAAE;gBACJ,YAAY,EAAE,MAAM;gBACpB,YAAY,EAAE,MAAM;gBACpB,gBAAgB,EAAE,UAAU;aAC7B;YACD,cAAc,EAAE;gBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;gBACrC,KAAK,EAAE,WAAW;aACnB;YACD,WAAW,EAAE,EAAE;SAChB,CAAC;QAEF,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,MAAM,0BAAU,CAAC,WAAW,CAEnD,OAAO,CAAC,CAAC;QACZ,OAAO,OAAO,CAAC;IACjB,CAAC,CAAA;IACD,kBAAkB,EAAE,CAClB,SAAiB,EACjB,SAAiB,EACjB,WAAmB,EACnB,EAAE;QACF,MAAM,OAAO,GAAgB;YAC3B,MAAM,EAAE,0BAAU,CAAC,MAAM;YACzB,GAAG,EAAE,GAAG,SAAS,oBAAoB,SAAS,EAAE;YAChD,cAAc,EAAE;gBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;gBACrC,KAAK,EAAE,WAAW;aACnB;SACF,CAAC;QACF,OAAO,MAAM,0BAAU,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC/C,CAAC,CAAA;CACF,CAAC"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { TriggerStrategy } from '@activepieces/pieces-framework';
|
|
2
|
+
export declare const newActivity: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {}>;
|