@activepieces/piece-linkupapi 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/package.json +17 -0
- package/src/index.d.ts +2 -0
- package/src/index.d.ts.map +1 -0
- package/src/index.js +56 -0
- package/src/index.js.map +1 -0
- package/src/lib/actions/check-invitation-status.d.ts +5 -0
- package/src/lib/actions/check-invitation-status.d.ts.map +1 -0
- package/src/lib/actions/check-invitation-status.js +29 -0
- package/src/lib/actions/check-invitation-status.js.map +1 -0
- package/src/lib/actions/get-account.d.ts +4 -0
- package/src/lib/actions/get-account.d.ts.map +1 -0
- package/src/lib/actions/get-account.js +26 -0
- package/src/lib/actions/get-account.js.map +1 -0
- package/src/lib/actions/get-company.d.ts +5 -0
- package/src/lib/actions/get-company.d.ts.map +1 -0
- package/src/lib/actions/get-company.js +29 -0
- package/src/lib/actions/get-company.js.map +1 -0
- package/src/lib/actions/get-conversation.d.ts +8 -0
- package/src/lib/actions/get-conversation.d.ts.map +1 -0
- package/src/lib/actions/get-conversation.js +47 -0
- package/src/lib/actions/get-conversation.js.map +1 -0
- package/src/lib/actions/get-my-profile.d.ts +4 -0
- package/src/lib/actions/get-my-profile.d.ts.map +1 -0
- package/src/lib/actions/get-my-profile.js +21 -0
- package/src/lib/actions/get-my-profile.js.map +1 -0
- package/src/lib/actions/get-profile.d.ts +7 -0
- package/src/lib/actions/get-profile.d.ts.map +1 -0
- package/src/lib/actions/get-profile.js +41 -0
- package/src/lib/actions/get-profile.js.map +1 -0
- package/src/lib/actions/list-accounts.d.ts +5 -0
- package/src/lib/actions/list-accounts.d.ts.map +1 -0
- package/src/lib/actions/list-accounts.js +36 -0
- package/src/lib/actions/list-accounts.js.map +1 -0
- package/src/lib/actions/search-companies.d.ts +12 -0
- package/src/lib/actions/search-companies.d.ts.map +1 -0
- package/src/lib/actions/search-companies.js +47 -0
- package/src/lib/actions/search-companies.js.map +1 -0
- package/src/lib/actions/search-people.d.ts +21 -0
- package/src/lib/actions/search-people.d.ts.map +1 -0
- package/src/lib/actions/search-people.js +94 -0
- package/src/lib/actions/search-people.js.map +1 -0
- package/src/lib/actions/send-connection-request.d.ts +7 -0
- package/src/lib/actions/send-connection-request.d.ts.map +1 -0
- package/src/lib/actions/send-connection-request.js +41 -0
- package/src/lib/actions/send-connection-request.js.map +1 -0
- package/src/lib/actions/send-message.d.ts +7 -0
- package/src/lib/actions/send-message.d.ts.map +1 -0
- package/src/lib/actions/send-message.js +41 -0
- package/src/lib/actions/send-message.js.map +1 -0
- package/src/lib/common/index.d.ts +16 -0
- package/src/lib/common/index.d.ts.map +1 -0
- package/src/lib/common/index.js +110 -0
- package/src/lib/common/index.js.map +1 -0
- package/src/lib/triggers/invitation-accepted.d.ts +11 -0
- package/src/lib/triggers/invitation-accepted.d.ts.map +1 -0
- package/src/lib/triggers/invitation-accepted.js +57 -0
- package/src/lib/triggers/invitation-accepted.js.map +1 -0
- package/src/lib/triggers/new-message-received.d.ts +11 -0
- package/src/lib/triggers/new-message-received.d.ts.map +1 -0
- package/src/lib/triggers/new-message-received.js +57 -0
- package/src/lib/triggers/new-message-received.js.map +1 -0
package/package.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@activepieces/piece-linkupapi",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"type": "commonjs",
|
|
5
|
+
"main": "./src/index.js",
|
|
6
|
+
"types": "./src/index.d.ts",
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"@activepieces/pieces-common": "0.12.5",
|
|
9
|
+
"@activepieces/pieces-framework": "0.32.0",
|
|
10
|
+
"@activepieces/shared": "0.95.1",
|
|
11
|
+
"tslib": "2.6.2"
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tsc -p tsconfig.lib.json && cp package.json dist/",
|
|
15
|
+
"lint": "eslint 'src/**/*.ts'"
|
|
16
|
+
}
|
|
17
|
+
}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,SAAS,mHA8BpB,CAAC"}
|
package/src/index.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.linkupapi = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const shared_1 = require("@activepieces/shared");
|
|
7
|
+
const common_1 = require("./lib/common");
|
|
8
|
+
// actions
|
|
9
|
+
const list_accounts_1 = require("./lib/actions/list-accounts");
|
|
10
|
+
const get_account_1 = require("./lib/actions/get-account");
|
|
11
|
+
const get_my_profile_1 = require("./lib/actions/get-my-profile");
|
|
12
|
+
const get_profile_1 = require("./lib/actions/get-profile");
|
|
13
|
+
const search_people_1 = require("./lib/actions/search-people");
|
|
14
|
+
const search_companies_1 = require("./lib/actions/search-companies");
|
|
15
|
+
const get_company_1 = require("./lib/actions/get-company");
|
|
16
|
+
const send_message_1 = require("./lib/actions/send-message");
|
|
17
|
+
const get_conversation_1 = require("./lib/actions/get-conversation");
|
|
18
|
+
const send_connection_request_1 = require("./lib/actions/send-connection-request");
|
|
19
|
+
const check_invitation_status_1 = require("./lib/actions/check-invitation-status");
|
|
20
|
+
// triggers
|
|
21
|
+
const new_message_received_1 = require("./lib/triggers/new-message-received");
|
|
22
|
+
const invitation_accepted_1 = require("./lib/triggers/invitation-accepted");
|
|
23
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
24
|
+
exports.linkupapi = (0, pieces_framework_1.createPiece)({
|
|
25
|
+
displayName: 'LinkupAPI',
|
|
26
|
+
description: 'LinkupAPI lets agents send messages, manage conversations, and automate outreach across every channel, for sales and recruitment.',
|
|
27
|
+
auth: common_1.linkupAuth,
|
|
28
|
+
minimumSupportedRelease: '0.36.1',
|
|
29
|
+
logoUrl: 'https://cdn.activepieces.com/pieces/linkupapi.png',
|
|
30
|
+
categories: [shared_1.PieceCategory.SALES_AND_CRM, shared_1.PieceCategory.MARKETING],
|
|
31
|
+
authors: ['titouanprx', 'sanket-a11y'],
|
|
32
|
+
actions: [
|
|
33
|
+
list_accounts_1.listAccounts,
|
|
34
|
+
get_account_1.getAccount,
|
|
35
|
+
get_my_profile_1.getMyProfile,
|
|
36
|
+
get_profile_1.getProfile,
|
|
37
|
+
search_people_1.searchPeople,
|
|
38
|
+
search_companies_1.searchCompanies,
|
|
39
|
+
get_company_1.getCompany,
|
|
40
|
+
send_message_1.sendMessage,
|
|
41
|
+
get_conversation_1.getConversation,
|
|
42
|
+
send_connection_request_1.sendConnectionRequest,
|
|
43
|
+
check_invitation_status_1.checkInvitationStatus,
|
|
44
|
+
(0, pieces_common_1.createCustomApiCallAction)({
|
|
45
|
+
baseUrl: () => common_1.LINKUPAPI_BASE_URL,
|
|
46
|
+
auth: common_1.linkupAuth,
|
|
47
|
+
authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
48
|
+
return ({
|
|
49
|
+
'x-api-key': auth.secret_text,
|
|
50
|
+
});
|
|
51
|
+
}),
|
|
52
|
+
}),
|
|
53
|
+
],
|
|
54
|
+
triggers: [new_message_received_1.newMessageReceived, invitation_accepted_1.invitationAccepted],
|
|
55
|
+
});
|
|
56
|
+
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAA6D;AAC7D,iDAAqD;AACrD,yCAA8D;AAC9D,UAAU;AACV,+DAA2D;AAC3D,2DAAuD;AACvD,iEAA4D;AAC5D,2DAAuD;AACvD,+DAA2D;AAC3D,qEAAiE;AACjE,2DAAuD;AACvD,6DAAyD;AACzD,qEAAiE;AACjE,mFAA8E;AAC9E,mFAA8E;AAC9E,WAAW;AACX,8EAAyE;AACzE,4EAAwE;AACxE,+DAAwE;AAE3D,QAAA,SAAS,GAAG,IAAA,8BAAW,EAAC;IACnC,WAAW,EAAE,WAAW;IACxB,WAAW,EACT,mIAAmI;IACrI,IAAI,EAAE,mBAAU;IAChB,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,mDAAmD;IAC5D,UAAU,EAAE,CAAC,sBAAa,CAAC,aAAa,EAAE,sBAAa,CAAC,SAAS,CAAC;IAClE,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;IACtC,OAAO,EAAE;QACP,4BAAY;QACZ,wBAAU;QACV,6BAAY;QACZ,wBAAU;QACV,4BAAY;QACZ,kCAAe;QACf,wBAAU;QACV,0BAAW;QACX,kCAAe;QACf,+CAAqB;QACrB,+CAAqB;QACrB,IAAA,yCAAyB,EAAC;YACxB,OAAO,EAAE,GAAG,EAAE,CAAC,2BAAkB;YACjC,IAAI,EAAE,mBAAU;YAChB,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAAC,OAAA,CAAC;oBAC5B,WAAW,EAAE,IAAI,CAAC,WAAW;iBAC9B,CAAC,CAAA;cAAA;SACH,CAAC;KACH;IACD,QAAQ,EAAE,CAAC,yCAAkB,EAAE,wCAAkB,CAAC;CACnD,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const checkInvitationStatus: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
+
accountId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
profileUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
}>;
|
|
5
|
+
//# sourceMappingURL=check-invitation-status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-invitation-status.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/check-invitation-status.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,qBAAqB;;;EAmBhC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.checkInvitationStatus = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const common_1 = require("../common");
|
|
7
|
+
exports.checkInvitationStatus = (0, pieces_framework_1.createAction)({
|
|
8
|
+
auth: common_1.linkupAuth,
|
|
9
|
+
name: 'check_invitation_status',
|
|
10
|
+
displayName: 'Check Invitation Status',
|
|
11
|
+
description: 'Check the status of a connection invitation sent to a profile.',
|
|
12
|
+
props: {
|
|
13
|
+
accountId: common_1.accountIdProp,
|
|
14
|
+
profileUrl: pieces_framework_1.Property.ShortText({
|
|
15
|
+
displayName: 'Profile URL',
|
|
16
|
+
description: 'LinkedIn profile URL to check',
|
|
17
|
+
required: true,
|
|
18
|
+
}),
|
|
19
|
+
},
|
|
20
|
+
run(context) {
|
|
21
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
const { accountId, profileUrl } = context.propsValue;
|
|
23
|
+
return (0, common_1.linkupAction)(context.auth.secret_text, 'network', 'check_invitation', accountId, {
|
|
24
|
+
profile_url: profileUrl,
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=check-invitation-status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-invitation-status.js","sourceRoot":"","sources":["../../../../src/lib/actions/check-invitation-status.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,sCAAoE;AAEvD,QAAA,qBAAqB,GAAG,IAAA,+BAAY,EAAC;IAChD,IAAI,EAAE,mBAAU;IAChB,IAAI,EAAE,yBAAyB;IAC/B,WAAW,EAAE,yBAAyB;IACtC,WAAW,EAAE,gEAAgE;IAC7E,KAAK,EAAE;QACL,SAAS,EAAE,sBAAa;QACxB,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,+BAA+B;YAC5C,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YACrD,OAAO,IAAA,qBAAY,EAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,EAAE,kBAAkB,EAAE,SAAS,EAAE;gBACtF,WAAW,EAAE,UAAU;aACxB,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const getAccount: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
+
accountId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
}>;
|
|
4
|
+
//# sourceMappingURL=get-account.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-account.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-account.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU;;EAmBrB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAccount = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const common_1 = require("../common");
|
|
7
|
+
exports.getAccount = (0, pieces_framework_1.createAction)({
|
|
8
|
+
auth: common_1.linkupAuth,
|
|
9
|
+
name: 'get_account',
|
|
10
|
+
displayName: 'Get Account Details',
|
|
11
|
+
description: 'Get detailed information and status for a specific connected account. Free (0 credits).',
|
|
12
|
+
props: {
|
|
13
|
+
accountId: pieces_framework_1.Property.ShortText({
|
|
14
|
+
displayName: 'Account ID',
|
|
15
|
+
description: 'The account to retrieve (from "List Accounts")',
|
|
16
|
+
required: true,
|
|
17
|
+
}),
|
|
18
|
+
},
|
|
19
|
+
run(context) {
|
|
20
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const { accountId } = context.propsValue;
|
|
22
|
+
return (0, common_1.linkupGet)(context.auth.secret_text, `/accounts/${encodeURIComponent(accountId)}`);
|
|
23
|
+
});
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=get-account.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-account.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-account.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,sCAAkD;AAErC,QAAA,UAAU,GAAG,IAAA,+BAAY,EAAC;IACrC,IAAI,EAAE,mBAAU;IAChB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,qBAAqB;IAClC,WAAW,EAAE,yFAAyF;IACtG,KAAK,EAAE;QACL,SAAS,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC5B,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,gDAAgD;YAC7D,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YACzC,OAAO,IAAA,kBAAS,EACd,OAAO,CAAC,IAAI,CAAC,WAAW,EACxB,aAAa,kBAAkB,CAAC,SAAS,CAAC,EAAE,CAC7C,CAAC;QACJ,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const getCompany: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
+
accountId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
companyUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
}>;
|
|
5
|
+
//# sourceMappingURL=get-company.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-company.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-company.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU;;;EAmBrB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCompany = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const common_1 = require("../common");
|
|
7
|
+
exports.getCompany = (0, pieces_framework_1.createAction)({
|
|
8
|
+
auth: common_1.linkupAuth,
|
|
9
|
+
name: 'get_company',
|
|
10
|
+
displayName: 'Get Company Info',
|
|
11
|
+
description: 'Retrieve detailed information about a LinkedIn company page.',
|
|
12
|
+
props: {
|
|
13
|
+
accountId: common_1.accountIdProp,
|
|
14
|
+
companyUrl: pieces_framework_1.Property.ShortText({
|
|
15
|
+
displayName: 'Company URL',
|
|
16
|
+
description: 'LinkedIn company page URL',
|
|
17
|
+
required: true,
|
|
18
|
+
}),
|
|
19
|
+
},
|
|
20
|
+
run(context) {
|
|
21
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
const { accountId, companyUrl } = context.propsValue;
|
|
23
|
+
return (0, common_1.linkupAction)(context.auth.secret_text, 'profiles', 'get_company', accountId, {
|
|
24
|
+
company_url: companyUrl,
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=get-company.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-company.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-company.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,sCAAoE;AAEvD,QAAA,UAAU,GAAG,IAAA,+BAAY,EAAC;IACrC,IAAI,EAAE,mBAAU;IAChB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,8DAA8D;IAC3E,KAAK,EAAE;QACL,SAAS,EAAE,sBAAa;QACxB,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,2BAA2B;YACxC,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YACrD,OAAO,IAAA,qBAAY,EAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE;gBAClF,WAAW,EAAE,UAAU;aACxB,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const getConversation: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
+
accountId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
conversationId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
4
|
+
profileUrl: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
|
+
count: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
6
|
+
cursor: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
7
|
+
}>;
|
|
8
|
+
//# sourceMappingURL=get-conversation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-conversation.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-conversation.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe;;;;;;EAqC1B,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getConversation = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const common_1 = require("../common");
|
|
7
|
+
exports.getConversation = (0, pieces_framework_1.createAction)({
|
|
8
|
+
auth: common_1.linkupAuth,
|
|
9
|
+
name: 'get_conversation',
|
|
10
|
+
displayName: 'Get Conversation',
|
|
11
|
+
description: 'Retrieve the message history of a LinkedIn conversation, by conversation ID or profile URL.',
|
|
12
|
+
props: {
|
|
13
|
+
accountId: common_1.accountIdProp,
|
|
14
|
+
conversationId: pieces_framework_1.Property.ShortText({
|
|
15
|
+
displayName: 'Conversation ID',
|
|
16
|
+
description: 'Provide this OR a Profile URL',
|
|
17
|
+
required: false,
|
|
18
|
+
}),
|
|
19
|
+
profileUrl: pieces_framework_1.Property.ShortText({
|
|
20
|
+
displayName: 'Profile URL',
|
|
21
|
+
description: 'Profile URL of the other participant',
|
|
22
|
+
required: false,
|
|
23
|
+
}),
|
|
24
|
+
count: pieces_framework_1.Property.Number({
|
|
25
|
+
displayName: 'Count',
|
|
26
|
+
description: 'Number of messages to retrieve',
|
|
27
|
+
required: false,
|
|
28
|
+
}),
|
|
29
|
+
cursor: pieces_framework_1.Property.ShortText({
|
|
30
|
+
displayName: 'Cursor',
|
|
31
|
+
description: 'Pagination cursor from a previous response',
|
|
32
|
+
required: false,
|
|
33
|
+
}),
|
|
34
|
+
},
|
|
35
|
+
run(context) {
|
|
36
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
const { accountId, conversationId, profileUrl, count, cursor } = context.propsValue;
|
|
38
|
+
return (0, common_1.linkupAction)(context.auth.secret_text, 'messages', 'get_conversation', accountId, {
|
|
39
|
+
conversation_id: conversationId,
|
|
40
|
+
profile_url: profileUrl,
|
|
41
|
+
count,
|
|
42
|
+
cursor,
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
//# sourceMappingURL=get-conversation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-conversation.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-conversation.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,sCAAoE;AAEvD,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,mBAAU;IAChB,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,6FAA6F;IAC1G,KAAK,EAAE;QACL,SAAS,EAAE,sBAAa;QACxB,cAAc,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACjC,WAAW,EAAE,iBAAiB;YAC9B,WAAW,EAAE,+BAA+B;YAC5C,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,sCAAsC;YACnD,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACrB,WAAW,EAAE,OAAO;YACpB,WAAW,EAAE,gCAAgC;YAC7C,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,QAAQ;YACrB,WAAW,EAAE,4CAA4C;YACzD,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YACpF,OAAO,IAAA,qBAAY,EAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,EAAE,kBAAkB,EAAE,SAAS,EAAE;gBACvF,eAAe,EAAE,cAAc;gBAC/B,WAAW,EAAE,UAAU;gBACvB,KAAK;gBACL,MAAM;aACP,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const getMyProfile: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
+
accountId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
}>;
|
|
4
|
+
//# sourceMappingURL=get-my-profile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-my-profile.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-my-profile.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY;;EAgBvB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getMyProfile = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const common_1 = require("../common");
|
|
7
|
+
exports.getMyProfile = (0, pieces_framework_1.createAction)({
|
|
8
|
+
auth: common_1.linkupAuth,
|
|
9
|
+
name: 'get_my_profile',
|
|
10
|
+
displayName: 'Get My Profile',
|
|
11
|
+
description: 'Retrieve the profile of the connected LinkedIn account.',
|
|
12
|
+
props: {
|
|
13
|
+
accountId: common_1.accountIdProp,
|
|
14
|
+
},
|
|
15
|
+
run(context) {
|
|
16
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
17
|
+
return (0, common_1.linkupAction)(context.auth.secret_text, 'profiles', 'get_me', context.propsValue.accountId);
|
|
18
|
+
});
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=get-my-profile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-my-profile.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-my-profile.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,sCAAoE;AAEvD,QAAA,YAAY,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAE,mBAAU;IAChB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EAAE,yDAAyD;IACtE,KAAK,EAAE;QACL,SAAS,EAAE,sBAAa;KACzB;IACK,GAAG,CAAC,OAAO;;YACf,OAAO,IAAA,qBAAY,EACjB,OAAO,CAAC,IAAI,CAAC,WAAW,EACxB,UAAU,EACV,QAAQ,EACR,OAAO,CAAC,UAAU,CAAC,SAAS,CAC7B,CAAC;QACJ,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const getProfile: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
+
accountId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
profileUrl: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
4
|
+
identifier: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
|
+
profileUrn: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
|
+
}>;
|
|
7
|
+
//# sourceMappingURL=get-profile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-profile.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-profile.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU;;;;;EA+BrB,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getProfile = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const common_1 = require("../common");
|
|
7
|
+
exports.getProfile = (0, pieces_framework_1.createAction)({
|
|
8
|
+
auth: common_1.linkupAuth,
|
|
9
|
+
name: 'get_profile',
|
|
10
|
+
displayName: 'Get Profile Info',
|
|
11
|
+
description: 'Retrieve detailed information about a LinkedIn profile by URL, public identifier, or URN.',
|
|
12
|
+
props: {
|
|
13
|
+
accountId: common_1.accountIdProp,
|
|
14
|
+
profileUrl: pieces_framework_1.Property.ShortText({
|
|
15
|
+
displayName: 'Profile URL',
|
|
16
|
+
description: 'Full LinkedIn profile URL (provide this OR Identifier OR URN)',
|
|
17
|
+
required: false,
|
|
18
|
+
}),
|
|
19
|
+
identifier: pieces_framework_1.Property.ShortText({
|
|
20
|
+
displayName: 'Identifier',
|
|
21
|
+
description: 'Public identifier (e.g. "john-doe")',
|
|
22
|
+
required: false,
|
|
23
|
+
}),
|
|
24
|
+
profileUrn: pieces_framework_1.Property.ShortText({
|
|
25
|
+
displayName: 'Profile URN',
|
|
26
|
+
description: 'LinkedIn profile URN',
|
|
27
|
+
required: false,
|
|
28
|
+
}),
|
|
29
|
+
},
|
|
30
|
+
run(context) {
|
|
31
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
const { accountId, profileUrl, identifier, profileUrn } = context.propsValue;
|
|
33
|
+
return (0, common_1.linkupAction)(context.auth.secret_text, 'profiles', 'get', accountId, {
|
|
34
|
+
profile_url: profileUrl,
|
|
35
|
+
identifier,
|
|
36
|
+
profile_urn: profileUrn,
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=get-profile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-profile.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-profile.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,sCAAoE;AAEvD,QAAA,UAAU,GAAG,IAAA,+BAAY,EAAC;IACrC,IAAI,EAAE,mBAAU;IAChB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,2FAA2F;IACxG,KAAK,EAAE;QACL,SAAS,EAAE,sBAAa;QACxB,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,+DAA+D;YAC5E,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,qCAAqC;YAClD,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,sBAAsB;YACnC,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAC7E,OAAO,IAAA,qBAAY,EAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE;gBAC1E,WAAW,EAAE,UAAU;gBACvB,UAAU;gBACV,WAAW,EAAE,UAAU;aACxB,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const listAccounts: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
+
limit: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
3
|
+
offset: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
4
|
+
}>;
|
|
5
|
+
//# sourceMappingURL=list-accounts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-accounts.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/list-accounts.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY;;;EA0BvB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listAccounts = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const common_1 = require("../common");
|
|
7
|
+
exports.listAccounts = (0, pieces_framework_1.createAction)({
|
|
8
|
+
auth: common_1.linkupAuth,
|
|
9
|
+
name: 'list_accounts',
|
|
10
|
+
displayName: 'List Accounts',
|
|
11
|
+
description: 'List all connected LinkedIn accounts linked to your API key. Free (0 credits). Use the returned account_id in other actions.',
|
|
12
|
+
props: {
|
|
13
|
+
limit: pieces_framework_1.Property.Number({
|
|
14
|
+
displayName: 'Limit',
|
|
15
|
+
description: 'Max accounts to return per page (1-500)',
|
|
16
|
+
required: false,
|
|
17
|
+
defaultValue: 50,
|
|
18
|
+
}),
|
|
19
|
+
offset: pieces_framework_1.Property.Number({
|
|
20
|
+
displayName: 'Offset',
|
|
21
|
+
description: 'Number of accounts to skip (for pagination)',
|
|
22
|
+
required: false,
|
|
23
|
+
defaultValue: 0,
|
|
24
|
+
}),
|
|
25
|
+
},
|
|
26
|
+
run(context) {
|
|
27
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
const { limit, offset } = context.propsValue;
|
|
29
|
+
return (0, common_1.linkupGet)(context.auth.secret_text, '/accounts', {
|
|
30
|
+
limit: String(limit !== null && limit !== void 0 ? limit : 50),
|
|
31
|
+
offset: String(offset !== null && offset !== void 0 ? offset : 0),
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=list-accounts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-accounts.js","sourceRoot":"","sources":["../../../../src/lib/actions/list-accounts.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,sCAAkD;AAErC,QAAA,YAAY,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAE,mBAAU;IAChB,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,8HAA8H;IAC3I,KAAK,EAAE;QACL,KAAK,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACrB,WAAW,EAAE,OAAO;YACpB,WAAW,EAAE,yCAAyC;YACtD,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,EAAE;SACjB,CAAC;QACF,MAAM,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACtB,WAAW,EAAE,QAAQ;YACrB,WAAW,EAAE,6CAA6C;YAC1D,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,CAAC;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAC7C,OAAO,IAAA,kBAAS,EAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,WAAW,EAAE;gBACtD,KAAK,EAAE,MAAM,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC;gBAC1B,MAAM,EAAE,MAAM,CAAC,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,CAAC,CAAC;aAC5B,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const searchCompanies: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
+
accountId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
keyword: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
4
|
+
location: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
|
+
sector: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
|
+
companySize: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
7
|
+
totalResults: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
8
|
+
resultsPerPage: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
9
|
+
startPage: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
10
|
+
endPage: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
11
|
+
}>;
|
|
12
|
+
//# sourceMappingURL=search-companies.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-companies.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/search-companies.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe;;;;;;;;;;EAqC1B,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.searchCompanies = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const common_1 = require("../common");
|
|
7
|
+
exports.searchCompanies = (0, pieces_framework_1.createAction)({
|
|
8
|
+
auth: common_1.linkupAuth,
|
|
9
|
+
name: 'search_companies',
|
|
10
|
+
displayName: 'Search Companies',
|
|
11
|
+
description: 'Search LinkedIn companies by keyword, location, sector and company size.',
|
|
12
|
+
props: {
|
|
13
|
+
accountId: common_1.accountIdProp,
|
|
14
|
+
keyword: pieces_framework_1.Property.ShortText({ displayName: 'Keyword', required: false }),
|
|
15
|
+
location: pieces_framework_1.Property.ShortText({ displayName: 'Location', required: false }),
|
|
16
|
+
sector: pieces_framework_1.Property.ShortText({ displayName: 'Sector', required: false }),
|
|
17
|
+
companySize: pieces_framework_1.Property.ShortText({
|
|
18
|
+
displayName: 'Company Size',
|
|
19
|
+
description: 'e.g. "11-50", "201-500"',
|
|
20
|
+
required: false,
|
|
21
|
+
}),
|
|
22
|
+
totalResults: pieces_framework_1.Property.Number({
|
|
23
|
+
displayName: 'Total Results',
|
|
24
|
+
required: false,
|
|
25
|
+
defaultValue: 10,
|
|
26
|
+
}),
|
|
27
|
+
resultsPerPage: pieces_framework_1.Property.Number({ displayName: 'Results Per Page', required: false }),
|
|
28
|
+
startPage: pieces_framework_1.Property.Number({ displayName: 'Start Page', required: false }),
|
|
29
|
+
endPage: pieces_framework_1.Property.Number({ displayName: 'End Page', required: false }),
|
|
30
|
+
},
|
|
31
|
+
run(context) {
|
|
32
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
const p = context.propsValue;
|
|
34
|
+
return (0, common_1.linkupAction)(context.auth.secret_text, 'profiles', 'search_companies', p.accountId, {
|
|
35
|
+
keyword: p.keyword,
|
|
36
|
+
location: p.location,
|
|
37
|
+
sector: p.sector,
|
|
38
|
+
company_size: p.companySize,
|
|
39
|
+
total_results: p.totalResults,
|
|
40
|
+
results_per_page: p.resultsPerPage,
|
|
41
|
+
start_page: p.startPage,
|
|
42
|
+
end_page: p.endPage,
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
//# sourceMappingURL=search-companies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-companies.js","sourceRoot":"","sources":["../../../../src/lib/actions/search-companies.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,sCAAoE;AAEvD,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,mBAAU;IAChB,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,0EAA0E;IACvF,KAAK,EAAE;QACL,SAAS,EAAE,sBAAa;QACxB,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;QAC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UAAU,EAAE,CAAC,CAAC,SAAS;gBACvB,QAAQ,EAAE,CAAC,CAAC,OAAO;aACpB,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const searchPeople: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
+
accountId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
keyword: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
4
|
+
firstName: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
|
+
lastName: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
|
+
title: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
7
|
+
companyName: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
8
|
+
companyUrl: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
9
|
+
pastCompany: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
10
|
+
location: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
11
|
+
schoolUrl: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
12
|
+
industry: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
13
|
+
network: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
|
|
14
|
+
connectionOf: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
15
|
+
followerOf: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
16
|
+
fetchInvitationState: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
17
|
+
totalResults: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
18
|
+
startPage: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
19
|
+
endPage: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
20
|
+
}>;
|
|
21
|
+
//# sourceMappingURL=search-people.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-people.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/search-people.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;EAoFvB,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.searchPeople = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const common_1 = require("../common");
|
|
7
|
+
exports.searchPeople = (0, pieces_framework_1.createAction)({
|
|
8
|
+
auth: common_1.linkupAuth,
|
|
9
|
+
name: 'search_people',
|
|
10
|
+
displayName: 'Search People',
|
|
11
|
+
description: 'Search LinkedIn profiles by keyword, company, title, location, school, industry and more. Returns the LinkedIn URL of each match.',
|
|
12
|
+
props: {
|
|
13
|
+
accountId: common_1.accountIdProp,
|
|
14
|
+
keyword: pieces_framework_1.Property.ShortText({ displayName: 'Keyword', required: false }),
|
|
15
|
+
firstName: pieces_framework_1.Property.ShortText({ displayName: 'First Name', required: false }),
|
|
16
|
+
lastName: pieces_framework_1.Property.ShortText({ displayName: 'Last Name', required: false }),
|
|
17
|
+
title: pieces_framework_1.Property.ShortText({ displayName: 'Current Job Title', required: false }),
|
|
18
|
+
companyName: pieces_framework_1.Property.ShortText({ displayName: 'Current Company Name', required: false }),
|
|
19
|
+
companyUrl: pieces_framework_1.Property.ShortText({
|
|
20
|
+
displayName: 'Company URL',
|
|
21
|
+
description: 'LinkedIn company page URL',
|
|
22
|
+
required: false,
|
|
23
|
+
}),
|
|
24
|
+
pastCompany: pieces_framework_1.Property.ShortText({ displayName: 'Past Company', required: false }),
|
|
25
|
+
location: pieces_framework_1.Property.ShortText({
|
|
26
|
+
displayName: 'Location',
|
|
27
|
+
description: 'e.g. "San Francisco"',
|
|
28
|
+
required: false,
|
|
29
|
+
}),
|
|
30
|
+
schoolUrl: pieces_framework_1.Property.ShortText({ displayName: 'School URL', required: false }),
|
|
31
|
+
industry: pieces_framework_1.Property.ShortText({ displayName: 'Industry', required: false }),
|
|
32
|
+
network: pieces_framework_1.Property.StaticDropdown({
|
|
33
|
+
displayName: 'Network',
|
|
34
|
+
description: 'Connection degree relative to the account',
|
|
35
|
+
required: false,
|
|
36
|
+
options: {
|
|
37
|
+
options: [
|
|
38
|
+
{ label: '1st degree (F)', value: 'F' },
|
|
39
|
+
{ label: '2nd degree (S)', value: 'S' },
|
|
40
|
+
{ label: '3rd+ degree (O)', value: 'O' },
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
}),
|
|
44
|
+
connectionOf: pieces_framework_1.Property.ShortText({
|
|
45
|
+
displayName: 'Connection Of',
|
|
46
|
+
description: 'Show connections of a specific profile (URL or identifier)',
|
|
47
|
+
required: false,
|
|
48
|
+
}),
|
|
49
|
+
followerOf: pieces_framework_1.Property.ShortText({
|
|
50
|
+
displayName: 'Follower Of',
|
|
51
|
+
description: 'Show followers of a specific company or profile',
|
|
52
|
+
required: false,
|
|
53
|
+
}),
|
|
54
|
+
fetchInvitationState: pieces_framework_1.Property.Checkbox({
|
|
55
|
+
displayName: 'Fetch Invitation State',
|
|
56
|
+
description: 'Include the connection invitation state for each result',
|
|
57
|
+
required: false,
|
|
58
|
+
defaultValue: true,
|
|
59
|
+
}),
|
|
60
|
+
totalResults: pieces_framework_1.Property.Number({
|
|
61
|
+
displayName: 'Total Results',
|
|
62
|
+
description: 'Number of results to return (1 credit per 10 results)',
|
|
63
|
+
required: false,
|
|
64
|
+
defaultValue: 10,
|
|
65
|
+
}),
|
|
66
|
+
startPage: pieces_framework_1.Property.Number({ displayName: 'Start Page', required: false }),
|
|
67
|
+
endPage: pieces_framework_1.Property.Number({ displayName: 'End Page', required: false }),
|
|
68
|
+
},
|
|
69
|
+
run(context) {
|
|
70
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
71
|
+
const p = context.propsValue;
|
|
72
|
+
return (0, common_1.linkupAction)(context.auth.secret_text, 'profiles', 'search_people', p.accountId, {
|
|
73
|
+
keyword: p.keyword,
|
|
74
|
+
first_name: p.firstName,
|
|
75
|
+
last_name: p.lastName,
|
|
76
|
+
title: p.title,
|
|
77
|
+
company_name: p.companyName,
|
|
78
|
+
company_url: p.companyUrl,
|
|
79
|
+
past_company: p.pastCompany,
|
|
80
|
+
location: p.location,
|
|
81
|
+
school_url: p.schoolUrl,
|
|
82
|
+
industry: p.industry,
|
|
83
|
+
network: p.network,
|
|
84
|
+
connection_of: p.connectionOf,
|
|
85
|
+
follower_of: p.followerOf,
|
|
86
|
+
fetch_invitation_state: p.fetchInvitationState,
|
|
87
|
+
total_results: p.totalResults,
|
|
88
|
+
start_page: p.startPage,
|
|
89
|
+
end_page: p.endPage,
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
},
|
|
93
|
+
});
|
|
94
|
+
//# sourceMappingURL=search-people.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-people.js","sourceRoot":"","sources":["../../../../src/lib/actions/search-people.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,sCAAoE;AAEvD,QAAA,YAAY,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAE,mBAAU;IAChB,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,mIAAmI;IAChJ,KAAK,EAAE;QACL,SAAS,EAAE,sBAAa;QACxB,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;QACxE,SAAS,EAAE,2BAAQ,CAAC,SAAS,CAAC,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;QAC7E,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC,EAAE,WAAW,EAAE,WAAW,EAAE,QAA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QAAQ,EAAE,CAAC,CAAC,QAAQ;gBACpB,UAAU,EAAE,CAAC,CAAC,SAAS;gBACvB,QAAQ,EAAE,CAAC,CAAC,QAAQ;gBACpB,OAAO,EAAE,CAAC,CAAC,OAAO;gBAClB,aAAa,EAAE,CAAC,CAAC,YAAY;gBAC7B,WAAW,EAAE,CAAC,CAAC,UAAU;gBACzB,sBAAsB,EAAE,CAAC,CAAC,oBAAoB;gBAC9C,aAAa,EAAE,CAAC,CAAC,YAAY;gBAC7B,UAAU,EAAE,CAAC,CAAC,SAAS;gBACvB,QAAQ,EAAE,CAAC,CAAC,OAAO;aACpB,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const sendConnectionRequest: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
+
accountId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
profileUrl: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
4
|
+
identifier: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
|
+
message: import("@activepieces/pieces-framework").LongTextProperty<false>;
|
|
6
|
+
}>;
|
|
7
|
+
//# sourceMappingURL=send-connection-request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-connection-request.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/send-connection-request.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,qBAAqB;;;;;EA+BhC,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sendConnectionRequest = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const common_1 = require("../common");
|
|
7
|
+
exports.sendConnectionRequest = (0, pieces_framework_1.createAction)({
|
|
8
|
+
auth: common_1.linkupAuth,
|
|
9
|
+
name: 'send_connection_request',
|
|
10
|
+
displayName: 'Send Connection Request',
|
|
11
|
+
description: 'Send a LinkedIn connection invitation to a profile, with an optional note.',
|
|
12
|
+
props: {
|
|
13
|
+
accountId: common_1.accountIdProp,
|
|
14
|
+
profileUrl: pieces_framework_1.Property.ShortText({
|
|
15
|
+
displayName: 'Profile URL',
|
|
16
|
+
description: 'LinkedIn profile URL (provide this OR Identifier)',
|
|
17
|
+
required: false,
|
|
18
|
+
}),
|
|
19
|
+
identifier: pieces_framework_1.Property.ShortText({
|
|
20
|
+
displayName: 'Identifier',
|
|
21
|
+
description: 'Public identifier (e.g. "john-doe")',
|
|
22
|
+
required: false,
|
|
23
|
+
}),
|
|
24
|
+
message: pieces_framework_1.Property.LongText({
|
|
25
|
+
displayName: 'Note',
|
|
26
|
+
description: 'Optional note to include with the invitation',
|
|
27
|
+
required: false,
|
|
28
|
+
}),
|
|
29
|
+
},
|
|
30
|
+
run(context) {
|
|
31
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
const { accountId, profileUrl, identifier, message } = context.propsValue;
|
|
33
|
+
return (0, common_1.linkupAction)(context.auth.secret_text, 'network', 'invite', accountId, {
|
|
34
|
+
profile_url: profileUrl,
|
|
35
|
+
identifier,
|
|
36
|
+
message,
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=send-connection-request.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-connection-request.js","sourceRoot":"","sources":["../../../../src/lib/actions/send-connection-request.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,sCAAoE;AAEvD,QAAA,qBAAqB,GAAG,IAAA,+BAAY,EAAC;IAChD,IAAI,EAAE,mBAAU;IAChB,IAAI,EAAE,yBAAyB;IAC/B,WAAW,EAAE,yBAAyB;IACtC,WAAW,EAAE,4EAA4E;IACzF,KAAK,EAAE;QACL,SAAS,EAAE,sBAAa;QACxB,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,mDAAmD;YAChE,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,qCAAqC;YAClD,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,OAAO,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACzB,WAAW,EAAE,MAAM;YACnB,WAAW,EAAE,8CAA8C;YAC3D,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAC1E,OAAO,IAAA,qBAAY,EAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE;gBAC5E,WAAW,EAAE,UAAU;gBACvB,UAAU;gBACV,OAAO;aACR,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const sendMessage: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
+
accountId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
profileUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
messageText: import("@activepieces/pieces-framework").LongTextProperty<true>;
|
|
5
|
+
mediaLink: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
|
+
}>;
|
|
7
|
+
//# sourceMappingURL=send-message.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-message.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/send-message.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW;;;;;EA+BtB,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sendMessage = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const common_1 = require("../common");
|
|
7
|
+
exports.sendMessage = (0, pieces_framework_1.createAction)({
|
|
8
|
+
auth: common_1.linkupAuth,
|
|
9
|
+
name: 'send_message',
|
|
10
|
+
displayName: 'Send Message',
|
|
11
|
+
description: 'Send a LinkedIn message to a profile, optionally with a media attachment.',
|
|
12
|
+
props: {
|
|
13
|
+
accountId: common_1.accountIdProp,
|
|
14
|
+
profileUrl: pieces_framework_1.Property.ShortText({
|
|
15
|
+
displayName: 'Profile URL',
|
|
16
|
+
description: 'LinkedIn profile URL of the recipient',
|
|
17
|
+
required: true,
|
|
18
|
+
}),
|
|
19
|
+
messageText: pieces_framework_1.Property.LongText({
|
|
20
|
+
displayName: 'Message',
|
|
21
|
+
description: 'The text of the message to send',
|
|
22
|
+
required: true,
|
|
23
|
+
}),
|
|
24
|
+
mediaLink: pieces_framework_1.Property.ShortText({
|
|
25
|
+
displayName: 'Media Link',
|
|
26
|
+
description: 'Optional URL of a media file to attach',
|
|
27
|
+
required: false,
|
|
28
|
+
}),
|
|
29
|
+
},
|
|
30
|
+
run(context) {
|
|
31
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
const { accountId, profileUrl, messageText, mediaLink } = context.propsValue;
|
|
33
|
+
return (0, common_1.linkupAction)(context.auth.secret_text, 'messages', 'send', accountId, {
|
|
34
|
+
profile_url: profileUrl,
|
|
35
|
+
message_text: messageText,
|
|
36
|
+
media_link: mediaLink,
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=send-message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-message.js","sourceRoot":"","sources":["../../../../src/lib/actions/send-message.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,sCAAoE;AAEvD,QAAA,WAAW,GAAG,IAAA,+BAAY,EAAC;IACtC,IAAI,EAAE,mBAAU;IAChB,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,2EAA2E;IACxF,KAAK,EAAE;QACL,SAAS,EAAE,sBAAa;QACxB,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,uCAAuC;YACpD,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,WAAW,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC7B,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,iCAAiC;YAC9C,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC5B,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,wCAAwC;YACrD,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAC7E,OAAO,IAAA,qBAAY,EAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE;gBAC3E,WAAW,EAAE,UAAU;gBACvB,YAAY,EAAE,WAAW;gBACzB,UAAU,EAAE,SAAS;aACtB,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { QueryParams } from '@activepieces/pieces-common';
|
|
2
|
+
export declare const LINKUPAPI_BASE_URL = "https://api.linkupapi.com/v2";
|
|
3
|
+
export declare const linkupAuth: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
+
export declare const accountIdProp: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
+
/**
|
|
6
|
+
* V2 action-based endpoint: POST /v2/<category> with body { account_id, action, params }.
|
|
7
|
+
* `params` is cleaned of empty/undefined values before sending.
|
|
8
|
+
*/
|
|
9
|
+
export declare function linkupAction<T = unknown>(apiKey: string, category: string, action: string, accountId: string, params?: Record<string, unknown>): Promise<T>;
|
|
10
|
+
/** Raw POST to a V2 path (used for endpoints that don't follow the action/params shape, e.g. /webhooks). */
|
|
11
|
+
export declare function linkupPost<T = unknown>(apiKey: string, path: string, body: Record<string, unknown>): Promise<T>;
|
|
12
|
+
export declare function linkupGet<T = unknown>(apiKey: string, path: string, queryParams?: QueryParams): Promise<T>;
|
|
13
|
+
export declare function linkupDelete<T = unknown>(apiKey: string, path: string): Promise<T>;
|
|
14
|
+
/** Drop null / undefined / empty-string values so optional props aren't sent. */
|
|
15
|
+
export declare function cleanParams(params: Record<string, unknown>): Record<string, unknown>;
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/common/index.ts"],"names":[],"mappings":"AACA,OAAO,EAA0B,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAElF,eAAO,MAAM,kBAAkB,iCAAiC,CAAC;AAIjE,eAAO,MAAM,UAAU,mEA8BrB,CAAC;AAIH,eAAO,MAAM,aAAa,kEAKxB,CAAC;AAIH;;;GAGG;AACH,wBAAsB,YAAY,CAAC,CAAC,GAAG,OAAO,EAC5C,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GACnC,OAAO,CAAC,CAAC,CAAC,CAQZ;AAED,4GAA4G;AAC5G,wBAAsB,UAAU,CAAC,CAAC,GAAG,OAAO,EAC1C,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC,CAAC,CAAC,CAQZ;AAED,wBAAsB,SAAS,CAAC,CAAC,GAAG,OAAO,EACzC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,WAAW,GAAE,WAAgB,GAC5B,OAAO,CAAC,CAAC,CAAC,CAQZ;AAED,wBAAsB,YAAY,CAAC,CAAC,GAAG,OAAO,EAC5C,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,CAAC,CAAC,CAOZ;AAED,iFAAiF;AACjF,wBAAgB,WAAW,CACzB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAQzB"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.accountIdProp = exports.linkupAuth = exports.LINKUPAPI_BASE_URL = void 0;
|
|
4
|
+
exports.linkupAction = linkupAction;
|
|
5
|
+
exports.linkupPost = linkupPost;
|
|
6
|
+
exports.linkupGet = linkupGet;
|
|
7
|
+
exports.linkupDelete = linkupDelete;
|
|
8
|
+
exports.cleanParams = cleanParams;
|
|
9
|
+
const tslib_1 = require("tslib");
|
|
10
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
11
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
12
|
+
exports.LINKUPAPI_BASE_URL = 'https://api.linkupapi.com/v2';
|
|
13
|
+
// ─── Authentication ──────────────────────────────────────────────────────────
|
|
14
|
+
exports.linkupAuth = pieces_framework_1.PieceAuth.SecretText({
|
|
15
|
+
displayName: 'API Key',
|
|
16
|
+
required: true,
|
|
17
|
+
description: 'Your LinkupAPI key, sent as the `x-api-key` header. Get it from https://app.linkupapi.com',
|
|
18
|
+
validate: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
19
|
+
var _b;
|
|
20
|
+
try {
|
|
21
|
+
// GET /accounts is free (0 credits) — ideal for validating the key.
|
|
22
|
+
yield pieces_common_1.httpClient.sendRequest({
|
|
23
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
24
|
+
url: `${exports.LINKUPAPI_BASE_URL}/accounts`,
|
|
25
|
+
headers: { 'x-api-key': auth },
|
|
26
|
+
queryParams: { limit: '1' },
|
|
27
|
+
});
|
|
28
|
+
return { valid: true };
|
|
29
|
+
}
|
|
30
|
+
catch (e) {
|
|
31
|
+
const status = (_b = e === null || e === void 0 ? void 0 : e.response) === null || _b === void 0 ? void 0 : _b.status;
|
|
32
|
+
if (status === 401 || status === 403) {
|
|
33
|
+
return {
|
|
34
|
+
valid: false,
|
|
35
|
+
error: 'Invalid API key. Check it at https://app.linkupapi.com',
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
valid: false,
|
|
40
|
+
error: `Could not reach LinkupAPI to validate the key (status ${status !== null && status !== void 0 ? status : 'network error'}). Please try again.`,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}),
|
|
44
|
+
});
|
|
45
|
+
// ─── Shared props ────────────────────────────────────────────────────────────
|
|
46
|
+
exports.accountIdProp = pieces_framework_1.Property.ShortText({
|
|
47
|
+
displayName: 'Account ID',
|
|
48
|
+
description: 'The connected LinkedIn account to act as. Get it from the "List Accounts" action.',
|
|
49
|
+
required: true,
|
|
50
|
+
});
|
|
51
|
+
// ─── Request helpers ─────────────────────────────────────────────────────────
|
|
52
|
+
/**
|
|
53
|
+
* V2 action-based endpoint: POST /v2/<category> with body { account_id, action, params }.
|
|
54
|
+
* `params` is cleaned of empty/undefined values before sending.
|
|
55
|
+
*/
|
|
56
|
+
function linkupAction(apiKey_1, category_1, action_1, accountId_1) {
|
|
57
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* (apiKey, category, action, accountId, params = {}) {
|
|
58
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
59
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
60
|
+
url: `${exports.LINKUPAPI_BASE_URL}/${category}`,
|
|
61
|
+
headers: { 'x-api-key': apiKey, 'Content-Type': 'application/json' },
|
|
62
|
+
body: { account_id: accountId, action, params: cleanParams(params) },
|
|
63
|
+
});
|
|
64
|
+
return response.body;
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
/** Raw POST to a V2 path (used for endpoints that don't follow the action/params shape, e.g. /webhooks). */
|
|
68
|
+
function linkupPost(apiKey, path, body) {
|
|
69
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
71
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
72
|
+
url: `${exports.LINKUPAPI_BASE_URL}${path}`,
|
|
73
|
+
headers: { 'x-api-key': apiKey, 'Content-Type': 'application/json' },
|
|
74
|
+
body,
|
|
75
|
+
});
|
|
76
|
+
return response.body;
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
function linkupGet(apiKey_1, path_1) {
|
|
80
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* (apiKey, path, queryParams = {}) {
|
|
81
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
82
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
83
|
+
url: `${exports.LINKUPAPI_BASE_URL}${path}`,
|
|
84
|
+
headers: { 'x-api-key': apiKey },
|
|
85
|
+
queryParams,
|
|
86
|
+
});
|
|
87
|
+
return response.body;
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
function linkupDelete(apiKey, path) {
|
|
91
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
92
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
93
|
+
method: pieces_common_1.HttpMethod.DELETE,
|
|
94
|
+
url: `${exports.LINKUPAPI_BASE_URL}${path}`,
|
|
95
|
+
headers: { 'x-api-key': apiKey },
|
|
96
|
+
});
|
|
97
|
+
return response.body;
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
/** Drop null / undefined / empty-string values so optional props aren't sent. */
|
|
101
|
+
function cleanParams(params) {
|
|
102
|
+
const out = {};
|
|
103
|
+
for (const [k, v] of Object.entries(params)) {
|
|
104
|
+
if (v !== undefined && v !== null && v !== '') {
|
|
105
|
+
out[k] = v;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return out;
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/common/index.ts"],"names":[],"mappings":";;;AAsDA,oCAcC;AAGD,gCAYC;AAED,8BAYC;AAED,oCAUC;AAGD,kCAUC;;AA1HD,qEAAqE;AACrE,+DAAkF;AAErE,QAAA,kBAAkB,GAAG,8BAA8B,CAAC;AAEjE,gFAAgF;AAEnE,QAAA,UAAU,GAAG,4BAAS,CAAC,UAAU,CAAC;IAC7C,WAAW,EAAE,SAAS;IACtB,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,2FAA2F;IACxG,QAAQ,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;;QACvB,IAAI,CAAC;YACH,oEAAoE;YACpE,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC3B,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,GAAG,0BAAkB,WAAW;gBACrC,OAAO,EAAE,EAAE,WAAW,EAAE,IAAI,EAAC;gBAC7B,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE;aAC5B,CAAC,CAAC;YACH,O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,EAAE,EAAE,CAAC;YAC9C,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QACb,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TriggerStrategy } from '@activepieces/pieces-framework';
|
|
2
|
+
export declare const invitationAccepted: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
3
|
+
accountId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
5
|
+
accountId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
7
|
+
accountId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
8
|
+
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
9
|
+
accountId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
|
+
}>;
|
|
11
|
+
//# sourceMappingURL=invitation-accepted.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invitation-accepted.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/invitation-accepted.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EAChB,MAAM,gCAAgC,CAAC;AAKxC,eAAO,MAAM,kBAAkB;;;;;;;;EA8C7B,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.invitationAccepted = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const common_1 = require("../common");
|
|
7
|
+
const STORE_KEY = '_linkup_invitation_accepted_webhook_id';
|
|
8
|
+
exports.invitationAccepted = (0, pieces_framework_1.createTrigger)({
|
|
9
|
+
auth: common_1.linkupAuth,
|
|
10
|
+
name: 'invitation_accepted',
|
|
11
|
+
displayName: 'Invitation Accepted',
|
|
12
|
+
description: 'Fires in real time when a connection request sent from the connected LinkedIn account is accepted. Registers a LinkupAPI webhook (≈10 credits/day per monitored account while active).',
|
|
13
|
+
type: pieces_framework_1.TriggerStrategy.WEBHOOK,
|
|
14
|
+
props: {
|
|
15
|
+
accountId: common_1.accountIdProp,
|
|
16
|
+
},
|
|
17
|
+
sampleData: {
|
|
18
|
+
timestamp: '2026-06-17T12:00:00Z',
|
|
19
|
+
event: {
|
|
20
|
+
type: 'accepted_invitation',
|
|
21
|
+
account_id: 'your-account-id',
|
|
22
|
+
data: {
|
|
23
|
+
profile_url: 'https://www.linkedin.com/in/janedoe',
|
|
24
|
+
first_name: 'Jane',
|
|
25
|
+
last_name: 'Doe',
|
|
26
|
+
},
|
|
27
|
+
timestamp: '2026-06-17T11:59:58Z',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
onEnable(context) {
|
|
31
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
var _a;
|
|
33
|
+
const res = yield (0, common_1.linkupPost)(context.auth.secret_text, '/webhooks', {
|
|
34
|
+
account_id: context.propsValue.accountId,
|
|
35
|
+
url: context.webhookUrl,
|
|
36
|
+
events: ['accepted_invitation'],
|
|
37
|
+
});
|
|
38
|
+
if ((_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.webhook_id) {
|
|
39
|
+
yield context.store.put(STORE_KEY, res.data.webhook_id);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
},
|
|
43
|
+
onDisable(context) {
|
|
44
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
const webhookId = yield context.store.get(STORE_KEY);
|
|
46
|
+
if (webhookId) {
|
|
47
|
+
yield (0, common_1.linkupDelete)(context.auth.secret_text, `/webhooks/${webhookId}`);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
run(context) {
|
|
52
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
return [context.payload.body];
|
|
54
|
+
});
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
//# sourceMappingURL=invitation-accepted.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invitation-accepted.js","sourceRoot":"","sources":["../../../../src/lib/triggers/invitation-accepted.ts"],"names":[],"mappings":";;;;AAAA,qEAGwC;AACxC,sCAAgF;AAEhF,MAAM,SAAS,GAAG,wCAAwC,CAAC;AAE9C,QAAA,kBAAkB,GAAG,IAAA,gCAAa,EAAC;IAC9C,IAAI,EAAE,mBAAU;IAChB,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,qBAAqB;IAClC,WAAW,EACT,wLAAwL;IAC1L,IAAI,EAAE,kCAAe,CAAC,OAAO;IAC7B,KAAK,EAAE;QACL,SAAS,EAAE,sBAAa;KACzB;IACD,UAAU,EAAE;QACV,SAAS,EAAE,sBAAsB;QACjC,KAAK,EAAE;YACL,IAAI,EAAE,qBAAqB;YAC3B,UAAU,EAAE,iBAAiB;YAC7B,IAAI,EAAE;gBACJ,WAAW,EAAE,qCAAqC;gBAClD,UAAU,EAAE,MAAM;gBAClB,SAAS,EAAE,KAAK;aACjB;YACD,SAAS,EAAE,sBAAsB;SAClC;KACF;IACK,QAAQ,CAAC,OAAO;;;YACpB,MAAM,GAAG,GAAG,MAAM,IAAA,mBAAU,EAC1B,OAAO,CAAC,IAAI,CAAC,WAAW,EACxB,WAAW,EACX;gBACE,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,SAAS;gBACxC,GAAG,EAAE,OAAO,CAAC,UAAU;gBACvB,MAAM,EAAE,CAAC,qBAAqB,CAAC;aAChC,CACF,CAAC;YACF,IAAI,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,IAAI,0CAAE,UAAU,EAAE,CAAC;gBAC1B,MAAM,OAAO,CAAC,KAAK,CAAC,GAAG,CAAS,SAAS,EAAE,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YAClE,CAAC;QACH,CAAC;KAAA;IACK,SAAS,CAAC,OAAO;;YACrB,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,GAAG,CAAS,SAAS,CAAC,CAAC;YAC7D,IAAI,SAAS,EAAE,CAAC;gBACd,MAAM,IAAA,qBAAY,EAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,aAAa,SAAS,EAAE,CAAC,CAAC;YACzE,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,11 @@
|
|
|
1
|
+
import { TriggerStrategy } from '@activepieces/pieces-framework';
|
|
2
|
+
export declare const newMessageReceived: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
3
|
+
accountId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
5
|
+
accountId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
7
|
+
accountId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
8
|
+
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
9
|
+
accountId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
|
+
}>;
|
|
11
|
+
//# sourceMappingURL=new-message-received.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new-message-received.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/new-message-received.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EAChB,MAAM,gCAAgC,CAAC;AAKxC,eAAO,MAAM,kBAAkB;;;;;;;;EA8C7B,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.newMessageReceived = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const common_1 = require("../common");
|
|
7
|
+
const STORE_KEY = '_linkup_new_message_webhook_id';
|
|
8
|
+
exports.newMessageReceived = (0, pieces_framework_1.createTrigger)({
|
|
9
|
+
auth: common_1.linkupAuth,
|
|
10
|
+
name: 'new_message_received',
|
|
11
|
+
displayName: 'New Message Received',
|
|
12
|
+
description: 'Fires in real time when the connected LinkedIn account receives a new message. Registers a LinkupAPI webhook (≈10 credits/day per monitored account while active).',
|
|
13
|
+
type: pieces_framework_1.TriggerStrategy.WEBHOOK,
|
|
14
|
+
props: {
|
|
15
|
+
accountId: common_1.accountIdProp,
|
|
16
|
+
},
|
|
17
|
+
sampleData: {
|
|
18
|
+
timestamp: '2026-06-17T12:00:00Z',
|
|
19
|
+
event: {
|
|
20
|
+
type: 'message',
|
|
21
|
+
account_id: 'your-account-id',
|
|
22
|
+
data: {
|
|
23
|
+
conversation_id: '2-abc123',
|
|
24
|
+
sender_profile_url: 'https://www.linkedin.com/in/janedoe',
|
|
25
|
+
message_text: 'Hi, thanks for connecting!',
|
|
26
|
+
},
|
|
27
|
+
timestamp: '2026-06-17T11:59:58Z',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
onEnable(context) {
|
|
31
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
var _a;
|
|
33
|
+
const res = yield (0, common_1.linkupPost)(context.auth.secret_text, '/webhooks', {
|
|
34
|
+
account_id: context.propsValue.accountId,
|
|
35
|
+
url: context.webhookUrl,
|
|
36
|
+
events: ['message_received'],
|
|
37
|
+
});
|
|
38
|
+
if ((_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.webhook_id) {
|
|
39
|
+
yield context.store.put(STORE_KEY, res.data.webhook_id);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
},
|
|
43
|
+
onDisable(context) {
|
|
44
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
const webhookId = yield context.store.get(STORE_KEY);
|
|
46
|
+
if (webhookId) {
|
|
47
|
+
yield (0, common_1.linkupDelete)(context.auth.secret_text, `/webhooks/${webhookId}`);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
run(context) {
|
|
52
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
return [context.payload.body];
|
|
54
|
+
});
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
//# sourceMappingURL=new-message-received.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new-message-received.js","sourceRoot":"","sources":["../../../../src/lib/triggers/new-message-received.ts"],"names":[],"mappings":";;;;AAAA,qEAGwC;AACxC,sCAAgF;AAEhF,MAAM,SAAS,GAAG,gCAAgC,CAAC;AAEtC,QAAA,kBAAkB,GAAG,IAAA,gCAAa,EAAC;IAC9C,IAAI,EAAE,mBAAU;IAChB,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,sBAAsB;IACnC,WA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