@epilot/sdk 2.19.0 → 2.19.2
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.
- package/definitions/app-runtime.json +1 -1
- package/definitions/app.json +135 -3
- package/definitions/targeting-runtime.json +1 -1
- package/definitions/targeting.json +240 -49
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +6 -6
- package/dist/apis/ai-agents.js +1 -1
- package/dist/apis/app.cjs +8 -8
- package/dist/apis/app.d.cts +2 -2
- package/dist/apis/app.d.ts +2 -2
- package/dist/apis/app.js +2 -2
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +6 -6
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +6 -6
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/calendar.cjs +6 -6
- package/dist/apis/calendar.js +1 -1
- package/dist/apis/configuration-hub.cjs +6 -6
- package/dist/apis/configuration-hub.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +6 -6
- package/dist/apis/customer-portal.js +1 -1
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-governance.cjs +6 -6
- package/dist/apis/data-governance.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +6 -6
- package/dist/apis/document.js +1 -1
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +6 -6
- package/dist/apis/entity.js +1 -1
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/event-catalog.cjs +6 -6
- package/dist/apis/event-catalog.js +1 -1
- package/dist/apis/file.cjs +6 -6
- package/dist/apis/file.js +1 -1
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/integration-toolkit.cjs +6 -6
- package/dist/apis/integration-toolkit.js +1 -1
- package/dist/apis/journey.cjs +6 -6
- package/dist/apis/journey.js +1 -1
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +6 -6
- package/dist/apis/message.js +1 -1
- package/dist/apis/metering.cjs +6 -6
- package/dist/apis/metering.js +1 -1
- package/dist/apis/notes.cjs +6 -6
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +6 -6
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +6 -6
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +6 -6
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +6 -6
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/pricing-tier.cjs +6 -6
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +6 -6
- package/dist/apis/pricing.js +1 -1
- package/dist/apis/purpose.cjs +6 -6
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/query.cjs +6 -6
- package/dist/apis/query.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/sharing.cjs +6 -6
- package/dist/apis/sharing.js +1 -1
- package/dist/apis/snapshot.cjs +6 -6
- package/dist/apis/snapshot.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/target.cjs +6 -6
- package/dist/apis/target.js +1 -1
- package/dist/apis/targeting.cjs +8 -8
- package/dist/apis/targeting.d.cts +2 -2
- package/dist/apis/targeting.d.ts +2 -2
- package/dist/apis/targeting.js +2 -2
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +6 -6
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/app-RZ2JCNZ7.js +7 -0
- package/dist/app-U7UEBBWK.cjs +7 -0
- package/dist/app-runtime-2MEGUF3G.cjs +5 -0
- package/dist/{app-runtime-NBGFHFT2.js → app-runtime-T63JMR4T.js} +1 -1
- package/dist/{app.d-CZDjyxee.d.cts → app.d-CyI0Leab.d.cts} +137 -2
- package/dist/{app.d-CZDjyxee.d.ts → app.d-CyI0Leab.d.ts} +137 -2
- package/dist/{chunk-TNRT33VQ.js → chunk-4MILKZOO.js} +1 -1
- package/dist/{chunk-XHVIF7AC.cjs → chunk-HPSTDQ62.cjs} +1 -1
- package/dist/{chunk-W3SPZ6V5.cjs → chunk-MDUJKPDR.cjs} +1 -1
- package/dist/{chunk-UH24GU2Z.js → chunk-MSFE3E7D.js} +1 -1
- package/dist/{chunk-C543QHBO.cjs → chunk-QWWGJOYR.cjs} +4 -4
- package/dist/{chunk-BVCHHE2R.js → chunk-UC3IKFHD.js} +4 -4
- package/dist/index.cjs +12 -12
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/js-yaml-DLCVPJ7G.js +0 -0
- package/dist/targeting-BTVCLYFW.cjs +7 -0
- package/dist/targeting-NWYDE3E7.js +7 -0
- package/dist/{targeting-runtime-HWL6PLJF.cjs → targeting-runtime-AB6BMJ6U.cjs} +2 -2
- package/dist/{targeting-runtime-L5RGDNSH.js → targeting-runtime-S22V2UEE.js} +1 -1
- package/dist/{targeting.d-DaK3kwZg.d.cts → targeting.d-16SvPyj4.d.cts} +295 -77
- package/dist/{targeting.d-DaK3kwZg.d.ts → targeting.d-16SvPyj4.d.ts} +295 -77
- package/docs/app.md +336 -173
- package/docs/targeting.md +229 -31
- package/package.json +11 -12
- package/dist/app-IXCUVIHD.js +0 -7
- package/dist/app-RKHOTF7Z.cjs +0 -7
- package/dist/app-runtime-AAQHTC7F.cjs +0 -5
- package/dist/targeting-A2X6X7BF.js +0 -7
- package/dist/targeting-CSGKITGV.cjs +0 -7
package/docs/targeting.md
CHANGED
|
@@ -44,7 +44,9 @@ const { data } = await targetingClient.changeCampaignStatus(...)
|
|
|
44
44
|
- [`updateRecipient`](#updaterecipient)
|
|
45
45
|
- [`updateRecipientPortalStatus`](#updaterecipientportalstatus)
|
|
46
46
|
- [`updateRecipientEntityUiStatus`](#updaterecipiententityuistatus)
|
|
47
|
+
- [`restoreRecipientEntityUiStatus`](#restorerecipiententityuistatus)
|
|
47
48
|
- [`getRecipients`](#getrecipients)
|
|
49
|
+
- [`getEmailStats`](#getemailstats)
|
|
48
50
|
|
|
49
51
|
**Schemas**
|
|
50
52
|
- [`BaseError`](#baseerror)
|
|
@@ -67,13 +69,15 @@ const { data } = await targetingClient.changeCampaignStatus(...)
|
|
|
67
69
|
- [`MatchCampaignParams`](#matchcampaignparams)
|
|
68
70
|
- [`NextBestAction`](#nextbestaction)
|
|
69
71
|
- [`DiscoverCampaignsParams`](#discovercampaignsparams)
|
|
72
|
+
- [`DiscoverResult`](#discoverresult)
|
|
70
73
|
- [`MatchTargetParams`](#matchtargetparams)
|
|
71
74
|
- [`GetTargetQueriesParams`](#gettargetqueriesparams)
|
|
72
75
|
- [`TargetQueryResult`](#targetqueryresult)
|
|
73
76
|
- [`AutomationStatus`](#automationstatus)
|
|
74
77
|
- [`PortalStatus`](#portalstatus)
|
|
75
78
|
- [`EntityUiStatus`](#entityuistatus)
|
|
76
|
-
- [`
|
|
79
|
+
- [`EmailStatus`](#emailstatus)
|
|
80
|
+
- [`EmailBounceType`](#emailbouncetype)
|
|
77
81
|
- [`Recipient`](#recipient)
|
|
78
82
|
- [`BaseRecipientPayload`](#baserecipientpayload)
|
|
79
83
|
- [`AutomationRecipientPayload`](#automationrecipientpayload)
|
|
@@ -90,7 +94,7 @@ const { data } = await targetingClient.changeCampaignStatus(...)
|
|
|
90
94
|
|
|
91
95
|
### `changeCampaignStatus`
|
|
92
96
|
|
|
93
|
-
Change the status of a campaign
|
|
97
|
+
Change the status of a campaign to a desired status.
|
|
94
98
|
|
|
95
99
|
`POST /v1/campaign/{campaign_id}/status`
|
|
96
100
|
|
|
@@ -180,7 +184,7 @@ const { data } = await client.getCampaignJobStatus({
|
|
|
180
184
|
|
|
181
185
|
### `getCampaignPortals`
|
|
182
186
|
|
|
183
|
-
Get portals
|
|
187
|
+
Get the list of portals and its widgets where the campaign is used.
|
|
184
188
|
|
|
185
189
|
`GET /v1/campaign/{campaign_id}/portals`
|
|
186
190
|
|
|
@@ -220,7 +224,7 @@ const { data } = await client.getCampaignPortals({
|
|
|
220
224
|
|
|
221
225
|
### `retriggerCampaignAutomations`
|
|
222
226
|
|
|
223
|
-
Retrigger
|
|
227
|
+
Retrigger automation executions for specific campaign recipients that have failed.
|
|
224
228
|
|
|
225
229
|
`POST /v1/campaign/{campaign_id}/automations:retrigger`
|
|
226
230
|
|
|
@@ -258,7 +262,8 @@ const { data } = await client.retriggerCampaignAutomations(
|
|
|
258
262
|
|
|
259
263
|
### `setupCampaign`
|
|
260
264
|
|
|
261
|
-
|
|
265
|
+
Creates a `campaign` entity together with its related entities and configurations in a single call.
|
|
266
|
+
Used by the campaign wizard UI, but not restricted to it.
|
|
262
267
|
|
|
263
268
|
`POST /v1/campaign:setup`
|
|
264
269
|
|
|
@@ -325,7 +330,7 @@ const { data } = await client.setupCampaign(
|
|
|
325
330
|
|
|
326
331
|
### `matchCampaigns`
|
|
327
332
|
|
|
328
|
-
Match campaigns
|
|
333
|
+
Match campaigns based on target entities.
|
|
329
334
|
|
|
330
335
|
`POST /v1/campaign:match`
|
|
331
336
|
|
|
@@ -398,7 +403,7 @@ const { data } = await client.matchCampaigns(
|
|
|
398
403
|
|
|
399
404
|
### `discoverCampaigns`
|
|
400
405
|
|
|
401
|
-
|
|
406
|
+
Given an entity, returns the Next Best Actions it should see on the Entity-UI channel.
|
|
402
407
|
|
|
403
408
|
`POST /v1/campaign:discover`
|
|
404
409
|
|
|
@@ -434,7 +439,6 @@ const { data } = await client.discoverCampaigns(
|
|
|
434
439
|
"cta": {
|
|
435
440
|
"type": "journey",
|
|
436
441
|
"target": "string",
|
|
437
|
-
"label": "string",
|
|
438
442
|
"context_params": [
|
|
439
443
|
{
|
|
440
444
|
"key": "string",
|
|
@@ -443,7 +447,36 @@ const { data } = await client.discoverCampaigns(
|
|
|
443
447
|
]
|
|
444
448
|
}
|
|
445
449
|
},
|
|
446
|
-
"status": "seen"
|
|
450
|
+
"status": "seen",
|
|
451
|
+
"status_updated_at": "1970-01-01T00:00:00.000Z"
|
|
452
|
+
}
|
|
453
|
+
],
|
|
454
|
+
"dismissed": [
|
|
455
|
+
{
|
|
456
|
+
"campaign_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",
|
|
457
|
+
"nba": {
|
|
458
|
+
"category": "string",
|
|
459
|
+
"icon": {
|
|
460
|
+
"name": "string",
|
|
461
|
+
"color": "string"
|
|
462
|
+
},
|
|
463
|
+
"title": "string",
|
|
464
|
+
"body": "string",
|
|
465
|
+
"priority": "medium",
|
|
466
|
+
"is_dismissable": true,
|
|
467
|
+
"cta": {
|
|
468
|
+
"type": "journey",
|
|
469
|
+
"target": "string",
|
|
470
|
+
"context_params": [
|
|
471
|
+
{
|
|
472
|
+
"key": "string",
|
|
473
|
+
"value": "string"
|
|
474
|
+
}
|
|
475
|
+
]
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
"status": "seen",
|
|
479
|
+
"status_updated_at": "1970-01-01T00:00:00.000Z"
|
|
447
480
|
}
|
|
448
481
|
]
|
|
449
482
|
}
|
|
@@ -455,7 +488,7 @@ const { data } = await client.discoverCampaigns(
|
|
|
455
488
|
|
|
456
489
|
### `matchTargets`
|
|
457
490
|
|
|
458
|
-
|
|
491
|
+
Find targets from the provided list that include the provide entities.
|
|
459
492
|
|
|
460
493
|
`POST /v1/target:match`
|
|
461
494
|
|
|
@@ -517,7 +550,8 @@ const { data } = await client.matchTargets(
|
|
|
517
550
|
|
|
518
551
|
### `getTargetQueries`
|
|
519
552
|
|
|
520
|
-
|
|
553
|
+
Transform target filters into Lucene queries for the provided target IDs.
|
|
554
|
+
Returns the transformed query string for each target along with any errors encountered.
|
|
521
555
|
|
|
522
556
|
`POST /v1/target/queries`
|
|
523
557
|
|
|
@@ -551,7 +585,7 @@ const { data } = await client.getTargetQueries(
|
|
|
551
585
|
|
|
552
586
|
### `createRecipient`
|
|
553
587
|
|
|
554
|
-
|
|
588
|
+
Creates a new recipient associated with a campaign.
|
|
555
589
|
|
|
556
590
|
`POST /v1/campaign/{campaign_id}/recipient`
|
|
557
591
|
|
|
@@ -584,7 +618,15 @@ const { data } = await client.createRecipient(
|
|
|
584
618
|
"portal_state": {},
|
|
585
619
|
"entity_ui_status": "seen",
|
|
586
620
|
"entity_ui_status_updated_at": "1970-01-01T00:00:00.000Z",
|
|
587
|
-
"
|
|
621
|
+
"entity_ui_status_before_dismiss": "seen",
|
|
622
|
+
"message_entity_id": "string",
|
|
623
|
+
"email_status": "sent",
|
|
624
|
+
"email_status_updated_at": "1970-01-01T00:00:00.000Z",
|
|
625
|
+
"email_bounce_type": "permanent",
|
|
626
|
+
"email_bounce_subtype": "string",
|
|
627
|
+
"email_complaint_type": "string",
|
|
628
|
+
"email_bounce_reason": "string",
|
|
629
|
+
"email_send_error": {},
|
|
588
630
|
"updated_at": "1970-01-01T00:00:00.000Z"
|
|
589
631
|
}
|
|
590
632
|
```
|
|
@@ -595,7 +637,7 @@ const { data } = await client.createRecipient(
|
|
|
595
637
|
|
|
596
638
|
### `updateRecipient`
|
|
597
639
|
|
|
598
|
-
|
|
640
|
+
Updates a recipient's attributes.
|
|
599
641
|
|
|
600
642
|
`PATCH /v1/campaign/{campaign_id}/recipient/{recipient_id}`
|
|
601
643
|
|
|
@@ -629,7 +671,15 @@ const { data } = await client.updateRecipient(
|
|
|
629
671
|
"portal_state": {},
|
|
630
672
|
"entity_ui_status": "seen",
|
|
631
673
|
"entity_ui_status_updated_at": "1970-01-01T00:00:00.000Z",
|
|
632
|
-
"
|
|
674
|
+
"entity_ui_status_before_dismiss": "seen",
|
|
675
|
+
"message_entity_id": "string",
|
|
676
|
+
"email_status": "sent",
|
|
677
|
+
"email_status_updated_at": "1970-01-01T00:00:00.000Z",
|
|
678
|
+
"email_bounce_type": "permanent",
|
|
679
|
+
"email_bounce_subtype": "string",
|
|
680
|
+
"email_complaint_type": "string",
|
|
681
|
+
"email_bounce_reason": "string",
|
|
682
|
+
"email_send_error": {},
|
|
633
683
|
"updated_at": "1970-01-01T00:00:00.000Z"
|
|
634
684
|
}
|
|
635
685
|
```
|
|
@@ -640,7 +690,8 @@ const { data } = await client.updateRecipient(
|
|
|
640
690
|
|
|
641
691
|
### `updateRecipientPortalStatus`
|
|
642
692
|
|
|
643
|
-
|
|
693
|
+
Updates the portal status for a specific campaign recipient.
|
|
694
|
+
The portal_status_updated_at timestamp is automatically set when the status changes.
|
|
644
695
|
|
|
645
696
|
`PATCH /v1/campaign/{campaign_id}/recipient/{recipient_id}/portal:status`
|
|
646
697
|
|
|
@@ -671,7 +722,15 @@ const { data } = await client.updateRecipientPortalStatus(
|
|
|
671
722
|
"portal_state": {},
|
|
672
723
|
"entity_ui_status": "seen",
|
|
673
724
|
"entity_ui_status_updated_at": "1970-01-01T00:00:00.000Z",
|
|
674
|
-
"
|
|
725
|
+
"entity_ui_status_before_dismiss": "seen",
|
|
726
|
+
"message_entity_id": "string",
|
|
727
|
+
"email_status": "sent",
|
|
728
|
+
"email_status_updated_at": "1970-01-01T00:00:00.000Z",
|
|
729
|
+
"email_bounce_type": "permanent",
|
|
730
|
+
"email_bounce_subtype": "string",
|
|
731
|
+
"email_complaint_type": "string",
|
|
732
|
+
"email_bounce_reason": "string",
|
|
733
|
+
"email_send_error": {},
|
|
675
734
|
"updated_at": "1970-01-01T00:00:00.000Z"
|
|
676
735
|
}
|
|
677
736
|
```
|
|
@@ -682,7 +741,7 @@ const { data } = await client.updateRecipientPortalStatus(
|
|
|
682
741
|
|
|
683
742
|
### `updateRecipientEntityUiStatus`
|
|
684
743
|
|
|
685
|
-
|
|
744
|
+
Records a Next Best Action interaction for a recipient on the Entity-UI channel.
|
|
686
745
|
|
|
687
746
|
`PATCH /v1/campaign/{campaign_id}/recipient/{recipient_id}/entity_ui:status`
|
|
688
747
|
|
|
@@ -714,7 +773,60 @@ const { data } = await client.updateRecipientEntityUiStatus(
|
|
|
714
773
|
"portal_state": {},
|
|
715
774
|
"entity_ui_status": "seen",
|
|
716
775
|
"entity_ui_status_updated_at": "1970-01-01T00:00:00.000Z",
|
|
717
|
-
"
|
|
776
|
+
"entity_ui_status_before_dismiss": "seen",
|
|
777
|
+
"message_entity_id": "string",
|
|
778
|
+
"email_status": "sent",
|
|
779
|
+
"email_status_updated_at": "1970-01-01T00:00:00.000Z",
|
|
780
|
+
"email_bounce_type": "permanent",
|
|
781
|
+
"email_bounce_subtype": "string",
|
|
782
|
+
"email_complaint_type": "string",
|
|
783
|
+
"email_bounce_reason": "string",
|
|
784
|
+
"email_send_error": {},
|
|
785
|
+
"updated_at": "1970-01-01T00:00:00.000Z"
|
|
786
|
+
}
|
|
787
|
+
```
|
|
788
|
+
|
|
789
|
+
</details>
|
|
790
|
+
|
|
791
|
+
---
|
|
792
|
+
|
|
793
|
+
### `restoreRecipientEntityUiStatus`
|
|
794
|
+
|
|
795
|
+
Undo a dismissal on the Entity-UI (Next Best Action) channel
|
|
796
|
+
|
|
797
|
+
`POST /v1/campaign/{campaign_id}/recipient/{recipient_id}/entity_ui:restore`
|
|
798
|
+
|
|
799
|
+
```ts
|
|
800
|
+
const { data } = await client.restoreRecipientEntityUiStatus({
|
|
801
|
+
campaign_id: 'example',
|
|
802
|
+
recipient_id: 'example',
|
|
803
|
+
})
|
|
804
|
+
```
|
|
805
|
+
|
|
806
|
+
<details>
|
|
807
|
+
<summary>Response</summary>
|
|
808
|
+
|
|
809
|
+
```json
|
|
810
|
+
{
|
|
811
|
+
"entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",
|
|
812
|
+
"entity_schema": "string",
|
|
813
|
+
"title": "string",
|
|
814
|
+
"automation_status": "pending",
|
|
815
|
+
"automation_execution_id": "string",
|
|
816
|
+
"portal_status": "sent",
|
|
817
|
+
"portal_status_updated_at": "1970-01-01T00:00:00.000Z",
|
|
818
|
+
"portal_state": {},
|
|
819
|
+
"entity_ui_status": "seen",
|
|
820
|
+
"entity_ui_status_updated_at": "1970-01-01T00:00:00.000Z",
|
|
821
|
+
"entity_ui_status_before_dismiss": "seen",
|
|
822
|
+
"message_entity_id": "string",
|
|
823
|
+
"email_status": "sent",
|
|
824
|
+
"email_status_updated_at": "1970-01-01T00:00:00.000Z",
|
|
825
|
+
"email_bounce_type": "permanent",
|
|
826
|
+
"email_bounce_subtype": "string",
|
|
827
|
+
"email_complaint_type": "string",
|
|
828
|
+
"email_bounce_reason": "string",
|
|
829
|
+
"email_send_error": {},
|
|
718
830
|
"updated_at": "1970-01-01T00:00:00.000Z"
|
|
719
831
|
}
|
|
720
832
|
```
|
|
@@ -725,7 +837,7 @@ const { data } = await client.updateRecipientEntityUiStatus(
|
|
|
725
837
|
|
|
726
838
|
### `getRecipients`
|
|
727
839
|
|
|
728
|
-
Get
|
|
840
|
+
Get a paginated list of recipients for a campaign.
|
|
729
841
|
|
|
730
842
|
`GET /v1/campaign/{campaign_id}/recipients`
|
|
731
843
|
|
|
@@ -737,6 +849,7 @@ const { data } = await client.getRecipients({
|
|
|
737
849
|
q: 'example',
|
|
738
850
|
automation_status: ['...'],
|
|
739
851
|
portal_status: 'example',
|
|
852
|
+
email_status: 'example',
|
|
740
853
|
})
|
|
741
854
|
```
|
|
742
855
|
|
|
@@ -757,7 +870,15 @@ const { data } = await client.getRecipients({
|
|
|
757
870
|
"portal_state": {},
|
|
758
871
|
"entity_ui_status": "seen",
|
|
759
872
|
"entity_ui_status_updated_at": "1970-01-01T00:00:00.000Z",
|
|
760
|
-
"
|
|
873
|
+
"entity_ui_status_before_dismiss": "seen",
|
|
874
|
+
"message_entity_id": "string",
|
|
875
|
+
"email_status": "sent",
|
|
876
|
+
"email_status_updated_at": "1970-01-01T00:00:00.000Z",
|
|
877
|
+
"email_bounce_type": "permanent",
|
|
878
|
+
"email_bounce_subtype": "string",
|
|
879
|
+
"email_complaint_type": "string",
|
|
880
|
+
"email_bounce_reason": "string",
|
|
881
|
+
"email_send_error": {},
|
|
761
882
|
"updated_at": "1970-01-01T00:00:00.000Z"
|
|
762
883
|
}
|
|
763
884
|
],
|
|
@@ -770,6 +891,40 @@ const { data } = await client.getRecipients({
|
|
|
770
891
|
|
|
771
892
|
---
|
|
772
893
|
|
|
894
|
+
### `getEmailStats`
|
|
895
|
+
|
|
896
|
+
Aggregate email delivery counts for a campaign, for the KPI summary on the campaign UI.
|
|
897
|
+
Counts cover the email (automation) channel only; `total_emailed` is the number of
|
|
898
|
+
recipients with a recorded em
|
|
899
|
+
|
|
900
|
+
`GET /v1/campaign/{campaign_id}/email-stats`
|
|
901
|
+
|
|
902
|
+
```ts
|
|
903
|
+
const { data } = await client.getEmailStats({
|
|
904
|
+
campaign_id: 'example',
|
|
905
|
+
})
|
|
906
|
+
```
|
|
907
|
+
|
|
908
|
+
<details>
|
|
909
|
+
<summary>Response</summary>
|
|
910
|
+
|
|
911
|
+
```json
|
|
912
|
+
{
|
|
913
|
+
"total_emailed": 0,
|
|
914
|
+
"sent": 0,
|
|
915
|
+
"delivered": 0,
|
|
916
|
+
"bounced": 0,
|
|
917
|
+
"bounced_hard": 0,
|
|
918
|
+
"bounced_soft": 0,
|
|
919
|
+
"complained": 0,
|
|
920
|
+
"failed": 0
|
|
921
|
+
}
|
|
922
|
+
```
|
|
923
|
+
|
|
924
|
+
</details>
|
|
925
|
+
|
|
926
|
+
---
|
|
927
|
+
|
|
773
928
|
## Schemas
|
|
774
929
|
|
|
775
930
|
### `BaseError`
|
|
@@ -801,7 +956,7 @@ Describes the structure of a client error response, which can be one of several
|
|
|
801
956
|
type ClientError = {
|
|
802
957
|
message: string
|
|
803
958
|
} | {
|
|
804
|
-
code: "CAMPAIGN_NOT_FOUND" | "CAMPAIGN_HAS_NO_TARGET" | "CAMPAIGN_HAS_NO_DELIVERY_METHOD" | "CAMPAIGN_HAS_JOB_IN_PROGRESS" | "CAMPAIGN_HAS_UNEXPECTED_STATUS" | "JOB_TOKEN_MISSING" | "TARGET_WITHOUT_FILTERS"
|
|
959
|
+
code: "CAMPAIGN_NOT_FOUND" | "CAMPAIGN_HAS_NO_TARGET" | "CAMPAIGN_HAS_NO_DELIVERY_METHOD" | "INVALID_NEXT_BEST_ACTION" | "CAMPAIGN_HAS_JOB_IN_PROGRESS" | "CAMPAIGN_HAS_UNEXPECTED_STATUS" | "JOB_TOKEN_MISSING" | "TARGET_WITHOUT_FILTERS"
|
|
805
960
|
} | {
|
|
806
961
|
error: string
|
|
807
962
|
status: number
|
|
@@ -1021,9 +1176,8 @@ type NextBestAction = {
|
|
|
1021
1176
|
priority?: "low" | "medium" | "high"
|
|
1022
1177
|
is_dismissable?: boolean
|
|
1023
1178
|
cta: {
|
|
1024
|
-
type: "journey" | "workflow" | "
|
|
1179
|
+
type: "journey" | "workflow" | "flow"
|
|
1025
1180
|
target: string
|
|
1026
|
-
label?: string
|
|
1027
1181
|
context_params?: Array<{
|
|
1028
1182
|
key: { ... }
|
|
1029
1183
|
value: { ... }
|
|
@@ -1041,6 +1195,34 @@ type DiscoverCampaignsParams = {
|
|
|
1041
1195
|
}
|
|
1042
1196
|
```
|
|
1043
1197
|
|
|
1198
|
+
### `DiscoverResult`
|
|
1199
|
+
|
|
1200
|
+
One discovered Next Best Action, plus this entity's interaction state for it.
|
|
1201
|
+
|
|
1202
|
+
```ts
|
|
1203
|
+
type DiscoverResult = {
|
|
1204
|
+
campaign_id: string // uuid
|
|
1205
|
+
nba: {
|
|
1206
|
+
category?: string
|
|
1207
|
+
icon?: {
|
|
1208
|
+
name: { ... }
|
|
1209
|
+
color?: { ... }
|
|
1210
|
+
}
|
|
1211
|
+
title: string
|
|
1212
|
+
body?: string
|
|
1213
|
+
priority?: "low" | "medium" | "high"
|
|
1214
|
+
is_dismissable?: boolean
|
|
1215
|
+
cta: {
|
|
1216
|
+
type: { ... }
|
|
1217
|
+
target: { ... }
|
|
1218
|
+
context_params?: { ... }
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
status?: "seen" | "dismissed" | "clicked"
|
|
1222
|
+
status_updated_at?: string // date-time
|
|
1223
|
+
}
|
|
1224
|
+
```
|
|
1225
|
+
|
|
1044
1226
|
### `MatchTargetParams`
|
|
1045
1227
|
|
|
1046
1228
|
```ts
|
|
@@ -1094,15 +1276,23 @@ action is first rendered to an agent.
|
|
|
1094
1276
|
type EntityUiStatus = "seen" | "dismissed" | "clicked"
|
|
1095
1277
|
```
|
|
1096
1278
|
|
|
1097
|
-
### `
|
|
1279
|
+
### `EmailStatus`
|
|
1280
|
+
|
|
1281
|
+
Delivery status of the email a campaign's automation sends to a recipient. Set to `sent`
|
|
1282
|
+
once the automation hands the email off, then updated asynchronously as SES notifications
|
|
1283
|
+
arrive (`bounced` / `complained`; an SES Reject maps to `bounced`). `failed` is a send-time
|
|
1284
|
+
failure (the automation execu
|
|
1285
|
+
|
|
1286
|
+
```ts
|
|
1287
|
+
type EmailStatus = "sent" | "delivered" | "bounced" | "complained" | "failed"
|
|
1288
|
+
```
|
|
1289
|
+
|
|
1290
|
+
### `EmailBounceType`
|
|
1098
1291
|
|
|
1099
|
-
|
|
1100
|
-
fields (where `dismissed` is channel-local), a resolution suppresses the campaign on EVERY
|
|
1101
|
-
channel — the 360 Entity-UI card and the portal teaser alike. Server-managed and read-only:
|
|
1102
|
-
never sent by a client. Abs
|
|
1292
|
+
SES bounce classification: `permanent` (hard) or `transient` (soft).
|
|
1103
1293
|
|
|
1104
1294
|
```ts
|
|
1105
|
-
type
|
|
1295
|
+
type EmailBounceType = "permanent" | "transient"
|
|
1106
1296
|
```
|
|
1107
1297
|
|
|
1108
1298
|
### `Recipient`
|
|
@@ -1119,7 +1309,15 @@ type Recipient = {
|
|
|
1119
1309
|
portal_state?: Record<string, unknown>
|
|
1120
1310
|
entity_ui_status?: "seen" | "dismissed" | "clicked"
|
|
1121
1311
|
entity_ui_status_updated_at?: string // date-time
|
|
1122
|
-
|
|
1312
|
+
entity_ui_status_before_dismiss?: "seen" | "dismissed" | "clicked"
|
|
1313
|
+
message_entity_id?: string
|
|
1314
|
+
email_status?: "sent" | "delivered" | "bounced" | "complained" | "failed"
|
|
1315
|
+
email_status_updated_at?: string // date-time
|
|
1316
|
+
email_bounce_type?: "permanent" | "transient"
|
|
1317
|
+
email_bounce_subtype?: string
|
|
1318
|
+
email_complaint_type?: string
|
|
1319
|
+
email_bounce_reason?: string
|
|
1320
|
+
email_send_error?: Record<string, unknown>
|
|
1123
1321
|
updated_at?: string // date-time
|
|
1124
1322
|
}
|
|
1125
1323
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot/sdk",
|
|
3
|
-
"version": "2.19.
|
|
3
|
+
"version": "2.19.2",
|
|
4
4
|
"description": "JavaScript/TypeScript SDK for epilot APIs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -322,16 +322,6 @@
|
|
|
322
322
|
},
|
|
323
323
|
"./workflow-definition/openapi.json": "./definitions/workflow-definition.json"
|
|
324
324
|
},
|
|
325
|
-
"scripts": {
|
|
326
|
-
"generate": "tsx ../../scripts/generate-sdk-v2.ts && pnpm lint:fix",
|
|
327
|
-
"build": "tsup",
|
|
328
|
-
"build:watch": "tsup --watch",
|
|
329
|
-
"test": "vitest run",
|
|
330
|
-
"test:watch": "vitest",
|
|
331
|
-
"lint": "biome check src",
|
|
332
|
-
"lint:fix": "biome check src --fix",
|
|
333
|
-
"prepublishOnly": "npm run build"
|
|
334
|
-
},
|
|
335
325
|
"keywords": [
|
|
336
326
|
"epilot",
|
|
337
327
|
"sdk",
|
|
@@ -525,5 +515,14 @@
|
|
|
525
515
|
"./dist/apis/workflow-definition.d.ts"
|
|
526
516
|
]
|
|
527
517
|
}
|
|
518
|
+
},
|
|
519
|
+
"scripts": {
|
|
520
|
+
"generate": "tsx ../../scripts/generate-sdk-v2.ts && pnpm lint:fix",
|
|
521
|
+
"build": "tsup",
|
|
522
|
+
"build:watch": "tsup --watch",
|
|
523
|
+
"test": "vitest run",
|
|
524
|
+
"test:watch": "vitest",
|
|
525
|
+
"lint": "biome check src",
|
|
526
|
+
"lint:fix": "biome check src --fix"
|
|
528
527
|
}
|
|
529
|
-
}
|
|
528
|
+
}
|