@tellescope/sdk 1.4.26 → 1.4.28

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.
@@ -616,11 +616,12 @@ const enduser_tests = async (queries=sdk.api.endusers) => {
616
616
  () => queries.updateOne(e1.id ?? '', { email: e2.email }),
617
617
  { shouldError: true, onError: () => true }
618
618
  )
619
- await async_test(
620
- `update-enduser phone conflict`,
621
- () => queries.updateOne(e1.id ?? '', { phone: e2.phone }),
622
- { shouldError: true, onError: () => true }
623
- )
619
+ // no longer restricted
620
+ // await async_test(
621
+ // `update-enduser phone conflict`,
622
+ // () => queries.updateOne(e1.id ?? '', { phone: e2.phone }),
623
+ // { shouldError: true, onError: () => true }
624
+ // )
624
625
  await async_test(
625
626
  `update-enduser email and phone conflict`,
626
627
  () => queries.updateOne(e1.id ?? '', { email: e2.email, phone: e2.phone }),
@@ -1798,13 +1799,13 @@ const removeFromJourneyTests = async () => {
1798
1799
 
1799
1800
  // add to journey to trigger initial action
1800
1801
  await sdk.api.endusers.updateOne(enduser.id, { journeys: { [journey.id]: 'New' } }, { replaceObjectFields: true })
1801
- await wait(undefined, 500)
1802
+ await wait(undefined, 250)
1802
1803
  await async_test(
1803
1804
  `Root action triggered (only root)`,
1804
1805
  () => sdk.api.automated_actions.getSome({ filter: { enduserId: enduser.id }}),
1805
1806
  { onResult: es => es.length === 1 }
1806
1807
  )
1807
- await wait(undefined, 500)
1808
+ await wait(undefined, 250)
1808
1809
  await async_test(
1809
1810
  `Next step not trigged early`,
1810
1811
  () => sdk.api.endusers.getOne(enduser.id),
@@ -226,6 +226,12 @@ const endusers_tests = async (isSubscribed: boolean) => {
226
226
  'Enduser update error', 'Update enduser webhook', isSubscribed
227
227
  )
228
228
 
229
+ await sdk.api.endusers.set_password({ id: enduser.id, password: 'initialPassword' })
230
+ await check_next_webhook(
231
+ a => (a.records?.[0] as any)?.password === 'initialPassword',
232
+ 'Enduser set password error', 'Set enduser password webhook', isSubscribed
233
+ )
234
+
229
235
  // cleanup
230
236
  if (isSubscribed) {
231
237
  await sdk.api.webhooks.update({ subscriptionUpdates: {