@pipedream/linkedin_ads 0.4.2 → 0.4.3

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.
@@ -6,7 +6,7 @@ export default {
6
6
  key: "linkedin_ads-create-report",
7
7
  name: "Create A Report",
8
8
  description: "Queries the Analytics Finder to get analytics for the specified entity i.e company, account, campaign. [See the docs here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ads-reporting#analytics-finder)",
9
- version: "0.0.8",
9
+ version: "0.0.9",
10
10
  annotations: {
11
11
  destructiveHint: false,
12
12
  openWorldHint: true,
@@ -18,7 +18,7 @@ export default {
18
18
  infoAlert: {
19
19
  type: "alert",
20
20
  alertType: "info",
21
- content: "Please provide at least one facet to get analytics if needed. Eg. **Accounts**.",
21
+ content: "Please provide at least one facet to get analytics if needed. Eg. **Accounts**. If no facet is provided, the selected **Ad Account Id** is used as the **Accounts** facet.",
22
22
  },
23
23
  ...common.props,
24
24
  adAccountId: {
@@ -98,6 +98,20 @@ export default {
98
98
  ...arrayProps
99
99
  } = this;
100
100
 
101
+ const facets = [
102
+ "shares",
103
+ "campaigns",
104
+ "creatives",
105
+ "campaignGroups",
106
+ "accounts",
107
+ ];
108
+ const hasFacet = facets.some((key) => arrayProps[key]?.length);
109
+ if (!hasFacet && adAccountId) {
110
+ arrayProps.accounts = [
111
+ app.getSponsoredAccountUrn(adAccountId),
112
+ ];
113
+ }
114
+
101
115
  const response = await createReport({
102
116
  $,
103
117
  params: {
@@ -6,7 +6,7 @@ export default {
6
6
  key: "linkedin_ads-create-report-by-advertiser-account",
7
7
  name: "Create Report By Advertiser Account",
8
8
  description: "Sample query using analytics finder that gets analytics for a particular account for date range starting in a given year. [See the docs here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ads-reporting#sample-request)",
9
- version: "0.0.8",
9
+ version: "0.0.9",
10
10
  annotations: {
11
11
  destructiveHint: false,
12
12
  openWorldHint: true,
@@ -6,7 +6,7 @@ export default {
6
6
  key: "linkedin_ads-create-report-by-campaign",
7
7
  name: "Query Analytics Finder Campaign Sample",
8
8
  description: "Sample query using analytics finder that gets analytics for a particular campaign in a date range starting in a given year. [See the docs here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ads-reporting#analytics-finder)",
9
- version: "0.0.8",
9
+ version: "0.0.9",
10
10
  annotations: {
11
11
  destructiveHint: false,
12
12
  openWorldHint: true,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "linkedin_ads-list-accounts-options",
5
5
  name: "List Accounts Options",
6
6
  description: "Retrieves available options for the Accounts field.",
7
- version: "0.0.2",
7
+ version: "0.0.3",
8
8
  type: "action",
9
9
  annotations: {
10
10
  destructiveHint: false,
@@ -5,7 +5,7 @@ export default {
5
5
  key: "linkedin_ads-send-conversion-event",
6
6
  name: "Send Conversion Event",
7
7
  description: "Sends a conversion event to LinkedIn Ads. [See the documentation](https://learn.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/conversions-api?view=li-lms-2024-01&tabs=http#streaming-conversion-events)",
8
- version: "0.0.8",
8
+ version: "0.0.9",
9
9
  annotations: {
10
10
  destructiveHint: false,
11
11
  openWorldHint: true,
@@ -1,4 +1,4 @@
1
- const VERSION_HEADER = "202606";
1
+ const VERSION_HEADER = "202610";
2
2
  const RESTLI_PROTOCOL_VERSION = "2.0.0";
3
3
 
4
4
  export default {
@@ -161,9 +161,15 @@ export default {
161
161
  };
162
162
  },
163
163
  getSponsoredAccountUrn(id) {
164
+ if (String(id).startsWith("urn:li:sponsoredAccount:")) {
165
+ return id;
166
+ }
164
167
  return `urn:li:sponsoredAccount:${id}`;
165
168
  },
166
169
  getSponsoredCampaignUrn(id) {
170
+ if (String(id).startsWith("urn:li:sponsoredCampaign:")) {
171
+ return id;
172
+ }
167
173
  return `urn:li:sponsoredCampaign:${id}`;
168
174
  },
169
175
  getOrganizationUrn(id) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipedream/linkedin_ads",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "Pipedream LinkedIn Ads Components",
5
5
  "main": "linkedin_ads.app.mjs",
6
6
  "keywords": [
@@ -5,7 +5,7 @@ export default {
5
5
  key: "linkedin_ads-new-event-registration-form-response",
6
6
  name: "New Event Registration Form Response",
7
7
  description: "Emit new event when a fresh response is received on the event registration form. User needs to configure the prop of the specific event. [See the documentation](https://learn.microsoft.com/en-us/linkedin/marketing/community-management/organizations/events?view=li-lms-2024-01&tabs=http)",
8
- version: "0.0.6",
8
+ version: "0.0.7",
9
9
  type: "source",
10
10
  dedupe: "unique",
11
11
  props: {
@@ -6,7 +6,7 @@ export default {
6
6
  key: "linkedin_ads-new-lead-gen-form-created",
7
7
  name: "New Lead Gen Form Created",
8
8
  description: "Emit new event when a new lead is captured through a form. [See the documentation](https://learn.microsoft.com/en-us/linkedin/marketing/lead-sync/leadsync?view=li-lms-2023-07&tabs=http#find-lead-form-responses-by-owner)",
9
- version: "0.0.5",
9
+ version: "0.0.6",
10
10
  type: "source",
11
11
  dedupe: "unique",
12
12
  props: {