From 9b34703f656d937b9072bb26998a6c9d697040f9 Mon Sep 17 00:00:00 2001 From: Gauravudia Date: Fri, 23 Dec 2022 14:12:51 +0530 Subject: [PATCH] feat(pinterest): add ldp support --- src/cdk/v2/destinations/pinterest_tag/procWorkflow.yaml | 3 ++- .../pinterest_tag/data/pinterestCustomConfig.json | 6 +++++- test/__tests__/data/pinterest_tag_input.json | 1 + test/__tests__/data/pinterest_tag_output.json | 1 + test/__tests__/data/pinterest_tag_router_batch_output.json | 2 ++ test/__tests__/data/pinterest_tag_router_input.json | 1 + test/__tests__/data/pinterest_tag_router_output.json | 2 ++ 7 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/cdk/v2/destinations/pinterest_tag/procWorkflow.yaml b/src/cdk/v2/destinations/pinterest_tag/procWorkflow.yaml index 5fb1db6baf2..4dd6ec7b996 100644 --- a/src/cdk/v2/destinations/pinterest_tag/procWorkflow.yaml +++ b/src/cdk/v2/destinations/pinterest_tag/procWorkflow.yaml @@ -114,7 +114,8 @@ steps: .properties.revenue, "num_items": .properties.numOfItems && Number(.properties.numOfItems), "order_id": .properties.order_id, - "search_string": .properties.query + "search_string": .properties.query, + "opt_out_type": .properties.optOutType }); $.removeUndefinedValues(customFields) diff --git a/src/v0/destinations/pinterest_tag/data/pinterestCustomConfig.json b/src/v0/destinations/pinterest_tag/data/pinterestCustomConfig.json index 2858739b318..c1ca48f610a 100644 --- a/src/v0/destinations/pinterest_tag/data/pinterestCustomConfig.json +++ b/src/v0/destinations/pinterest_tag/data/pinterestCustomConfig.json @@ -30,6 +30,10 @@ "destKey": "search_string", "sourceKeys": "properties.query", "required": false + }, + { + "destKey": "opt_out_type", + "sourceKeys": "properties.optOutType", + "required": false } ] - diff --git a/test/__tests__/data/pinterest_tag_input.json b/test/__tests__/data/pinterest_tag_input.json index c291d4eef05..8df3c958955 100644 --- a/test/__tests__/data/pinterest_tag_input.json +++ b/test/__tests__/data/pinterest_tag_input.json @@ -44,6 +44,7 @@ "discount": 2.5, "order_id": "50314b8e9bcf000000000000", "requestIP": "123.0.0.0", + "optOutType": "LDP", "products": [ { "sku": "45790-32", diff --git a/test/__tests__/data/pinterest_tag_output.json b/test/__tests__/data/pinterest_tag_output.json index a00d7bc168b..236bef2d4b0 100644 --- a/test/__tests__/data/pinterest_tag_output.json +++ b/test/__tests__/data/pinterest_tag_output.json @@ -51,6 +51,7 @@ "currency": "USD", "value": 27.5, "order_id": "50314b8e9bcf000000000000", + "opt_out_type": "LDP", "num_items": 3, "content_ids": [ "507f1f77bcf86cd799439011", diff --git a/test/__tests__/data/pinterest_tag_router_batch_output.json b/test/__tests__/data/pinterest_tag_router_batch_output.json index 84f9a6120a2..e6f2e252e8f 100644 --- a/test/__tests__/data/pinterest_tag_router_batch_output.json +++ b/test/__tests__/data/pinterest_tag_router_batch_output.json @@ -55,6 +55,7 @@ "value": 27.5, "order_id": "50314b8e9bcf000000000000", "num_items": 3, + "opt_out_type": "LDP", "content_ids": [ "507f1f77bcf86cd799439011", "505bd76785ebb509fc183733" @@ -113,6 +114,7 @@ "value": 27.5, "order_id": "50314b8e9bcf000000000000", "num_items": 3, + "opt_out_type": "LDP", "content_ids": [ "507f1f77bcf86cd799439011", "505bd76785ebb509fc183733" diff --git a/test/__tests__/data/pinterest_tag_router_input.json b/test/__tests__/data/pinterest_tag_router_input.json index 4d34b7d076c..3da1137835f 100644 --- a/test/__tests__/data/pinterest_tag_router_input.json +++ b/test/__tests__/data/pinterest_tag_router_input.json @@ -45,6 +45,7 @@ "discount": 2.5, "order_id": "50314b8e9bcf000000000000", "requestIP": "123.0.0.0", + "optOutType": "LDP", "products": [ { "sku": "45790-32", diff --git a/test/__tests__/data/pinterest_tag_router_output.json b/test/__tests__/data/pinterest_tag_router_output.json index 95386644d25..e5b1b19c114 100644 --- a/test/__tests__/data/pinterest_tag_router_output.json +++ b/test/__tests__/data/pinterest_tag_router_output.json @@ -55,6 +55,7 @@ "value": 27.5, "order_id": "50314b8e9bcf000000000000", "num_items": 3, + "opt_out_type": "LDP", "content_ids": [ "507f1f77bcf86cd799439011", "505bd76785ebb509fc183733" @@ -113,6 +114,7 @@ "value": 27.5, "order_id": "50314b8e9bcf000000000000", "num_items": 3, + "opt_out_type": "LDP", "content_ids": [ "507f1f77bcf86cd799439011", "505bd76785ebb509fc183733"