Skip to content

Commit

Permalink
move version field to top level (#2180)
Browse files Browse the repository at this point in the history
  • Loading branch information
claude authored Jul 16, 2024
1 parent 4fa1e5a commit d4714a4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Object {
},
},
"userId": "m]^ldlwPRQruDQ&OXR1",
"version": "2",
},
"version": "2",
}
`;

Expand All @@ -42,7 +42,7 @@ Object {
"device": Object {},
"os": Object {},
},
"version": "2",
},
"version": "2",
}
`;
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Object {
},
},
"userId": "M$xwt#p",
"version": "2",
},
"version": "2",
}
`;

Expand All @@ -42,7 +42,7 @@ Object {
"device": Object {},
"os": Object {},
},
"version": "2",
},
"version": "2",
}
`;
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('AppFit.track', () => {
expect(responses[0].status).toBe(200)
expect(responses[0].data).toMatchObject({})
expect(responses[0].options.body).toBe(
`{"eventSource":"segment","occurredAt":"${timestamp}","payload":{"version":"2","sourceEventId":"12345","eventName":"Segment Test Event Name","userId":"userId1","anonymousId":"anonId1234","properties":{"foo":"bar"},"systemProperties":{"appVersion":"1.0.0","ipAddress":"8.8.8.8","os":{"name":"iPhone OS","version":"10.1"},"device":{"id":"device1234","advertisingId":"adId1234","manufacturer":"Apple","model":"iPhone7,2"}}}}`
`{"eventSource":"segment","occurredAt":"${timestamp}","version":"2","payload":{"sourceEventId":"12345","eventName":"Segment Test Event Name","userId":"userId1","anonymousId":"anonId1234","properties":{"foo":"bar"},"systemProperties":{"appVersion":"1.0.0","ipAddress":"8.8.8.8","os":{"name":"iPhone OS","version":"10.1"},"device":{"id":"device1234","advertisingId":"adId1234","manufacturer":"Apple","model":"iPhone7,2"}}}}`
)
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ const action: ActionDefinition<Settings, Payload> = {
json: {
eventSource: 'segment',
occurredAt: payload.occurredAt,
version: '2',
payload: {
version: '2',
sourceEventId: payload.eventId,
eventName: payload.name,
userId: payload.userId,
Expand Down

0 comments on commit d4714a4

Please sign in to comment.