@scopieflows/app-copper 0.1.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 +7 -0
- package/package.json +28 -0
- package/src/i18n/de.json +285 -0
- package/src/i18n/es.json +285 -0
- package/src/i18n/fr.json +285 -0
- package/src/i18n/ja.json +285 -0
- package/src/i18n/nl.json +285 -0
- package/src/i18n/pt.json +285 -0
- package/src/i18n/translation.json +285 -0
- package/src/i18n/zh.json +285 -0
- package/src/index.d.ts +4 -0
- package/src/index.js +94 -0
- package/src/index.js.map +1 -0
- package/src/lib/actions/convert-lead.d.ts +23 -0
- package/src/lib/actions/convert-lead.js +52 -0
- package/src/lib/actions/convert-lead.js.map +1 -0
- package/src/lib/actions/create-activity.d.ts +15 -0
- package/src/lib/actions/create-activity.js +108 -0
- package/src/lib/actions/create-activity.js.map +1 -0
- package/src/lib/actions/create-company.d.ts +21 -0
- package/src/lib/actions/create-company.js +103 -0
- package/src/lib/actions/create-company.js.map +1 -0
- package/src/lib/actions/create-lead.d.ts +14 -0
- package/src/lib/actions/create-lead.js +101 -0
- package/src/lib/actions/create-lead.js.map +1 -0
- package/src/lib/actions/create-opportunity.d.ts +24 -0
- package/src/lib/actions/create-opportunity.js +69 -0
- package/src/lib/actions/create-opportunity.js.map +1 -0
- package/src/lib/actions/create-person.d.ts +13 -0
- package/src/lib/actions/create-person.js +122 -0
- package/src/lib/actions/create-person.js.map +1 -0
- package/src/lib/actions/create-project.d.ts +7 -0
- package/src/lib/actions/create-project.js +35 -0
- package/src/lib/actions/create-project.js.map +1 -0
- package/src/lib/actions/create-task.d.ts +27 -0
- package/src/lib/actions/create-task.js +142 -0
- package/src/lib/actions/create-task.js.map +1 -0
- package/src/lib/actions/search-for-a-company.d.ts +40 -0
- package/src/lib/actions/search-for-a-company.js +258 -0
- package/src/lib/actions/search-for-a-company.js.map +1 -0
- package/src/lib/actions/search-for-a-lead.d.ts +52 -0
- package/src/lib/actions/search-for-a-lead.js +274 -0
- package/src/lib/actions/search-for-a-lead.js.map +1 -0
- package/src/lib/actions/search-for-a-person.d.ts +54 -0
- package/src/lib/actions/search-for-a-person.js +235 -0
- package/src/lib/actions/search-for-a-person.js.map +1 -0
- package/src/lib/actions/search-for-a-project.d.ts +24 -0
- package/src/lib/actions/search-for-a-project.js +165 -0
- package/src/lib/actions/search-for-a-project.js.map +1 -0
- package/src/lib/actions/search-for-an-activity.d.ts +22 -0
- package/src/lib/actions/search-for-an-activity.js +130 -0
- package/src/lib/actions/search-for-an-activity.js.map +1 -0
- package/src/lib/actions/search-for-an-opportunity.d.ts +74 -0
- package/src/lib/actions/search-for-an-opportunity.js +334 -0
- package/src/lib/actions/search-for-an-opportunity.js.map +1 -0
- package/src/lib/actions/update-company.d.ts +23 -0
- package/src/lib/actions/update-company.js +135 -0
- package/src/lib/actions/update-company.js.map +1 -0
- package/src/lib/actions/update-lead.d.ts +13 -0
- package/src/lib/actions/update-lead.js +136 -0
- package/src/lib/actions/update-lead.js.map +1 -0
- package/src/lib/actions/update-opportunity.d.ts +34 -0
- package/src/lib/actions/update-opportunity.js +89 -0
- package/src/lib/actions/update-opportunity.js.map +1 -0
- package/src/lib/actions/update-person.d.ts +13 -0
- package/src/lib/actions/update-person.js +155 -0
- package/src/lib/actions/update-person.js.map +1 -0
- package/src/lib/actions/update-project.d.ts +16 -0
- package/src/lib/actions/update-project.js +56 -0
- package/src/lib/actions/update-project.js.map +1 -0
- package/src/lib/common/constants.d.ts +35 -0
- package/src/lib/common/constants.js +54 -0
- package/src/lib/common/constants.js.map +1 -0
- package/src/lib/common/props.d.ts +168 -0
- package/src/lib/common/props.js +679 -0
- package/src/lib/common/props.js.map +1 -0
- package/src/lib/common/requests.d.ts +33 -0
- package/src/lib/common/requests.js +320 -0
- package/src/lib/common/requests.js.map +1 -0
- package/src/lib/triggers/new-activity.d.ts +14 -0
- package/src/lib/triggers/new-activity.js +74 -0
- package/src/lib/triggers/new-activity.js.map +1 -0
- package/src/lib/triggers/new-lead.d.ts +14 -0
- package/src/lib/triggers/new-lead.js +45 -0
- package/src/lib/triggers/new-lead.js.map +1 -0
- package/src/lib/triggers/new-person.d.ts +14 -0
- package/src/lib/triggers/new-person.js +45 -0
- package/src/lib/triggers/new-person.js.map +1 -0
- package/src/lib/triggers/new-task.d.ts +14 -0
- package/src/lib/triggers/new-task.js +45 -0
- package/src/lib/triggers/new-task.js.map +1 -0
- package/src/lib/triggers/updated-lead-status.d.ts +14 -0
- package/src/lib/triggers/updated-lead-status.js +66 -0
- package/src/lib/triggers/updated-lead-status.js.map +1 -0
- package/src/lib/triggers/updated-lead.d.ts +14 -0
- package/src/lib/triggers/updated-lead.js +45 -0
- package/src/lib/triggers/updated-lead.js.map +1 -0
- package/src/lib/triggers/updated-opportunity-stage.d.ts +14 -0
- package/src/lib/triggers/updated-opportunity-stage.js +73 -0
- package/src/lib/triggers/updated-opportunity-stage.js.map +1 -0
- package/src/lib/triggers/updated-opportunity-status.d.ts +14 -0
- package/src/lib/triggers/updated-opportunity-status.js +66 -0
- package/src/lib/triggers/updated-opportunity-status.js.map +1 -0
- package/src/lib/triggers/updated-opportunity.d.ts +14 -0
- package/src/lib/triggers/updated-opportunity.js +45 -0
- package/src/lib/triggers/updated-opportunity.js.map +1 -0
- package/src/lib/triggers/updated-project.d.ts +14 -0
- package/src/lib/triggers/updated-project.js +45 -0
- package/src/lib/triggers/updated-project.js.map +1 -0
- package/src/lib/triggers/updated-task.d.ts +14 -0
- package/src/lib/triggers/updated-task.js +45 -0
- package/src/lib/triggers/updated-task.js.map +1 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.newTask = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@scopieflows/pieces-framework");
|
|
6
|
+
const constants_1 = require("../common/constants");
|
|
7
|
+
const requests_1 = require("../common/requests");
|
|
8
|
+
const CACHE_KEY = 'copper_new_task_trigger_key';
|
|
9
|
+
exports.newTask = (0, pieces_framework_1.createTrigger)({
|
|
10
|
+
auth: constants_1.CopperAuth,
|
|
11
|
+
name: 'newTask',
|
|
12
|
+
displayName: 'New Task',
|
|
13
|
+
description: 'Triggers when a new task is created.',
|
|
14
|
+
props: {},
|
|
15
|
+
sampleData: {},
|
|
16
|
+
type: pieces_framework_1.TriggerStrategy.WEBHOOK,
|
|
17
|
+
onEnable(context) {
|
|
18
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
const response = yield requests_1.CopperApiService.createWebhook(context.auth, {
|
|
20
|
+
target: context.webhookUrl,
|
|
21
|
+
type: 'task',
|
|
22
|
+
event: 'new',
|
|
23
|
+
});
|
|
24
|
+
yield context.store.put(CACHE_KEY, {
|
|
25
|
+
webhookId: response.id,
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
},
|
|
29
|
+
onDisable(context) {
|
|
30
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
const cachedWebhookData = (yield context.store.get(CACHE_KEY));
|
|
32
|
+
if (cachedWebhookData) {
|
|
33
|
+
yield requests_1.CopperApiService.deleteWebhook(context.auth, cachedWebhookData.webhookId).then(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
yield context.store.delete(CACHE_KEY);
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
run(context) {
|
|
40
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
return [context.payload.body];
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
//# sourceMappingURL=new-task.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new-task.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/copper/src/lib/triggers/new-task.ts"],"names":[],"mappings":";;;;AAAA,oEAA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flows/pieces-framework';
|
|
2
|
+
export declare const updatedLeadStatus: import("@scopieflows/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@scopieflows/pieces-framework").CustomAuthProperty<{
|
|
3
|
+
email: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
apiKey: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
5
|
+
}>, {}> | import("@scopieflows/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@scopieflows/pieces-framework").CustomAuthProperty<{
|
|
6
|
+
email: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
apiKey: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
8
|
+
}>, {}> | import("@scopieflows/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@scopieflows/pieces-framework").CustomAuthProperty<{
|
|
9
|
+
email: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
10
|
+
apiKey: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
11
|
+
}>, {}> | import("@scopieflows/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@scopieflows/pieces-framework").CustomAuthProperty<{
|
|
12
|
+
email: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
13
|
+
apiKey: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
14
|
+
}>, {}>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updatedLeadStatus = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@scopieflows/pieces-framework");
|
|
6
|
+
const constants_1 = require("../common/constants");
|
|
7
|
+
const requests_1 = require("../common/requests");
|
|
8
|
+
const CACHE_KEY = 'copper_updated_lead_status_trigger_key';
|
|
9
|
+
exports.updatedLeadStatus = (0, pieces_framework_1.createTrigger)({
|
|
10
|
+
auth: constants_1.CopperAuth,
|
|
11
|
+
name: 'updatedLeadStatus',
|
|
12
|
+
displayName: 'Updated Lead Status',
|
|
13
|
+
description: 'Triggers when the status of a lead changes.',
|
|
14
|
+
props: {},
|
|
15
|
+
sampleData: {},
|
|
16
|
+
type: pieces_framework_1.TriggerStrategy.WEBHOOK,
|
|
17
|
+
onEnable(context) {
|
|
18
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
const response = yield requests_1.CopperApiService.createWebhook(context.auth, {
|
|
20
|
+
target: context.webhookUrl,
|
|
21
|
+
type: 'lead',
|
|
22
|
+
event: 'update',
|
|
23
|
+
});
|
|
24
|
+
yield context.store.put(CACHE_KEY, {
|
|
25
|
+
webhookId: response.id,
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
},
|
|
29
|
+
onDisable(context) {
|
|
30
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
const cachedWebhookData = (yield context.store.get(CACHE_KEY));
|
|
32
|
+
if (cachedWebhookData) {
|
|
33
|
+
yield requests_1.CopperApiService.deleteWebhook(context.auth, cachedWebhookData.webhookId).then(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
yield context.store.delete(CACHE_KEY);
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
run(context) {
|
|
40
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
var _a;
|
|
42
|
+
const body = context.payload.body;
|
|
43
|
+
const ids = Array.isArray(body === null || body === void 0 ? void 0 : body.ids) ? body.ids : [];
|
|
44
|
+
const updatedAttrs = (_a = body === null || body === void 0 ? void 0 : body.updated_attributes) !== null && _a !== void 0 ? _a : {};
|
|
45
|
+
const statusChanged = Array.isArray(updatedAttrs.status) &&
|
|
46
|
+
updatedAttrs.status.length === 2 &&
|
|
47
|
+
updatedAttrs.status[0] !== updatedAttrs.status[1];
|
|
48
|
+
if (!statusChanged) {
|
|
49
|
+
return [];
|
|
50
|
+
}
|
|
51
|
+
const events = ids.map((id) => {
|
|
52
|
+
var _a, _b, _c, _d;
|
|
53
|
+
return ({
|
|
54
|
+
id,
|
|
55
|
+
change_type: 'status_change',
|
|
56
|
+
previous_status: (_b = (_a = updatedAttrs.status) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : null,
|
|
57
|
+
current_status: (_d = (_c = updatedAttrs.status) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : null,
|
|
58
|
+
subscription_id: body.subscription_id,
|
|
59
|
+
timestamp: body.timestamp,
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
return events;
|
|
63
|
+
});
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
//# sourceMappingURL=updated-lead-status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updated-lead-status.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/copper/src/lib/triggers/updated-lead-status.ts"],"names":[],"mappings":";;;;AACA,oEAA+E;AAC/E,mDAAiD;AACjD,iDAAsD;AAEtD,MAAM,SAAS,GAAG,wCAAwC,CAAC;AAE9C,QAAA,iBAAiB,GAAG,IAAA,gCAAa,EAAC;IAC3C,IAAI,EAAE,sBAAU;IAChB,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,qBAAqB;IAClC,WAAW,EAAE,6CAA6C;IAC1D,KAAK,EAAE,EAAE;IACT,UAAU,EAAE,EAAE;IACd,IAAI,EAAE,kCAAe,CAAC,OAAO;IACzB,QAAQ,CAAC,OAAO;;YACpB,MAAM,QAAQ,GAAG,MAAM,2BAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,EAAE;gBAClE,MAAM,EAAE,OAAO,CAAC,UAAU;gBAC1B,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,QAAQ;aAChB,CAAC,CAAC;YAEH,MAAM,OAAO,CAAC,KAAK,CAAC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C;oBAC/C,EAAE;oBACF,WAAW,EAAE,eAAe;oBAC5B,eAAe,EAAE,MAAA,MAAA,YAAY,CAAC,MAAM,0CAAG,CAAC,CAAC,mCAAI,IAAI;oBACjD,cAAc,EAAE,MAAA,MAAA,YAAY,CAAC,MAAM,0CAAG,CAAC,CAAC,mCAAI,IAAI;oBAChD,eAAe,EAAE,IAAI,CAAC,eAAe;oBACrC,SAAS,EAAE,IAAI,CAAC,SAAS;iBAC1B,CAAC,CAAA;aAAA,CAAC,CAAC;YAEJ,OAAO,MAAM,CAAC;QACf,CAAC;KAAA;CACF,CAAC,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TriggerStrategy } from '@scopieflows/pieces-framework';
|
|
2
|
+
export declare const updatedLead: import("@scopieflows/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@scopieflows/pieces-framework").CustomAuthProperty<{
|
|
3
|
+
email: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
apiKey: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
5
|
+
}>, {}> | import("@scopieflows/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@scopieflows/pieces-framework").CustomAuthProperty<{
|
|
6
|
+
email: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
apiKey: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
8
|
+
}>, {}> | import("@scopieflows/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@scopieflows/pieces-framework").CustomAuthProperty<{
|
|
9
|
+
email: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
10
|
+
apiKey: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
11
|
+
}>, {}> | import("@scopieflows/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@scopieflows/pieces-framework").CustomAuthProperty<{
|
|
12
|
+
email: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
13
|
+
apiKey: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
14
|
+
}>, {}>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updatedLead = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@scopieflows/pieces-framework");
|
|
6
|
+
const requests_1 = require("../common/requests");
|
|
7
|
+
const constants_1 = require("../common/constants");
|
|
8
|
+
const CACHE_KEY = 'copper_updated_lead_trigger_key';
|
|
9
|
+
exports.updatedLead = (0, pieces_framework_1.createTrigger)({
|
|
10
|
+
auth: constants_1.CopperAuth,
|
|
11
|
+
name: 'updatedLead',
|
|
12
|
+
displayName: 'Updated Lead',
|
|
13
|
+
description: 'Triggers when a lead is modified.',
|
|
14
|
+
props: {},
|
|
15
|
+
sampleData: {},
|
|
16
|
+
type: pieces_framework_1.TriggerStrategy.WEBHOOK,
|
|
17
|
+
onEnable(context) {
|
|
18
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
const response = yield requests_1.CopperApiService.createWebhook(context.auth, {
|
|
20
|
+
target: context.webhookUrl,
|
|
21
|
+
type: 'lead',
|
|
22
|
+
event: 'update',
|
|
23
|
+
});
|
|
24
|
+
yield context.store.put(CACHE_KEY, {
|
|
25
|
+
webhookId: response.id,
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
},
|
|
29
|
+
onDisable(context) {
|
|
30
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
const cachedWebhookData = (yield context.store.get(CACHE_KEY));
|
|
32
|
+
if (cachedWebhookData) {
|
|
33
|
+
yield requests_1.CopperApiService.deleteWebhook(context.auth, cachedWebhookData.webhookId).then(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
yield context.store.delete(CACHE_KEY);
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
run(context) {
|
|
40
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
return [context.payload.body];
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
//# sourceMappingURL=updated-lead.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updated-lead.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/copper/src/lib/triggers/updated-lead.ts"],"names":[],"mappings":";;;;AAAA,oEAA+E;AAC/E,iDAAsD;AACtD,mDAAiD;AAEjD,MAAM,SAAS,GAAG,iCAAiC,CAAC;AAEvC,QAAA,WAAW,GAAG,IAAA,gCAAa,EAAC;IACvC,IAAI,EAAE,sBAAU;IAChB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,mCAAmC;IAChD,KAAK,EAAE,EAAE;IACT,UAAU,EAAE,EAAE;IACd,IAAI,EAAE,kCAAe,CAAC,OAAO;IACvB,QAAQ,CAAC,OAAO;;YACpB,MAAM,QAAQ,GAAG,MAAM,2BAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,EAAE;gBAClE,MAAM,EAAE,OAAO,CAAC,UAAU;gBAC1B,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,QAAQ;aAChB,CAAC,CAAC;YAEH,MAAM,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,EAAE;gBACjC,SAAS,EAAE,QAAQ,CAAC,EAAE;aACvB,CAAC,CAAC;QACL,CAAC;KAAA;IACK,SAAS,CAAC,OAAO;;YACrB,MAAM,iBAAiB,GAAG,CAAC,MAAM,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAQ,CAAC;YAEtE,IAAI,iBAAiB,EAAE,CAAC;gBACtB,MAAM,2BAAgB,CAAC,aAAa,CAClC,OAAO,CAAC,IAAI,EACZ,iBAAiB,CAAC,SAAS,CAC5B,CAAC,IAAI,CAAC,GAAS,EAAE;oBAChB,MAAM,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;gBACxC,CAAC,CAAA,CAAC,CAAC;YACL,CAAC;QACH,CAAC;KAAA;IACK,GAAG,CAAC,OAAO;;YACf,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAChC,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TriggerStrategy } from '@scopieflows/pieces-framework';
|
|
2
|
+
export declare const updatedOpportunityStage: import("@scopieflows/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@scopieflows/pieces-framework").CustomAuthProperty<{
|
|
3
|
+
email: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
apiKey: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
5
|
+
}>, {}> | import("@scopieflows/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@scopieflows/pieces-framework").CustomAuthProperty<{
|
|
6
|
+
email: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
apiKey: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
8
|
+
}>, {}> | import("@scopieflows/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@scopieflows/pieces-framework").CustomAuthProperty<{
|
|
9
|
+
email: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
10
|
+
apiKey: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
11
|
+
}>, {}> | import("@scopieflows/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@scopieflows/pieces-framework").CustomAuthProperty<{
|
|
12
|
+
email: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
13
|
+
apiKey: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
14
|
+
}>, {}>;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updatedOpportunityStage = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@scopieflows/pieces-framework");
|
|
6
|
+
const requests_1 = require("../common/requests");
|
|
7
|
+
const constants_1 = require("../common/constants");
|
|
8
|
+
const CACHE_KEY = 'copper_updated_opportunity_stage_trigger_key';
|
|
9
|
+
exports.updatedOpportunityStage = (0, pieces_framework_1.createTrigger)({
|
|
10
|
+
auth: constants_1.CopperAuth,
|
|
11
|
+
name: 'updatedOpportunityStage',
|
|
12
|
+
displayName: 'Updated Opportunity Stage',
|
|
13
|
+
description: 'Triggers when an opportunity stage changes',
|
|
14
|
+
props: {},
|
|
15
|
+
sampleData: {},
|
|
16
|
+
type: pieces_framework_1.TriggerStrategy.WEBHOOK,
|
|
17
|
+
onEnable(context) {
|
|
18
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
const response = yield requests_1.CopperApiService.createWebhook(context.auth, {
|
|
20
|
+
target: context.webhookUrl,
|
|
21
|
+
type: 'opportunity',
|
|
22
|
+
event: 'update',
|
|
23
|
+
});
|
|
24
|
+
yield context.store.put(CACHE_KEY, {
|
|
25
|
+
webhookId: response.id,
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
},
|
|
29
|
+
onDisable(context) {
|
|
30
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
const cachedWebhookData = (yield context.store.get(CACHE_KEY));
|
|
32
|
+
if (cachedWebhookData) {
|
|
33
|
+
yield requests_1.CopperApiService.deleteWebhook(context.auth, cachedWebhookData.webhookId).then(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
yield context.store.delete(CACHE_KEY);
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
run(context) {
|
|
40
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
const body = context.payload.body;
|
|
42
|
+
const ids = Array.isArray(body.ids) ? body.ids : [];
|
|
43
|
+
const updatedAttrs = body.updated_attributes;
|
|
44
|
+
const idChanged = Array.isArray(updatedAttrs.stage_id) &&
|
|
45
|
+
updatedAttrs.stage_id[0] !== updatedAttrs.stage_id[1];
|
|
46
|
+
const labelChanged = Array.isArray(updatedAttrs.stage) &&
|
|
47
|
+
updatedAttrs.stage[0] !== updatedAttrs.stage[1];
|
|
48
|
+
const isStageMove = idChanged && labelChanged;
|
|
49
|
+
if (!isStageMove) {
|
|
50
|
+
return [];
|
|
51
|
+
}
|
|
52
|
+
const events = ids.map((id) => {
|
|
53
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
54
|
+
return ({
|
|
55
|
+
id,
|
|
56
|
+
change_type: 'stage_change',
|
|
57
|
+
previous_stage_id: (_b = (_a = updatedAttrs.stage_id) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : null,
|
|
58
|
+
current_stage_id: (_d = (_c = updatedAttrs.stage_id) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : null,
|
|
59
|
+
previous_stage_label: (_f = (_e = updatedAttrs.stage) === null || _e === void 0 ? void 0 : _e[0]) !== null && _f !== void 0 ? _f : null,
|
|
60
|
+
current_stage_label: (_h = (_g = updatedAttrs.stage) === null || _g === void 0 ? void 0 : _g[1]) !== null && _h !== void 0 ? _h : null,
|
|
61
|
+
previous_last_stage_at: (_k = (_j = updatedAttrs.last_stage_at) === null || _j === void 0 ? void 0 : _j[0]) !== null && _k !== void 0 ? _k : null,
|
|
62
|
+
current_last_stage_at: (_m = (_l = updatedAttrs.last_stage_at) === null || _l === void 0 ? void 0 : _l[1]) !== null && _m !== void 0 ? _m : null,
|
|
63
|
+
previous_days_in_stage: (_p = (_o = updatedAttrs.days_in_stage) === null || _o === void 0 ? void 0 : _o[0]) !== null && _p !== void 0 ? _p : null,
|
|
64
|
+
current_days_in_stage: (_r = (_q = updatedAttrs.days_in_stage) === null || _q === void 0 ? void 0 : _q[1]) !== null && _r !== void 0 ? _r : null,
|
|
65
|
+
subscription_id: body.subscription_id,
|
|
66
|
+
timestamp: body.timestamp,
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
return events;
|
|
70
|
+
});
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
//# sourceMappingURL=updated-opportunity-stage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updated-opportunity-stage.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/copper/src/lib/triggers/updated-opportunity-stage.ts"],"names":[],"mappings":";;;;AAAA,oEAA+E;AAC/E,iDAAsD;AACtD,mDAAiD;AAEjD,MAAM,SAAS,GAAG,8CAA8C,CAAC;AAEpD,QAAA,uBAAuB,GAAG,IAAA,gCAAa,EAAC;IACnD,IAAI,EAAE,sBAAU;IAChB,IAAI,EAAE,yBAAyB;IAC/B,WAAW,EAAE,2BAA2B;IACxC,WAAW,EAAE,4CAA4C;IACzD,KAAK,EAAE,EAAE;IACT,UAAU,EAAE,EAAE;IACd,IAAI,EAAE,kCAAe,CAAC,OAAO;IACvB,QAAQ,CAAC,OAAO;;YACpB,MAAM,QAAQ,GAAG,MAAM,2BAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,EAAE;gBAClE,MAAM,EAAE,OAAO,CAAC,UAAU;gBAC1B,IAAI,EAAE,aAAa;gBACnB,KAAK,EAAE,QAAQ;aAChB,CAAC,CAAC;YAEH,MAAM,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,EAAE;gBACjC,SAAS,EAAE,QAAQ,CAAC,EAAE;aACvB,CAAC,CAAC;QACL,CAAC;KAAA;IACK,SAAS,CAAC,OAAO;;YACrB,MAAM,iBAAiB,GAAG,CAAC,MAAM,OAAO,CAAC,KAAK,CAAC,GAAG,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C,CAAC,mCAAI,IAAI;oBACrD,gBAAgB,EAAE,MAAA,MAAA,YAAY,CAAC,QAAQ,0CAAG,CAAC,CAAC,mCAAI,IAAI;oBACpD,oBAAoB,EAAE,MAAA,MAAA,YAAY,CAAC,KAAK,0CAAG,CAAC,CAAC,mCAAI,IAAI;oBACrD,mBAAmB,EAAE,MAAA,MAAA,YAAY,CAAC,KAAK,0CAAG,CAAC,CAAC,mCAAI,IAAI;oBACpD,sBAAsB,EAAE,MAAA,MAAA,YAAY,CAAC,aAAa,0CAAG,CAAC,CAAC,mCAAI,IAAI;oBAC/D,qBAAqB,EAAE,MAAA,MAAA,YAAY,CAAC,aAAa,0CAAG,CAAC,CAAC,mCAAI,IAAI;oBAC9D,sBAAsB,EAAE,MAAA,MAAA,YAAY,CAAC,aAAa,0CAAG,CAAC,CAAC,mCAAI,IAAI;oBAC/D,qBAAqB,EAAE,MAAA,MAAA,YAAY,CAAC,aAAa,0CAAG,CAAC,CAAC,mCAAI,IAAI;oBAC9D,eAAe,EAAE,IAAI,CAAC,eAAe;oBACrC,SAAS,EAAE,IAAI,CAAC,SAAS;iBAC1B,CAAC,CAAA;aAAA,CAAC,CAAC;YAEJ,OAAO,MAAM,CAAC;QAChB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TriggerStrategy } from '@scopieflows/pieces-framework';
|
|
2
|
+
export declare const updatedOpportunityStatus: import("@scopieflows/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@scopieflows/pieces-framework").CustomAuthProperty<{
|
|
3
|
+
email: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
apiKey: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
5
|
+
}>, {}> | import("@scopieflows/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@scopieflows/pieces-framework").CustomAuthProperty<{
|
|
6
|
+
email: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
apiKey: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
8
|
+
}>, {}> | import("@scopieflows/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@scopieflows/pieces-framework").CustomAuthProperty<{
|
|
9
|
+
email: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
10
|
+
apiKey: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
11
|
+
}>, {}> | import("@scopieflows/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@scopieflows/pieces-framework").CustomAuthProperty<{
|
|
12
|
+
email: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
13
|
+
apiKey: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
14
|
+
}>, {}>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updatedOpportunityStatus = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@scopieflows/pieces-framework");
|
|
6
|
+
const requests_1 = require("../common/requests");
|
|
7
|
+
const constants_1 = require("../common/constants");
|
|
8
|
+
const CACHE_KEY = 'copper_updated_opportunity_status_trigger_key';
|
|
9
|
+
exports.updatedOpportunityStatus = (0, pieces_framework_1.createTrigger)({
|
|
10
|
+
auth: constants_1.CopperAuth,
|
|
11
|
+
name: 'updatedOpportunityStatus',
|
|
12
|
+
displayName: 'Updated Opportunity Status',
|
|
13
|
+
description: "Triggers when an opportunity's status changes.",
|
|
14
|
+
props: {},
|
|
15
|
+
sampleData: {},
|
|
16
|
+
type: pieces_framework_1.TriggerStrategy.WEBHOOK,
|
|
17
|
+
onEnable(context) {
|
|
18
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
const response = yield requests_1.CopperApiService.createWebhook(context.auth, {
|
|
20
|
+
target: context.webhookUrl,
|
|
21
|
+
type: 'opportunity',
|
|
22
|
+
event: 'update',
|
|
23
|
+
});
|
|
24
|
+
yield context.store.put(CACHE_KEY, {
|
|
25
|
+
webhookId: response.id,
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
},
|
|
29
|
+
onDisable(context) {
|
|
30
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
const cachedWebhookData = (yield context.store.get(CACHE_KEY));
|
|
32
|
+
if (cachedWebhookData) {
|
|
33
|
+
yield requests_1.CopperApiService.deleteWebhook(context.auth, cachedWebhookData.webhookId).then(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
yield context.store.delete(CACHE_KEY);
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
run(context) {
|
|
40
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
var _a;
|
|
42
|
+
const body = context.payload.body;
|
|
43
|
+
const ids = Array.isArray(body === null || body === void 0 ? void 0 : body.ids) ? body.ids : [];
|
|
44
|
+
const updatedAttrs = (_a = body === null || body === void 0 ? void 0 : body.updated_attributes) !== null && _a !== void 0 ? _a : {};
|
|
45
|
+
const statusChanged = Array.isArray(updatedAttrs.status) &&
|
|
46
|
+
updatedAttrs.status.length === 2 &&
|
|
47
|
+
updatedAttrs.status[0] !== updatedAttrs.status[1];
|
|
48
|
+
if (!statusChanged) {
|
|
49
|
+
return [];
|
|
50
|
+
}
|
|
51
|
+
const events = ids.map((id) => {
|
|
52
|
+
var _a, _b, _c, _d;
|
|
53
|
+
return ({
|
|
54
|
+
id,
|
|
55
|
+
change_type: 'status_change',
|
|
56
|
+
previous_status: (_b = (_a = updatedAttrs.status) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : null,
|
|
57
|
+
current_status: (_d = (_c = updatedAttrs.status) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : null,
|
|
58
|
+
subscription_id: body.subscription_id,
|
|
59
|
+
timestamp: body.timestamp,
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
return events;
|
|
63
|
+
});
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
//# sourceMappingURL=updated-opportunity-status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updated-opportunity-status.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/copper/src/lib/triggers/updated-opportunity-status.ts"],"names":[],"mappings":";;;;AAAA,oEAA+E;AAC/E,iDAAsD;AACtD,mDAAiD;AAEjD,MAAM,SAAS,GAAG,+CAA+C,CAAC;AAErD,QAAA,wBAAwB,GAAG,IAAA,gCAAa,EAAC;IACpD,IAAI,EAAE,sBAAU;IAChB,IAAI,EAAE,0BAA0B;IAChC,WAAW,EAAE,4BAA4B;IACzC,WAAW,EAAE,gDAAgD;IAC7D,KAAK,EAAE,EAAE;IACT,UAAU,EAAE,EAAE;IACd,IAAI,EAAE,kCAAe,CAAC,OAAO;IACvB,QAAQ,CAAC,OAAO;;YACpB,MAAM,QAAQ,GAAG,MAAM,2BAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,EAAE;gBAClE,MAAM,EAAE,OAAO,CAAC,UAAU;gBAC1B,IAAI,EAAE,aAAa;gBACnB,KAAK,EAAE,QAAQ;aAChB,CAAC,CAAC;YAEH,MAAM,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,EAAE;gBACjC,SAAS,EAAE,QAAQ,CAAC,EAAE;aACvB,CAAC,CAAC;QACL,CAAC;KAAA;IACK,SAAS,CAAC,OAAO;;YACrB,MAAM,iBAAiB,GAAG,CAAC,MAAM,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAQ,CAAC;YAEtE,IAAI,iBAAiB,EAAE,CAAC;gBACtB,MAAM,2BAAgB,CAAC,aAAa,CAClC,OAAO,CAAC,IAAI,EACZ,iBAAiB,CAAC,SAAS,CAC5B,CAAC,IAA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AA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TriggerStrategy } from '@scopieflows/pieces-framework';
|
|
2
|
+
export declare const updatedOpportunity: import("@scopieflows/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@scopieflows/pieces-framework").CustomAuthProperty<{
|
|
3
|
+
email: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
apiKey: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
5
|
+
}>, {}> | import("@scopieflows/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@scopieflows/pieces-framework").CustomAuthProperty<{
|
|
6
|
+
email: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
apiKey: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
8
|
+
}>, {}> | import("@scopieflows/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@scopieflows/pieces-framework").CustomAuthProperty<{
|
|
9
|
+
email: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
10
|
+
apiKey: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
11
|
+
}>, {}> | import("@scopieflows/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@scopieflows/pieces-framework").CustomAuthProperty<{
|
|
12
|
+
email: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
13
|
+
apiKey: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
14
|
+
}>, {}>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updatedOpportunity = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@scopieflows/pieces-framework");
|
|
6
|
+
const constants_1 = require("../common/constants");
|
|
7
|
+
const requests_1 = require("../common/requests");
|
|
8
|
+
const CACHE_KEY = 'copper_updated_opportunity_trigger_key';
|
|
9
|
+
exports.updatedOpportunity = (0, pieces_framework_1.createTrigger)({
|
|
10
|
+
auth: constants_1.CopperAuth,
|
|
11
|
+
name: 'updatedOpportunity',
|
|
12
|
+
displayName: 'Updated Opportunity',
|
|
13
|
+
description: 'Triggers when an opportunity changes.',
|
|
14
|
+
props: {},
|
|
15
|
+
sampleData: {},
|
|
16
|
+
type: pieces_framework_1.TriggerStrategy.WEBHOOK,
|
|
17
|
+
onEnable(context) {
|
|
18
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
const response = yield requests_1.CopperApiService.createWebhook(context.auth, {
|
|
20
|
+
target: context.webhookUrl,
|
|
21
|
+
type: 'opportunity',
|
|
22
|
+
event: 'update',
|
|
23
|
+
});
|
|
24
|
+
yield context.store.put(CACHE_KEY, {
|
|
25
|
+
webhookId: response.id,
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
},
|
|
29
|
+
onDisable(context) {
|
|
30
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
const cachedWebhookData = (yield context.store.get(CACHE_KEY));
|
|
32
|
+
if (cachedWebhookData) {
|
|
33
|
+
yield requests_1.CopperApiService.deleteWebhook(context.auth, cachedWebhookData.webhookId).then(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
yield context.store.delete(CACHE_KEY);
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
run(context) {
|
|
40
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
return [context.payload.body];
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
//# sourceMappingURL=updated-opportunity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updated-opportunity.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/copper/src/lib/triggers/updated-opportunity.ts"],"names":[],"mappings":";;;;AAAA,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TriggerStrategy } from '@scopieflows/pieces-framework';
|
|
2
|
+
export declare const updatedProject: import("@scopieflows/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@scopieflows/pieces-framework").CustomAuthProperty<{
|
|
3
|
+
email: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
apiKey: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
5
|
+
}>, {}> | import("@scopieflows/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@scopieflows/pieces-framework").CustomAuthProperty<{
|
|
6
|
+
email: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
apiKey: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
8
|
+
}>, {}> | import("@scopieflows/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@scopieflows/pieces-framework").CustomAuthProperty<{
|
|
9
|
+
email: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
10
|
+
apiKey: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
11
|
+
}>, {}> | import("@scopieflows/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@scopieflows/pieces-framework").CustomAuthProperty<{
|
|
12
|
+
email: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
13
|
+
apiKey: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
14
|
+
}>, {}>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updatedProject = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@scopieflows/pieces-framework");
|
|
6
|
+
const constants_1 = require("../common/constants");
|
|
7
|
+
const requests_1 = require("../common/requests");
|
|
8
|
+
const CACHE_KEY = 'copper_updated_project_trigger_key';
|
|
9
|
+
exports.updatedProject = (0, pieces_framework_1.createTrigger)({
|
|
10
|
+
auth: constants_1.CopperAuth,
|
|
11
|
+
name: 'updatedProject',
|
|
12
|
+
displayName: 'Updated Project',
|
|
13
|
+
description: 'Triggers when a project is updated.',
|
|
14
|
+
props: {},
|
|
15
|
+
sampleData: {},
|
|
16
|
+
type: pieces_framework_1.TriggerStrategy.WEBHOOK,
|
|
17
|
+
onEnable(context) {
|
|
18
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
const response = yield requests_1.CopperApiService.createWebhook(context.auth, {
|
|
20
|
+
target: context.webhookUrl,
|
|
21
|
+
type: 'project',
|
|
22
|
+
event: 'update',
|
|
23
|
+
});
|
|
24
|
+
yield context.store.put(CACHE_KEY, {
|
|
25
|
+
webhookId: response.id,
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
},
|
|
29
|
+
onDisable(context) {
|
|
30
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
const cachedWebhookData = (yield context.store.get(CACHE_KEY));
|
|
32
|
+
if (cachedWebhookData) {
|
|
33
|
+
yield requests_1.CopperApiService.deleteWebhook(context.auth, cachedWebhookData.webhookId).then(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
yield context.store.delete(CACHE_KEY);
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
run(context) {
|
|
40
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
return [context.payload.body];
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
//# sourceMappingURL=updated-project.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updated-project.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/copper/src/lib/triggers/updated-project.ts"],"names":[],"mappings":";;;;AAAA,oEAA+E;AAC/E,mDAAiD;AACjD,iDAAsD;AAEtD,MAAM,SAAS,GAAG,oCAAoC,CAAC;AAE1C,QAAA,cAAc,GAAG,IAAA,gCAAa,EAAC;IAC1C,IAAI,EAAE,sBAAU;IAChB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,qCAAqC;IAClD,KAAK,EAAE,EAAE;IACT,UAAU,EAAE,EAAE;IACd,IAAI,EAAE,kCAAe,CAAC,OAAO;IACvB,QAAQ,CAAC,OAAO;;YACpB,MAAM,QAAQ,GAAG,MAAM,2BAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,EAAE;gBAClE,MAAM,EAAE,OAAO,CAAC,UAAU;gBAC1B,IAAI,EAAE,SAAS;gBACf,KAAK,EAAE,QAAQ;aAChB,CAAC,CAAC;YAEH,MAAM,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,EAAE;gBACjC,SAAS,EAAE,QAAQ,CAAC,EAAE;aACvB,CAAC,CAAC;QACL,CAAC;KAAA;IACK,SAAS,CAAC,OAAO;;YACrB,MAAM,iBAAiB,GAAG,CAAC,MAAM,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAQ,CAAC;YAEtE,IAAI,iBAAiB,EAAE,CAAC;gBACtB,MAAM,2BAAgB,CAAC,aAAa,CAClC,OAAO,CAAC,IAAI,EACZ,iBAAiB,CAAC,SAAS,CAC5B,CAAC,IAAI,CAAC,GAAS,EAAE;oBAChB,MAAM,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;gBACxC,CAAC,CAAA,CAAC,CAAC;YACL,CAAC;QACH,CAAC;KAAA;IACK,GAAG,CAAC,OAAO;;YACf,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAChC,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TriggerStrategy } from '@scopieflows/pieces-framework';
|
|
2
|
+
export declare const updatedTask: import("@scopieflows/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@scopieflows/pieces-framework").CustomAuthProperty<{
|
|
3
|
+
email: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
apiKey: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
5
|
+
}>, {}> | import("@scopieflows/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@scopieflows/pieces-framework").CustomAuthProperty<{
|
|
6
|
+
email: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
apiKey: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
8
|
+
}>, {}> | import("@scopieflows/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@scopieflows/pieces-framework").CustomAuthProperty<{
|
|
9
|
+
email: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
10
|
+
apiKey: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
11
|
+
}>, {}> | import("@scopieflows/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@scopieflows/pieces-framework").CustomAuthProperty<{
|
|
12
|
+
email: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
13
|
+
apiKey: import("@scopieflows/pieces-framework").ShortTextProperty<true>;
|
|
14
|
+
}>, {}>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updatedTask = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@scopieflows/pieces-framework");
|
|
6
|
+
const requests_1 = require("../common/requests");
|
|
7
|
+
const constants_1 = require("../common/constants");
|
|
8
|
+
const CACHE_KEY = 'copper_updated_task_trigger_key';
|
|
9
|
+
exports.updatedTask = (0, pieces_framework_1.createTrigger)({
|
|
10
|
+
auth: constants_1.CopperAuth,
|
|
11
|
+
name: 'updatedTask',
|
|
12
|
+
displayName: 'Updated Task',
|
|
13
|
+
description: 'Triggers when a task is updated.',
|
|
14
|
+
props: {},
|
|
15
|
+
sampleData: {},
|
|
16
|
+
type: pieces_framework_1.TriggerStrategy.WEBHOOK,
|
|
17
|
+
onEnable(context) {
|
|
18
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
const response = yield requests_1.CopperApiService.createWebhook(context.auth, {
|
|
20
|
+
target: context.webhookUrl,
|
|
21
|
+
type: 'task',
|
|
22
|
+
event: 'update',
|
|
23
|
+
});
|
|
24
|
+
yield context.store.put(CACHE_KEY, {
|
|
25
|
+
webhookId: response.id,
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
},
|
|
29
|
+
onDisable(context) {
|
|
30
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
const cachedWebhookData = (yield context.store.get(CACHE_KEY));
|
|
32
|
+
if (cachedWebhookData) {
|
|
33
|
+
yield requests_1.CopperApiService.deleteWebhook(context.auth, cachedWebhookData.webhookId).then(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
yield context.store.delete(CACHE_KEY);
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
run(context) {
|
|
40
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
return [context.payload.body];
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
//# sourceMappingURL=updated-task.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updated-task.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/copper/src/lib/triggers/updated-task.ts"],"names":[],"mappings":";;;;AAAA,oEAA+E;AAC/E,iDAAsD;AACtD,mDAAiD;AAEjD,MAAM,SAAS,GAAG,iCAAiC,CAAC;AAEvC,QAAA,WAAW,GAAG,IAAA,gCAAa,EAAC;IACvC,IAAI,EAAE,sBAAU;IAChB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,cAAc;IAC3B,WAAW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