@pipedream/linkedin 1.3.0 → 1.3.2
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/actions/create-comment/create-comment.mjs +1 -1
- package/actions/create-image-post-organization/create-image-post-organization.mjs +1 -1
- package/actions/create-image-post-user/create-image-post-user.mjs +1 -1
- package/actions/create-like-on-share/create-like-on-share.mjs +1 -1
- package/actions/create-text-post-organization/create-text-post-organization.mjs +1 -1
- package/actions/create-text-post-user/create-text-post-user.mjs +1 -1
- package/actions/delete-post/delete-post.mjs +1 -1
- package/actions/fetch-ad-account/fetch-ad-account.mjs +1 -1
- package/actions/get-current-member-profile/get-current-member-profile.mjs +1 -1
- package/actions/get-member-profile/get-member-profile.mjs +1 -1
- package/actions/get-multiple-member-profiles/get-multiple-member-profiles.mjs +1 -1
- package/actions/get-org-member-access/get-org-member-access.mjs +1 -1
- package/actions/get-organization-access-control/get-organization-access-control.mjs +1 -1
- package/actions/get-organization-administrators/get-organization-administrators.mjs +1 -1
- package/actions/get-profile-picture-fields/get-profile-picture-fields.mjs +1 -1
- package/actions/list-ad-account-id-options/list-ad-account-id-options.mjs +1 -1
- package/actions/list-campaign-id-options/list-campaign-id-options.mjs +1 -1
- package/actions/list-organization-id-options/list-organization-id-options.mjs +1 -1
- package/actions/retrieve-comments-on-comments/retrieve-comments-on-comments.mjs +1 -1
- package/actions/retrieve-comments-shares/retrieve-comments-shares.mjs +1 -1
- package/actions/search-organization/search-organization.mjs +1 -1
- package/common/constants.mjs +3 -1
- package/linkedin.app.mjs +56 -11
- package/package.json +2 -2
- package/sources/new-organization-post-created/new-organization-post-created.mjs +1 -1
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "linkedin-create-comment",
|
|
5
5
|
name: "Create Comment",
|
|
6
6
|
description: "Create a comment on a share or user generated content post. [See the docs here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/network-update-social-actions#create-comment)",
|
|
7
|
-
version: "0.1.
|
|
7
|
+
version: "0.1.13",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: true,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
key: "linkedin-create-image-post-organization",
|
|
8
8
|
name: "Create Image Post (Organization)",
|
|
9
9
|
description: "Create an image post on LinkedIn. [See the documentation](https://learn.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/images-api?view=li-lms-2023-09&tabs=http#uploading-an-image)",
|
|
10
|
-
version: "1.0.
|
|
10
|
+
version: "1.0.9",
|
|
11
11
|
annotations: {
|
|
12
12
|
destructiveHint: false,
|
|
13
13
|
openWorldHint: true,
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
key: "linkedin-create-image-post-user",
|
|
8
8
|
name: "Create Image Post (User)",
|
|
9
9
|
description: "Create an image post on LinkedIn. [See the documentation](https://learn.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/images-api?view=li-lms-2023-09&tabs=http#uploading-an-image)",
|
|
10
|
-
version: "1.0.
|
|
10
|
+
version: "1.0.9",
|
|
11
11
|
annotations: {
|
|
12
12
|
destructiveHint: false,
|
|
13
13
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "linkedin-create-like-on-share",
|
|
5
5
|
name: "Create Like On Share",
|
|
6
6
|
description: "Creates a like on a share. [See the docs here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/network-update-social-actions#create-a-like-on-a-share)",
|
|
7
|
-
version: "0.1.
|
|
7
|
+
version: "0.1.13",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: true,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "linkedin-create-text-post-organization",
|
|
6
6
|
name: "Create a Simple Post (Organization)",
|
|
7
7
|
description: "Create post on LinkedIn using text, URL or article. [See the documentation](https://learn.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/posts-api?view=li-lms-2022-11&tabs=http#create-organic-posts) for more information",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.13",
|
|
9
9
|
annotations: {
|
|
10
10
|
destructiveHint: false,
|
|
11
11
|
openWorldHint: true,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "linkedin-create-text-post-user",
|
|
6
6
|
name: "Create a Simple Post (User)",
|
|
7
7
|
description: "Create post on LinkedIn using text, URL or article. [See the documentation](https://learn.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/posts-api?view=li-lms-2022-11&tabs=http#create-organic-posts) for more information",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.13",
|
|
9
9
|
annotations: {
|
|
10
10
|
destructiveHint: false,
|
|
11
11
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "linkedin-delete-post",
|
|
5
5
|
name: "Delete Post",
|
|
6
6
|
description: "Removes a post from user's wall. [See the documentation](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/share-api?tabs=http#delete-shares) for more information",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.13",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: true,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "linkedin-fetch-ad-account",
|
|
5
5
|
name: "Fetch Ad Account",
|
|
6
6
|
description: "Fetches an individual adAccount given its id. [See the docs here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads/account-structure/create-and-manage-accounts#fetch-ad-account)",
|
|
7
|
-
version: "0.1.
|
|
7
|
+
version: "0.1.13",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "linkedin-get-current-member-profile",
|
|
5
5
|
name: "Get Current Member Profile",
|
|
6
6
|
description: "Gets the profile of the current authenticated member. [See the docs here](https://docs.microsoft.com/en-us/linkedin/shared/integrations/people/profile-api#retrieve-current-members-profile)",
|
|
7
|
-
version: "0.1.
|
|
7
|
+
version: "0.1.13",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "linkedin-get-member-profile",
|
|
5
5
|
name: "Get Member Profile",
|
|
6
6
|
description: "Gets another member's profile, given its person id. [See the docs here](https://docs.microsoft.com/en-us/linkedin/shared/integrations/people/profile-api#retrieve-other-members-profile)",
|
|
7
|
-
version: "0.1.
|
|
7
|
+
version: "0.1.13",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "linkedin-get-multiple-member-profiles",
|
|
5
5
|
name: "Get Multiple Member Profiles",
|
|
6
6
|
description: "Gets multiple member profiles at once. [See the docs here](https://docs.microsoft.com/en-us/linkedin/shared/integrations/people/profile-api#retrieve-other-members-profile)",
|
|
7
|
-
version: "0.1.
|
|
7
|
+
version: "0.1.13",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "linkedin-get-org-member-access",
|
|
5
5
|
name: "Get Member's Organization Access Control Information",
|
|
6
6
|
description: "Gets the organization access control information of the current authenticated member. [See the documentation](https://learn.microsoft.com/en-us/linkedin/marketing/community-management/organizations/organization-access-control-by-role?view=li-lms-2025-01&tabs=http#find-a-members-organization-access-control-information)",
|
|
7
|
-
version: "1.0.
|
|
7
|
+
version: "1.0.8",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "linkedin-get-organization-access-control",
|
|
5
5
|
name: "Gets Organization Access Control",
|
|
6
6
|
description: "Gets a selected organization's access control information. [See the documentation](https://learn.microsoft.com/en-us/linkedin/marketing/community-management/organizations/organization-access-control-by-role?view=li-lms-2025-01&tabs=http#find-organization-access-control)",
|
|
7
|
-
version: "0.2.
|
|
7
|
+
version: "0.2.7",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "linkedin-get-organization-administrators",
|
|
5
5
|
name: "Get Organization Administrators",
|
|
6
6
|
description: "Gets the administrator members of a selected organization. [See the documentation](https://learn.microsoft.com/en-us/linkedin/marketing/community-management/organizations/organization-access-control-by-role?view=li-lms-2025-01&tabs=http#find-organization-administrators)",
|
|
7
|
-
version: "0.3.
|
|
7
|
+
version: "0.3.7",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "linkedin-get-profile-picture-fields",
|
|
6
6
|
name: "Get Profile Picture Fields",
|
|
7
7
|
description: "Gets the authenticated user's profile picture data including display image and metadata. [See the documentation](https://learn.microsoft.com/en-us/linkedin/shared/references/v2/profile/profile-picture)",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.8",
|
|
9
9
|
annotations: {
|
|
10
10
|
destructiveHint: false,
|
|
11
11
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "linkedin-list-ad-account-id-options",
|
|
5
5
|
name: "List Ad Account Id Options",
|
|
6
6
|
description: "Retrieves available options for the Ad Account Id field.",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.3",
|
|
8
8
|
type: "action",
|
|
9
9
|
annotations: {
|
|
10
10
|
destructiveHint: false,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "linkedin-list-campaign-id-options",
|
|
5
5
|
name: "List Campaign Id Options",
|
|
6
6
|
description: "Retrieves available options for the Campaign Id field.",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.3",
|
|
8
8
|
type: "action",
|
|
9
9
|
annotations: {
|
|
10
10
|
destructiveHint: false,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "linkedin-list-organization-id-options",
|
|
5
5
|
name: "List Organization Id Options",
|
|
6
6
|
description: "Retrieves available options for the Organization Id field.",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.3",
|
|
8
8
|
type: "action",
|
|
9
9
|
annotations: {
|
|
10
10
|
destructiveHint: false,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "linkedin-retrieve-comments-on-comments",
|
|
5
5
|
name: "Retrieves Comments on Comments",
|
|
6
6
|
description: "Retrieves comments on comments, given the parent comment urn. [See the documentation](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/network-update-social-actions#retrieve-comments-on-comments)",
|
|
7
|
-
version: "0.1.
|
|
7
|
+
version: "0.1.13",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: true,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "linkedin-retrieve-comments-shares",
|
|
5
5
|
name: "Retrieve Comments On Shares",
|
|
6
6
|
description: "Retrieve comments on shares given the share urn. [See the docs here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/network-update-social-actions#retrieve-comments-on-shares)",
|
|
7
|
-
version: "0.1.
|
|
7
|
+
version: "0.1.14",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: true,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "linkedin-search-organization",
|
|
5
5
|
name: "Search Organization",
|
|
6
6
|
description: "Searches for an organization by vanity name or email domain. [See the docs here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/community-management/organizations/organization-lookup-api)",
|
|
7
|
-
version: "0.1.
|
|
7
|
+
version: "0.1.13",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
openWorldHint: true,
|
package/common/constants.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const VERSION_PATH = "rest";
|
|
2
2
|
const BASE_URL = "https://api.linkedin.com/";
|
|
3
|
-
const VERSION_HEADER = "
|
|
3
|
+
const VERSION_HEADER = "202606";
|
|
4
|
+
const RESTLI_PROTOCOL_VERSION = "2.0.0";
|
|
4
5
|
|
|
5
6
|
const VISIBILITIES = [
|
|
6
7
|
{
|
|
@@ -86,6 +87,7 @@ export default {
|
|
|
86
87
|
VERSION_PATH,
|
|
87
88
|
BASE_URL,
|
|
88
89
|
VERSION_HEADER,
|
|
90
|
+
RESTLI_PROTOCOL_VERSION,
|
|
89
91
|
VISIBILITIES,
|
|
90
92
|
TYPES,
|
|
91
93
|
TIME_GRANULARITY_OPTIONS,
|
package/linkedin.app.mjs
CHANGED
|
@@ -16,20 +16,63 @@ export default {
|
|
|
16
16
|
type: "string",
|
|
17
17
|
label: "Organization Id",
|
|
18
18
|
description: "ID of the organization that will author the post",
|
|
19
|
-
async options({
|
|
20
|
-
|
|
19
|
+
async options({
|
|
20
|
+
page,
|
|
21
|
+
prevContext,
|
|
22
|
+
}) {
|
|
23
|
+
// Track the next organization page across calls so a page whose
|
|
24
|
+
// options are all filtered out (e.g. all 403) doesn't stop pagination.
|
|
25
|
+
let currentPage = prevContext?.nextPage ?? page ?? 0;
|
|
21
26
|
|
|
22
27
|
const responseArray = [];
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
const orgData = await this.getOrganization(orgId);
|
|
28
|
+
while (true) {
|
|
29
|
+
const { elements } = await this.getOrganizations(currentPage);
|
|
26
30
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
// The API reports no more pages, stop paginating.
|
|
32
|
+
if (!elements?.length) {
|
|
33
|
+
return {
|
|
34
|
+
options: responseArray,
|
|
35
|
+
context: {
|
|
36
|
+
nextPage: currentPage,
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
for (const item of elements) {
|
|
42
|
+
const orgId = item.organization?.split(":")[3];
|
|
43
|
+
if (!orgId) {
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
try {
|
|
48
|
+
const orgData = await this.getOrganization(orgId);
|
|
49
|
+
if (orgData?.localizedName) {
|
|
50
|
+
responseArray.push({
|
|
51
|
+
label: orgData.localizedName,
|
|
52
|
+
value: orgId,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
} catch (error) {
|
|
56
|
+
if (error.response?.status !== 403) {
|
|
57
|
+
throw error;
|
|
58
|
+
}
|
|
59
|
+
console.log(`Skipping organization ${orgId}: ${error.message}`);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
currentPage += 1;
|
|
64
|
+
|
|
65
|
+
// Only surface a page once it yields at least one accessible option;
|
|
66
|
+
// otherwise keep requesting subsequent pages.
|
|
67
|
+
if (responseArray.length) {
|
|
68
|
+
return {
|
|
69
|
+
options: responseArray,
|
|
70
|
+
context: {
|
|
71
|
+
nextPage: currentPage,
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
}
|
|
31
75
|
}
|
|
32
|
-
return responseArray;
|
|
33
76
|
},
|
|
34
77
|
},
|
|
35
78
|
adAccountId: {
|
|
@@ -132,6 +175,7 @@ export default {
|
|
|
132
175
|
"Authorization": `Bearer ${this.$auth.oauth_access_token}`,
|
|
133
176
|
"Content-Type": "application/json",
|
|
134
177
|
"Linkedin-Version": constants.VERSION_HEADER,
|
|
178
|
+
"X-Restli-Protocol-Version": constants.RESTLI_PROTOCOL_VERSION,
|
|
135
179
|
};
|
|
136
180
|
},
|
|
137
181
|
async _makeRequest({
|
|
@@ -148,6 +192,7 @@ export default {
|
|
|
148
192
|
async _makeRequestAxios({
|
|
149
193
|
url, path, ...otherConfig
|
|
150
194
|
}) {
|
|
195
|
+
delete otherConfig.$;
|
|
151
196
|
const BASE_URL = constants.BASE_URL;
|
|
152
197
|
|
|
153
198
|
return axios({
|
|
@@ -166,7 +211,7 @@ export default {
|
|
|
166
211
|
async getOrganizations(page) {
|
|
167
212
|
return this._makeRequest({
|
|
168
213
|
method: "GET",
|
|
169
|
-
path: `/organizationAcls?q=roleAssignee&count=5&start=${page * 5}`,
|
|
214
|
+
path: `/organizationAcls?q=roleAssignee&state=APPROVED&count=5&start=${page * 5}`,
|
|
170
215
|
});
|
|
171
216
|
},
|
|
172
217
|
async getOrganization(organizationId) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipedream/linkedin",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "Pipedream Linkedin Components",
|
|
5
5
|
"main": "linkedin.app.mjs",
|
|
6
6
|
"keywords": [
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@pipedream/platform": "^3.2.5",
|
|
17
|
-
"axios": "^1.
|
|
17
|
+
"axios": "^1.16.1",
|
|
18
18
|
"form-data": "^4.0.4"
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -9,7 +9,7 @@ export default {
|
|
|
9
9
|
name: "New Organization Post Created",
|
|
10
10
|
description: "Emit new event when a new post is created by the organization. [See the documentation](https://learn.microsoft.com/en-us/linkedin/marketing/community-management/shares/posts-api?view=li-lms-2024-09&tabs=curl#find-posts-by-authors).",
|
|
11
11
|
type: "source",
|
|
12
|
-
version: "0.0.
|
|
12
|
+
version: "0.0.7",
|
|
13
13
|
dedupe: "unique",
|
|
14
14
|
props: {
|
|
15
15
|
...common.props,
|