Skip to content

Commit 89ce201

Browse files
authored
fix: tiktok audience list message type (#5011)
🔒 Scanned for secrets using gitleaks 8.29.1 ## What are the changes introduced in this PR? - Regression because of [this](6a0ec7d#diff-abed566c996f7d32111260dfa5b8d1cddb2025c236fb3f4c998e598a00597b8aL14-L25). Earlier we were using superRefine and checking for lowecase, now with enum we can't, we need to have the exact message type. ## What is the related Linear task? - Resolves INT-6010
1 parent 191ee98 commit 89ce201

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

src/v0/destinations/tiktok_audience/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const TiktokAudienceDestinationSchema = z
1313

1414
export const TiktokAudienceMessageSchema = z
1515
.object({
16-
type: z.enum(['audiencelist'], {
16+
type: z.enum(['audienceList'], {
1717
required_error: 'message Type is not present. Aborting message.',
1818
}),
1919
anonymousId: z.string().optional(),

test/integrations/destinations/tiktok_audience/processor/data-native.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const nativeData = [
1111
{
1212
message: {
1313
userId: 'user 1',
14-
type: 'audiencelist',
14+
type: 'audienceList',
1515
properties: {
1616
listData: {
1717
add: [
@@ -203,7 +203,7 @@ export const nativeData = [
203203
{
204204
message: {
205205
userId: 'user 1',
206-
type: 'audiencelist',
206+
type: 'audienceList',
207207
properties: {
208208
listData: {
209209
add: [
@@ -425,7 +425,7 @@ export const nativeData = [
425425
{
426426
message: {
427427
userId: 'user 1',
428-
type: 'audiencelist',
428+
type: 'audienceList',
429429
properties: {
430430
listData: {
431431
add: [
@@ -596,7 +596,7 @@ export const nativeData = [
596596
{
597597
message: {
598598
userId: 'user 1',
599-
type: 'audiencelist',
599+
type: 'audienceList',
600600
properties: {
601601
listData: {
602602
add: [
@@ -884,7 +884,7 @@ export const nativeData = [
884884
status: 200,
885885
body: [
886886
{
887-
error: "message.type: Invalid enum value. Expected 'audiencelist', received 'identify'",
887+
error: "message.type: Invalid enum value. Expected 'audienceList', received 'identify'",
888888
metadata: {
889889
jobId: 102,
890890
attemptNum: 1,
@@ -926,7 +926,7 @@ export const nativeData = [
926926
{
927927
message: {
928928
userId: 'user 1',
929-
type: 'audiencelist',
929+
type: 'audienceList',
930930
context: {
931931
externalId: [
932932
{ type: 'TIKTOK_AUDIENCE-23856594064540489', identifierType: 'EMAIL_SHA256' },
@@ -1009,7 +1009,7 @@ export const nativeData = [
10091009
{
10101010
message: {
10111011
userId: 'user 1',
1012-
type: 'audiencelist',
1012+
type: 'audienceList',
10131013
properties: {},
10141014
context: {
10151015
externalId: [
@@ -1094,7 +1094,7 @@ export const nativeData = [
10941094
{
10951095
message: {
10961096
userId: 'user 1',
1097-
type: 'audiencelist',
1097+
type: 'audienceList',
10981098
properties: {
10991099
listData: {
11001100
update: [{ EMAIL_SHA256: 'alex@email.com' }],

test/integrations/destinations/tiktok_audience/router/data-native.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const nativeData = [
1212
{
1313
message: {
1414
userId: 'user 1',
15-
type: 'audiencelist',
15+
type: 'audienceList',
1616
properties: {
1717
listData: {
1818
add: [
@@ -57,7 +57,7 @@ export const nativeData = [
5757
{
5858
message: {
5959
userId: 'user 1',
60-
type: 'audiencelist',
60+
type: 'audienceList',
6161
properties: {
6262
listData: {
6363
add: [
@@ -102,7 +102,7 @@ export const nativeData = [
102102
{
103103
message: {
104104
userId: 'user 1',
105-
type: 'audiencelist',
105+
type: 'audienceList',
106106
properties: {
107107
listData: {
108108
add: [
@@ -156,7 +156,7 @@ export const nativeData = [
156156
{
157157
message: {
158158
userId: 'user 1',
159-
type: 'audiencelist',
159+
type: 'audienceList',
160160
properties: {
161161
listData: {
162162
add: [

0 commit comments

Comments
 (0)