@pipedream/linkedin 1.1.0 → 1.2.0
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 +4 -3
- package/actions/create-image-post-user/create-image-post-user.mjs +4 -3
- package/actions/create-like-on-share/create-like-on-share.mjs +1 -1
- package/actions/create-text-post-organization/create-text-post-organization.mjs +4 -3
- package/actions/create-text-post-user/create-text-post-user.mjs +4 -3
- 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-member-organization-access-control/get-member-organization-access-control.mjs → get-org-member-access/get-org-member-access.mjs} +2 -2
- 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/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/utils.mjs +27 -0
- package/package.json +1 -1
- 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.7",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
linkedin,
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import linkedin from "../../linkedin.app.mjs";
|
|
2
2
|
import { getFileStreamAndMetadata } from "@pipedream/platform";
|
|
3
3
|
import FormData from "form-data";
|
|
4
|
+
import utils from "../../common/utils.mjs";
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
7
|
key: "linkedin-create-image-post-organization",
|
|
7
8
|
name: "Create Image Post (Organization)",
|
|
8
|
-
description: "Create an image post on LinkedIn. [See the
|
|
9
|
-
version: "1.0.
|
|
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.2",
|
|
10
11
|
type: "action",
|
|
11
12
|
props: {
|
|
12
13
|
linkedin,
|
|
@@ -87,7 +88,7 @@ export default {
|
|
|
87
88
|
await this.linkedin.createPost({
|
|
88
89
|
data: {
|
|
89
90
|
author: this.organizationId,
|
|
90
|
-
commentary: this.text,
|
|
91
|
+
commentary: utils.escapeText(this.text),
|
|
91
92
|
visibility: "PUBLIC",
|
|
92
93
|
content: {
|
|
93
94
|
media: {
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import linkedin from "../../linkedin.app.mjs";
|
|
2
2
|
import { getFileStreamAndMetadata } from "@pipedream/platform";
|
|
3
3
|
import FormData from "form-data";
|
|
4
|
+
import utils from "../../common/utils.mjs";
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
7
|
key: "linkedin-create-image-post-user",
|
|
7
8
|
name: "Create Image Post (User)",
|
|
8
|
-
description: "Create an image post on LinkedIn. [See the
|
|
9
|
-
version: "1.0.
|
|
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.2",
|
|
10
11
|
type: "action",
|
|
11
12
|
props: {
|
|
12
13
|
linkedin,
|
|
@@ -86,7 +87,7 @@ export default {
|
|
|
86
87
|
|
|
87
88
|
await this.linkedin.createPost({
|
|
88
89
|
data: {
|
|
89
|
-
commentary: this.text,
|
|
90
|
+
commentary: utils.escapeText(this.text),
|
|
90
91
|
visibility: this.visibility,
|
|
91
92
|
content: {
|
|
92
93
|
media: {
|
|
@@ -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.7",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
linkedin,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import linkedin from "../../linkedin.app.mjs";
|
|
2
|
+
import utils from "../../common/utils.mjs";
|
|
2
3
|
|
|
3
4
|
export default {
|
|
4
5
|
key: "linkedin-create-text-post-organization",
|
|
5
6
|
name: "Create a Simple Post (Organization)",
|
|
6
|
-
description: "Create post on LinkedIn using text, URL or article. [See the
|
|
7
|
-
version: "0.0.
|
|
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.7",
|
|
8
9
|
type: "action",
|
|
9
10
|
props: {
|
|
10
11
|
linkedin,
|
|
@@ -30,7 +31,7 @@ export default {
|
|
|
30
31
|
async run({ $ }) {
|
|
31
32
|
const data = {
|
|
32
33
|
author: this.organizationId,
|
|
33
|
-
commentary: this.text,
|
|
34
|
+
commentary: utils.escapeText(this.text),
|
|
34
35
|
visibility: "PUBLIC",
|
|
35
36
|
};
|
|
36
37
|
if (this.article) {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import linkedin from "../../linkedin.app.mjs";
|
|
2
|
+
import utils from "../../common/utils.mjs";
|
|
2
3
|
|
|
3
4
|
export default {
|
|
4
5
|
key: "linkedin-create-text-post-user",
|
|
5
6
|
name: "Create a Simple Post (User)",
|
|
6
|
-
description: "Create post on LinkedIn using text, URL or article. [See the
|
|
7
|
-
version: "0.0.
|
|
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.7",
|
|
8
9
|
type: "action",
|
|
9
10
|
props: {
|
|
10
11
|
linkedin,
|
|
@@ -29,7 +30,7 @@ export default {
|
|
|
29
30
|
},
|
|
30
31
|
async run({ $ }) {
|
|
31
32
|
const data = {
|
|
32
|
-
commentary: this.text,
|
|
33
|
+
commentary: utils.escapeText(this.text),
|
|
33
34
|
visibility: this.visibility,
|
|
34
35
|
};
|
|
35
36
|
if (this.article) {
|
|
@@ -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 docs](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.7",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
linkedin,
|
|
@@ -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.7",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
linkedin,
|
|
@@ -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.7",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
linkedin,
|
|
@@ -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.7",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
linkedin,
|
|
@@ -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.7",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
linkedin,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import linkedin from "../../linkedin.app.mjs";
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
|
-
key: "linkedin-get-member-
|
|
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.2",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
linkedin,
|
|
@@ -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.1",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
linkedin,
|
|
@@ -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.1",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
linkedin,
|
|
@@ -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.2",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
linkedin,
|
|
@@ -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 docs here](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.7",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
linkedin,
|
|
@@ -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.7",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
linkedin,
|
|
@@ -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.7",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
linkedin,
|
package/common/utils.mjs
CHANGED
|
@@ -30,9 +30,36 @@ function getParamsSerializer(encodeFn = defaultEncodeFn) {
|
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
function escapeText(text) {
|
|
34
|
+
const chars = [
|
|
35
|
+
"\\",
|
|
36
|
+
"|",
|
|
37
|
+
"{",
|
|
38
|
+
"}",
|
|
39
|
+
"@",
|
|
40
|
+
"[",
|
|
41
|
+
"]",
|
|
42
|
+
"(",
|
|
43
|
+
")",
|
|
44
|
+
"<",
|
|
45
|
+
">",
|
|
46
|
+
"#",
|
|
47
|
+
"*",
|
|
48
|
+
"_",
|
|
49
|
+
"~",
|
|
50
|
+
];
|
|
51
|
+
for (const char of chars) {
|
|
52
|
+
const escapedChar = "\\" + char;
|
|
53
|
+
const regex = new RegExp(`\\${char}`, "g");
|
|
54
|
+
text = text.replace(regex, escapedChar);
|
|
55
|
+
}
|
|
56
|
+
return text;
|
|
57
|
+
}
|
|
58
|
+
|
|
33
59
|
export default {
|
|
34
60
|
iterate,
|
|
35
61
|
getNestedProperty,
|
|
36
62
|
encodeFn,
|
|
37
63
|
getParamsSerializer,
|
|
64
|
+
escapeText,
|
|
38
65
|
};
|
package/package.json
CHANGED
|
@@ -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.2",
|
|
13
13
|
dedupe: "unique",
|
|
14
14
|
props: {
|
|
15
15
|
...common.props,
|