outbound-sdk 0.4.0 → 0.6.0

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.
Files changed (104) hide show
  1. package/README.md +2 -2
  2. package/dist/alerts/check-evaluate.d.ts +53 -0
  3. package/dist/alerts/check-measure.d.ts +100 -0
  4. package/dist/alerts/check-schema.d.ts +184 -0
  5. package/dist/alerts/check-validate.d.ts +18 -0
  6. package/dist/alerts/index.d.ts +7 -0
  7. package/dist/alerts/index.js +635 -2
  8. package/dist/budget/index.d.ts +2 -0
  9. package/dist/budget/index.js +1 -0
  10. package/dist/cards/format.d.ts +1 -1
  11. package/dist/cards/index.js +49 -19
  12. package/dist/cards/parts.d.ts +1 -6
  13. package/dist/chunks/{chunk-7LNJJ2RO.js → chunk-3JOC5DGD.js} +127 -17
  14. package/dist/chunks/chunk-53DCVFUB.js +55 -0
  15. package/dist/chunks/{chunk-E6DSDCPI.js → chunk-BK5SLY32.js} +92 -101
  16. package/dist/chunks/chunk-HPNGSG5E.js +51 -0
  17. package/dist/chunks/chunk-HWHI4LFY.js +102 -0
  18. package/dist/chunks/chunk-MGR6HREO.js +91 -0
  19. package/dist/chunks/{chunk-Y5RAJ6PZ.js → chunk-OLPMBRXM.js} +3 -2
  20. package/dist/chunks/{chunk-IZFTTMJP.js → chunk-PHNQ3WC2.js} +5 -5
  21. package/dist/chunks/chunk-SXGCKCAR.js +678 -0
  22. package/dist/chunks/chunk-TFICTGM2.js +18 -0
  23. package/dist/chunks/{chunk-ZFVHM5JI.js → chunk-UWUPUMM2.js} +11 -4
  24. package/dist/chunks/{chunk-A6WVOCA4.js → chunk-W22SDX6S.js} +4 -4
  25. package/dist/chunks/{chunk-7ZDS6SZD.js → chunk-WH6V3YNN.js} +25 -0
  26. package/dist/chunks/chunk-XL6LJVHJ.js +71 -0
  27. package/dist/chunks/{chunk-5FVKRIEJ.js → chunk-YYCT3NGV.js} +35 -11
  28. package/dist/cli/bin.js +13 -28
  29. package/dist/cli/index.d.ts +3 -0
  30. package/dist/cli/index.js +12 -11
  31. package/dist/cli/output.d.ts +9 -0
  32. package/dist/cli/update.d.ts +15 -0
  33. package/dist/emailbison/account.d.ts +7 -0
  34. package/dist/emailbison/adapter.d.ts +5 -0
  35. package/dist/emailbison/capabilities.d.ts +78 -0
  36. package/dist/emailbison/client.d.ts +29 -0
  37. package/dist/emailbison/index.d.ts +30 -0
  38. package/dist/emailbison/index.js +1018 -0
  39. package/dist/emailbison/mail.d.ts +5 -0
  40. package/dist/emailbison/map-mail.d.ts +13 -0
  41. package/dist/emailbison/map-sequence.d.ts +12 -0
  42. package/dist/emailbison/map-stats.d.ts +47 -0
  43. package/dist/emailbison/map.d.ts +24 -0
  44. package/dist/emailbison/native-params.d.ts +5 -0
  45. package/dist/emailbison/native-workspace.d.ts +167 -0
  46. package/dist/emailbison/native.d.ts +327 -0
  47. package/dist/emailbison/stats.d.ts +4 -0
  48. package/dist/emailbison/webhooks.d.ts +2 -0
  49. package/dist/fixtures/index.js +6 -6
  50. package/dist/heyreach/capabilities.d.ts +3 -0
  51. package/dist/heyreach/index.js +22 -20
  52. package/dist/index.js +19 -18
  53. package/dist/insights/copy/copy-preview.d.ts +58 -0
  54. package/dist/insights/copy/copy-reuse.d.ts +0 -13
  55. package/dist/insights/copy/index.d.ts +9 -0
  56. package/dist/insights/copy/reuse-base.d.ts +0 -2
  57. package/dist/insights/copy/shared.d.ts +3 -8
  58. package/dist/insights/copy/step-funnel.d.ts +1 -12
  59. package/dist/insights/copy/variant-test.d.ts +0 -5
  60. package/dist/insights/cost.d.ts +91 -0
  61. package/dist/insights/define.d.ts +22 -1
  62. package/dist/insights/index.d.ts +4 -3
  63. package/dist/insights/index.js +810 -415
  64. package/dist/insights/inputs.generated.d.ts +21 -24
  65. package/dist/insights/ops/campaign-diagnosis.d.ts +0 -2
  66. package/dist/insights/ops/campaign-ranking.d.ts +3 -3
  67. package/dist/insights/ops/client-report.d.ts +0 -2
  68. package/dist/insights/ops/index.d.ts +2 -6
  69. package/dist/insights/ops/shared.d.ts +10 -2
  70. package/dist/insights/plugin.d.ts +19 -0
  71. package/dist/insights/registry.d.ts +10 -10
  72. package/dist/insights/run-cap.d.ts +35 -0
  73. package/dist/insights/senders/bounce-watch.d.ts +0 -11
  74. package/dist/insights/senders/domain-health.d.ts +0 -7
  75. package/dist/insights/senders/index.d.ts +0 -4
  76. package/dist/insights/senders/sender-load.d.ts +0 -2
  77. package/dist/insights/tools.d.ts +10 -0
  78. package/dist/insights/types.d.ts +1 -1
  79. package/dist/insights/variables.d.ts +33 -0
  80. package/dist/instantly/capabilities.d.ts +13 -0
  81. package/dist/instantly/index.js +43 -28
  82. package/dist/internal/adapter.d.ts +12 -0
  83. package/dist/internal/outbound/outbound.d.ts +5 -1
  84. package/dist/internal/request-cap.d.ts +35 -0
  85. package/dist/loader/index.js +2 -2
  86. package/dist/memory/index.js +10 -10
  87. package/dist/providers/index.d.ts +21 -1
  88. package/dist/providers/index.js +1 -1
  89. package/dist/redact/index.js +4 -4
  90. package/dist/smartlead/capabilities.d.ts +5 -0
  91. package/dist/smartlead/index.js +26 -24
  92. package/dist/tools/ai-sdk.js +5 -3
  93. package/dist/tools/claude-agent.js +5 -3
  94. package/dist/tools/index.d.ts +2 -2
  95. package/dist/tools/index.js +11 -6
  96. package/dist/tools/registry.d.ts +20 -1
  97. package/dist/tools/shared.d.ts +20 -1
  98. package/dist/webhooks/index.js +17 -7
  99. package/package.json +8 -2
  100. package/dist/chunks/chunk-5CFO3CXG.js +0 -176
  101. package/dist/chunks/chunk-K4USHN4C.js +0 -40
  102. package/dist/chunks/chunk-LVQUSKEX.js +0 -17
  103. package/dist/internal/renamed.d.ts +0 -28
  104. package/dist/chunks/{chunk-C4LS2HNV.js → chunk-JWGSB7PT.js} +3 -3
@@ -0,0 +1,5 @@
1
+ import type { AdapterContext, MessageQuery, Page, ReplyQuery } from "../internal/adapter.ts";
2
+ import type { Message, Reply } from "../internal/entities.ts";
3
+ import type { EmailBisonClient } from "./client.ts";
4
+ export declare const listMessages: (client: EmailBisonClient, ctx: AdapterContext, query: MessageQuery) => Promise<Page<Message>>;
5
+ export declare const listReplies: (client: EmailBisonClient, ctx: AdapterContext, query: ReplyQuery) => Promise<Page<Reply>>;
@@ -0,0 +1,13 @@
1
+ import type { Message, Reply } from "../internal/entities.ts";
2
+ import type { JsonObject } from "../internal/json.ts";
3
+ import type { Identity } from "../internal/record.ts";
4
+ export declare const SENT_PREFIX = "scheduled-";
5
+ /** A sent campaign email. */
6
+ export declare const toSentMessage: (identity: Identity, raw: JsonObject, includeBody: boolean) => Message;
7
+ /** `true` for a message the workspace sent: the inbox's Sent folder. */
8
+ export declare const isOutgoing: (raw: JsonObject) => boolean;
9
+ /** One message of the master inbox, in or out. */
10
+ export declare const toInboxMessage: (identity: Identity, raw: JsonObject, includeBody: boolean) => Message;
11
+ export declare const toReply: (identity: Identity, raw: JsonObject, includeBody: boolean) => Reply;
12
+ /** The sender a reply came from, lowercased, for event data. */
13
+ export declare const fromAddress: (raw: JsonObject) => string | null;
@@ -0,0 +1,12 @@
1
+ import type { Sequence } from "../internal/entities.ts";
2
+ import type { Json, JsonObject } from "../internal/json.ts";
3
+ import type { Identity } from "../internal/record.ts";
4
+ /** The step list of a sequence answer: `data.sequence_steps`. */
5
+ export declare const stepRows: (body: Json | undefined) => JsonObject[];
6
+ export declare const toSequence: (identity: Identity, campaignId: string, body: Json) => Sequence;
7
+ export interface StepPlace {
8
+ readonly stepIndex: number;
9
+ readonly variantKey: string;
10
+ }
11
+ /** Where each step id sits in the sequence: its step and its variant. */
12
+ export declare const stepPlaces: (body: Json | undefined) => Map<string, StepPlace>;
@@ -0,0 +1,47 @@
1
+ import type { MetricRow } from "../internal/entities.ts";
2
+ import type { Json, JsonObject } from "../internal/json.ts";
3
+ import type { MetricCounts, RowScope } from "../internal/metrics.ts";
4
+ import type { StepPlace } from "./map-sequence.ts";
5
+ /** The totals of `GET /api/workspaces/v1.1/stats` and `POST /api/campaigns/{id}/stats`. */
6
+ export declare const summaryCounts: (summary: Json | undefined) => MetricCounts;
7
+ /** A sender's lifetime counts, from its own record. */
8
+ export declare const senderCounts: (sender: JsonObject) => MetricCounts;
9
+ /**
10
+ * One row per day of a line-area answer: `[{ label, dates: [[day, n]] }]`.
11
+ * A series it leaves out is `null` on every day.
12
+ */
13
+ export declare const dailyRows: (scope: RowScope, body: Json) => MetricRow[];
14
+ /** The daily rows of a range added up, as one derived total. */
15
+ export declare const summedRow: (scope: RowScope, rows: readonly MetricRow[]) => {
16
+ bounced: number | null;
17
+ clicked: number | null;
18
+ clickedTotal: number | null;
19
+ connectionsAccepted: number | null;
20
+ connectionsSent: number | null;
21
+ contacted: number | null;
22
+ contentHash: string | null;
23
+ date: string | null;
24
+ delivered: number | null;
25
+ evidence: "derived" | "exact" | "sampled";
26
+ inmailsSent: number | null;
27
+ opened: number | null;
28
+ openedTotal: number | null;
29
+ positive: number | null;
30
+ provider: string;
31
+ replied: number | null;
32
+ repliedAuto: number | null;
33
+ schemaVersion: 1;
34
+ scope: "campaign" | "sender" | "step" | "workspace";
35
+ scopeRef: string;
36
+ sent: number | null;
37
+ stepIndex: number | null;
38
+ timezone: string | null;
39
+ unsubscribed: number | null;
40
+ variantKey: string | null;
41
+ workspaceId: string;
42
+ };
43
+ /**
44
+ * A row per step of `sequence_step_stats`. `places` says where each step id
45
+ * sits; a step it does not know is left out, because its place is unknown.
46
+ */
47
+ export declare const stepRows: (scope: RowScope, summary: Json | undefined, places: ReadonlyMap<string, StepPlace>) => MetricRow[];
@@ -0,0 +1,24 @@
1
+ import type { BlockEntry, CampaignSettings, LeadList, SendingWindow, Tag, WebhookSubscription } from "../internal/entities-account.ts";
2
+ import type { Campaign, Lead, Sender, SenderStatus, Workspace } from "../internal/entities.ts";
3
+ import type { Json, JsonObject } from "../internal/json.ts";
4
+ import type { Identity } from "../internal/record.ts";
5
+ /** The names of the `tags` a campaign, sender or lead carries. */
6
+ export declare const tagNames: (value: Json | undefined) => string[];
7
+ export declare const toCampaign: (identity: Identity, raw: JsonObject) => Campaign;
8
+ /** The one window of `GET /api/campaigns/{id}/schedule`. */
9
+ export declare const toWindow: (schedule: JsonObject) => SendingWindow;
10
+ export declare const toSettings: (identity: Identity, campaign: JsonObject, schedule: JsonObject | null) => CampaignSettings;
11
+ export declare const senderStatus: (raw: JsonObject) => SenderStatus;
12
+ export declare const toSender: (identity: Identity, raw: JsonObject) => Sender;
13
+ /**
14
+ * A lead. `campaignId` is the campaign it was read through, whose
15
+ * `lead_campaign_data` says where it is in that campaign.
16
+ */
17
+ export declare const toLead: (identity: Identity, raw: JsonObject, campaignId?: string | null) => Lead;
18
+ export declare const toLeadList: (identity: Identity, raw: JsonObject) => LeadList;
19
+ /** A block list entry. `kind` is the list it came from. */
20
+ export declare const toBlockEntry: (identity: Identity, raw: JsonObject, kind: "domain" | "email") => BlockEntry[];
21
+ export declare const toTag: (identity: Identity, raw: JsonObject) => Tag[];
22
+ export declare const EVENT_TYPES: Map<string, "unknown" | "campaign.status_changed" | "lead.status_changed" | "lead.unsubscribed" | "linkedin.connection_accepted" | "linkedin.connection_sent" | "linkedin.message_received" | "linkedin.message_sent" | "meeting.booked" | "message.bounced" | "message.clicked" | "message.opened" | "message.sent" | "reply.categorized" | "reply.received" | "sender.status_changed">;
23
+ export declare const toWebhook: (identity: Identity, raw: JsonObject) => WebhookSubscription;
24
+ export declare const toWorkspace: (identity: Identity, raw: JsonObject) => Workspace;
@@ -0,0 +1,5 @@
1
+ /** The reference's anchor for one read. */
2
+ export declare const docs: (tag: string, method: "get" | "post", path: string) => string;
3
+ export declare const page: {
4
+ readonly page: import("../internal/native.ts").PlacedParam<"query", "number">;
5
+ };
@@ -0,0 +1,167 @@
1
+ export declare const WORKSPACE_NATIVE: {
2
+ readonly account: {
3
+ readonly description: "The user the key belongs to and the workspace it is scoped to.";
4
+ readonly docs: string;
5
+ readonly method: "GET";
6
+ readonly path: "/api/users";
7
+ };
8
+ readonly blacklistedDomain: {
9
+ readonly description: "One blocked domain, by its id.";
10
+ readonly docs: string;
11
+ readonly method: "GET";
12
+ readonly params: {
13
+ readonly blacklisted_domain_id: import("../internal/native.ts").PlacedParam<"path", "string">;
14
+ };
15
+ readonly path: "/api/blacklisted-domains/{blacklisted_domain_id}";
16
+ };
17
+ readonly blacklistedEmail: {
18
+ readonly description: "One blocked address, by its id.";
19
+ readonly docs: string;
20
+ readonly method: "GET";
21
+ readonly params: {
22
+ readonly blacklisted_email_id: import("../internal/native.ts").PlacedParam<"path", "string">;
23
+ };
24
+ readonly path: "/api/blacklisted-emails/{blacklisted_email_id}";
25
+ };
26
+ readonly customVariables: {
27
+ readonly description: "The custom lead variables the workspace has defined.";
28
+ readonly docs: string;
29
+ readonly method: "GET";
30
+ readonly path: "/api/custom-variables";
31
+ };
32
+ readonly event: {
33
+ readonly description: "One workspace event with its payload and webhook deliveries. Deliveries name the webhook URL, which can hold a secret.";
34
+ readonly docs: string;
35
+ readonly method: "GET";
36
+ readonly params: {
37
+ readonly id: import("../internal/native.ts").PlacedParam<"path", "string">;
38
+ };
39
+ readonly path: "/api/events/{id}";
40
+ readonly sensitive: true;
41
+ };
42
+ readonly events: {
43
+ readonly description: "The workspace's events of the last 10 days, each with its webhook payload and deliveries. Pages by cursor only.";
44
+ readonly docs: string;
45
+ readonly method: "GET";
46
+ readonly params: {
47
+ readonly cursor: import("../internal/native.ts").PlacedParam<"query", "string">;
48
+ readonly end_date: import("../internal/native.ts").PlacedParam<"query", "string">;
49
+ readonly start_date: import("../internal/native.ts").PlacedParam<"query", "string">;
50
+ readonly type: import("../internal/native.ts").PlacedParam<"query", "string">;
51
+ };
52
+ readonly path: "/api/events";
53
+ readonly sensitive: true;
54
+ };
55
+ readonly ignorePhrase: {
56
+ readonly description: "One phrase that keeps matching emails out of the inbox.";
57
+ readonly docs: string;
58
+ readonly method: "GET";
59
+ readonly params: {
60
+ readonly ignore_phrase_id: import("../internal/native.ts").PlacedParam<"path", "string">;
61
+ };
62
+ readonly path: "/api/ignore-phrases/{ignore_phrase_id}";
63
+ };
64
+ readonly ignorePhrases: {
65
+ readonly description: "The phrases that keep matching emails, such as other tools' warmup mail, out of the inbox.";
66
+ readonly docs: string;
67
+ readonly method: "GET";
68
+ readonly path: "/api/ignore-phrases";
69
+ };
70
+ readonly masterInboxSettings: {
71
+ readonly description: "Whether the inbox syncs every email, filters warmup mail and marks interested replies automatically.";
72
+ readonly docs: string;
73
+ readonly method: "GET";
74
+ readonly path: "/api/workspaces/v1.1/master-inbox-settings";
75
+ };
76
+ readonly oauthSession: {
77
+ readonly description: "The state of a Google or Microsoft sign-in session for connecting a sender. Holds the sign-in link.";
78
+ readonly docs: string;
79
+ readonly method: "GET";
80
+ readonly params: {
81
+ readonly id: import("../internal/native.ts").PlacedParam<"path", "string">;
82
+ };
83
+ readonly path: "/api/oauth-sessions/{id}";
84
+ readonly sensitive: true;
85
+ };
86
+ readonly replyTemplate: {
87
+ readonly description: "One saved reply template.";
88
+ readonly docs: string;
89
+ readonly method: "GET";
90
+ readonly params: {
91
+ readonly id: import("../internal/native.ts").PlacedParam<"path", "string">;
92
+ };
93
+ readonly path: "/api/reply-templates/{id}";
94
+ };
95
+ readonly replyTemplates: {
96
+ readonly description: "The workspace's saved reply templates.";
97
+ readonly docs: string;
98
+ readonly method: "GET";
99
+ readonly params: {
100
+ readonly search: import("../internal/native.ts").PlacedParam<"query", "string">;
101
+ readonly page: import("../internal/native.ts").PlacedParam<"query", "number">;
102
+ };
103
+ readonly path: "/api/reply-templates";
104
+ };
105
+ readonly tag: {
106
+ readonly description: "One tag, by its id.";
107
+ readonly docs: string;
108
+ readonly method: "GET";
109
+ readonly params: {
110
+ readonly id: import("../internal/native.ts").PlacedParam<"path", "string">;
111
+ };
112
+ readonly path: "/api/tags/{id}";
113
+ };
114
+ readonly trackingDomain: {
115
+ readonly description: "One custom tracking domain and its state.";
116
+ readonly docs: string;
117
+ readonly method: "GET";
118
+ readonly params: {
119
+ readonly id: import("../internal/native.ts").PlacedParam<"path", "string">;
120
+ };
121
+ readonly path: "/api/custom-tracking-domain/{id}";
122
+ };
123
+ readonly trackingDomains: {
124
+ readonly description: "The custom tracking domains for opens and clicks, and their state.";
125
+ readonly docs: string;
126
+ readonly method: "GET";
127
+ readonly params: {
128
+ readonly page: import("../internal/native.ts").PlacedParam<"query", "number">;
129
+ };
130
+ readonly path: "/api/custom-tracking-domain";
131
+ };
132
+ readonly webhookAttempt: {
133
+ readonly description: "One attempt to deliver a webhook: the URL, the response code and the event. The URL can hold a secret.";
134
+ readonly docs: string;
135
+ readonly method: "GET";
136
+ readonly params: {
137
+ readonly id: import("../internal/native.ts").PlacedParam<"path", "string">;
138
+ };
139
+ readonly path: "/api/webhook-attempts/{id}";
140
+ readonly sensitive: true;
141
+ };
142
+ readonly webhookDelivery: {
143
+ readonly description: "One webhook delivery and its attempts. The URL can hold a secret.";
144
+ readonly docs: string;
145
+ readonly method: "GET";
146
+ readonly params: {
147
+ readonly id: import("../internal/native.ts").PlacedParam<"path", "string">;
148
+ };
149
+ readonly path: "/api/webhook-deliveries/{id}";
150
+ readonly sensitive: true;
151
+ };
152
+ readonly webhookEventTypes: {
153
+ readonly description: "The webhook event types, with the id each is subscribed by.";
154
+ readonly docs: string;
155
+ readonly method: "GET";
156
+ readonly path: "/api/webhook-events/event-types";
157
+ };
158
+ readonly webhookSamplePayload: {
159
+ readonly description: "A sample webhook payload for one event type.";
160
+ readonly docs: string;
161
+ readonly method: "GET";
162
+ readonly params: {
163
+ readonly event_type: import("../internal/native.ts").NeededParam<"query", "string">;
164
+ };
165
+ readonly path: "/api/webhook-events/sample-payload";
166
+ };
167
+ };
@@ -0,0 +1,327 @@
1
+ export declare const NATIVE: {
2
+ readonly account: {
3
+ readonly description: "The user the key belongs to and the workspace it is scoped to.";
4
+ readonly docs: string;
5
+ readonly method: "GET";
6
+ readonly path: "/api/users";
7
+ };
8
+ readonly blacklistedDomain: {
9
+ readonly description: "One blocked domain, by its id.";
10
+ readonly docs: string;
11
+ readonly method: "GET";
12
+ readonly params: {
13
+ readonly blacklisted_domain_id: import("../internal/native.ts").PlacedParam<"path", "string">;
14
+ };
15
+ readonly path: "/api/blacklisted-domains/{blacklisted_domain_id}";
16
+ };
17
+ readonly blacklistedEmail: {
18
+ readonly description: "One blocked address, by its id.";
19
+ readonly docs: string;
20
+ readonly method: "GET";
21
+ readonly params: {
22
+ readonly blacklisted_email_id: import("../internal/native.ts").PlacedParam<"path", "string">;
23
+ };
24
+ readonly path: "/api/blacklisted-emails/{blacklisted_email_id}";
25
+ };
26
+ readonly customVariables: {
27
+ readonly description: "The custom lead variables the workspace has defined.";
28
+ readonly docs: string;
29
+ readonly method: "GET";
30
+ readonly path: "/api/custom-variables";
31
+ };
32
+ readonly event: {
33
+ readonly description: "One workspace event with its payload and webhook deliveries. Deliveries name the webhook URL, which can hold a secret.";
34
+ readonly docs: string;
35
+ readonly method: "GET";
36
+ readonly params: {
37
+ readonly id: import("../internal/native.ts").PlacedParam<"path", "string">;
38
+ };
39
+ readonly path: "/api/events/{id}";
40
+ readonly sensitive: true;
41
+ };
42
+ readonly events: {
43
+ readonly description: "The workspace's events of the last 10 days, each with its webhook payload and deliveries. Pages by cursor only.";
44
+ readonly docs: string;
45
+ readonly method: "GET";
46
+ readonly params: {
47
+ readonly cursor: import("../internal/native.ts").PlacedParam<"query", "string">;
48
+ readonly end_date: import("../internal/native.ts").PlacedParam<"query", "string">;
49
+ readonly start_date: import("../internal/native.ts").PlacedParam<"query", "string">;
50
+ readonly type: import("../internal/native.ts").PlacedParam<"query", "string">;
51
+ };
52
+ readonly path: "/api/events";
53
+ readonly sensitive: true;
54
+ };
55
+ readonly ignorePhrase: {
56
+ readonly description: "One phrase that keeps matching emails out of the inbox.";
57
+ readonly docs: string;
58
+ readonly method: "GET";
59
+ readonly params: {
60
+ readonly ignore_phrase_id: import("../internal/native.ts").PlacedParam<"path", "string">;
61
+ };
62
+ readonly path: "/api/ignore-phrases/{ignore_phrase_id}";
63
+ };
64
+ readonly ignorePhrases: {
65
+ readonly description: "The phrases that keep matching emails, such as other tools' warmup mail, out of the inbox.";
66
+ readonly docs: string;
67
+ readonly method: "GET";
68
+ readonly path: "/api/ignore-phrases";
69
+ };
70
+ readonly masterInboxSettings: {
71
+ readonly description: "Whether the inbox syncs every email, filters warmup mail and marks interested replies automatically.";
72
+ readonly docs: string;
73
+ readonly method: "GET";
74
+ readonly path: "/api/workspaces/v1.1/master-inbox-settings";
75
+ };
76
+ readonly oauthSession: {
77
+ readonly description: "The state of a Google or Microsoft sign-in session for connecting a sender. Holds the sign-in link.";
78
+ readonly docs: string;
79
+ readonly method: "GET";
80
+ readonly params: {
81
+ readonly id: import("../internal/native.ts").PlacedParam<"path", "string">;
82
+ };
83
+ readonly path: "/api/oauth-sessions/{id}";
84
+ readonly sensitive: true;
85
+ };
86
+ readonly replyTemplate: {
87
+ readonly description: "One saved reply template.";
88
+ readonly docs: string;
89
+ readonly method: "GET";
90
+ readonly params: {
91
+ readonly id: import("../internal/native.ts").PlacedParam<"path", "string">;
92
+ };
93
+ readonly path: "/api/reply-templates/{id}";
94
+ };
95
+ readonly replyTemplates: {
96
+ readonly description: "The workspace's saved reply templates.";
97
+ readonly docs: string;
98
+ readonly method: "GET";
99
+ readonly params: {
100
+ readonly search: import("../internal/native.ts").PlacedParam<"query", "string">;
101
+ readonly page: import("../internal/native.ts").PlacedParam<"query", "number">;
102
+ };
103
+ readonly path: "/api/reply-templates";
104
+ };
105
+ readonly tag: {
106
+ readonly description: "One tag, by its id.";
107
+ readonly docs: string;
108
+ readonly method: "GET";
109
+ readonly params: {
110
+ readonly id: import("../internal/native.ts").PlacedParam<"path", "string">;
111
+ };
112
+ readonly path: "/api/tags/{id}";
113
+ };
114
+ readonly trackingDomain: {
115
+ readonly description: "One custom tracking domain and its state.";
116
+ readonly docs: string;
117
+ readonly method: "GET";
118
+ readonly params: {
119
+ readonly id: import("../internal/native.ts").PlacedParam<"path", "string">;
120
+ };
121
+ readonly path: "/api/custom-tracking-domain/{id}";
122
+ };
123
+ readonly trackingDomains: {
124
+ readonly description: "The custom tracking domains for opens and clicks, and their state.";
125
+ readonly docs: string;
126
+ readonly method: "GET";
127
+ readonly params: {
128
+ readonly page: import("../internal/native.ts").PlacedParam<"query", "number">;
129
+ };
130
+ readonly path: "/api/custom-tracking-domain";
131
+ };
132
+ readonly webhookAttempt: {
133
+ readonly description: "One attempt to deliver a webhook: the URL, the response code and the event. The URL can hold a secret.";
134
+ readonly docs: string;
135
+ readonly method: "GET";
136
+ readonly params: {
137
+ readonly id: import("../internal/native.ts").PlacedParam<"path", "string">;
138
+ };
139
+ readonly path: "/api/webhook-attempts/{id}";
140
+ readonly sensitive: true;
141
+ };
142
+ readonly webhookDelivery: {
143
+ readonly description: "One webhook delivery and its attempts. The URL can hold a secret.";
144
+ readonly docs: string;
145
+ readonly method: "GET";
146
+ readonly params: {
147
+ readonly id: import("../internal/native.ts").PlacedParam<"path", "string">;
148
+ };
149
+ readonly path: "/api/webhook-deliveries/{id}";
150
+ readonly sensitive: true;
151
+ };
152
+ readonly webhookEventTypes: {
153
+ readonly description: "The webhook event types, with the id each is subscribed by.";
154
+ readonly docs: string;
155
+ readonly method: "GET";
156
+ readonly path: "/api/webhook-events/event-types";
157
+ };
158
+ readonly webhookSamplePayload: {
159
+ readonly description: "A sample webhook payload for one event type.";
160
+ readonly docs: string;
161
+ readonly method: "GET";
162
+ readonly params: {
163
+ readonly event_type: import("../internal/native.ts").NeededParam<"query", "string">;
164
+ };
165
+ readonly path: "/api/webhook-events/sample-payload";
166
+ };
167
+ readonly campaignEventStats: {
168
+ readonly description: "Daily counts of sends, opens, replies, bounces, unsubscribes and interested leads, for chosen campaigns and senders.";
169
+ readonly docs: string;
170
+ readonly method: "GET";
171
+ readonly params: {
172
+ readonly "campaign_ids[]": import("../internal/native.ts").PlacedParam<"query", "list">;
173
+ readonly "sender_email_ids[]": import("../internal/native.ts").PlacedParam<"query", "list">;
174
+ readonly end_date: import("../internal/native.ts").NeededParam<"query", "string">;
175
+ readonly start_date: import("../internal/native.ts").NeededParam<"query", "string">;
176
+ };
177
+ readonly path: "/api/campaign-events/stats";
178
+ };
179
+ readonly leadScheduledEmails: {
180
+ readonly description: "A lead's campaign emails in every state: scheduled, paused, stopped, bounced, unsubscribed or replied.";
181
+ readonly docs: string;
182
+ readonly method: "GET";
183
+ readonly params: {
184
+ readonly lead_id: import("../internal/native.ts").PlacedParam<"path", "string">;
185
+ };
186
+ readonly path: "/api/leads/{lead_id}/scheduled-emails";
187
+ };
188
+ readonly reply: {
189
+ readonly description: "One master inbox message with its lead, bodies, recipients and attachments.";
190
+ readonly docs: string;
191
+ readonly method: "GET";
192
+ readonly params: {
193
+ readonly id: import("../internal/native.ts").PlacedParam<"path", "string">;
194
+ };
195
+ readonly path: "/api/replies/{id}";
196
+ };
197
+ readonly scheduledEmail: {
198
+ readonly description: "One campaign email: its state, times, counts, and the campaign, lead and sender it belongs to.";
199
+ readonly docs: string;
200
+ readonly method: "GET";
201
+ readonly params: {
202
+ readonly id: import("../internal/native.ts").PlacedParam<"path", "string">;
203
+ };
204
+ readonly path: "/api/scheduled-emails/{id}";
205
+ };
206
+ readonly scheduledEmails: {
207
+ readonly description: "Campaign emails across the workspace in any state, filtered by campaign, lead, sender and scheduled day.";
208
+ readonly docs: string;
209
+ readonly method: "GET";
210
+ readonly params: {
211
+ readonly "campaign_ids[]": import("../internal/native.ts").PlacedParam<"query", "list">;
212
+ readonly "lead_ids[]": import("../internal/native.ts").PlacedParam<"query", "list">;
213
+ readonly "scheduled_date_local[criteria]": import("../internal/native.ts").PlacedParam<"query", "string">;
214
+ readonly "scheduled_date_local[value]": import("../internal/native.ts").PlacedParam<"query", "string">;
215
+ readonly "sender_email_ids[]": import("../internal/native.ts").PlacedParam<"query", "list">;
216
+ readonly status: import("../internal/native.ts").PlacedParam<"query", "string">;
217
+ readonly page: import("../internal/native.ts").PlacedParam<"query", "number">;
218
+ readonly cursor: import("../internal/native.ts").PlacedParam<"query", "string">;
219
+ readonly pagination_type: import("../internal/native.ts").PlacedParam<"query", "string">;
220
+ };
221
+ readonly path: "/api/scheduled-emails";
222
+ };
223
+ readonly senderReplies: {
224
+ readonly description: "One sender's master inbox messages, with the same filters as the inbox.";
225
+ readonly docs: string;
226
+ readonly method: "GET";
227
+ readonly params: {
228
+ readonly campaign_id: import("../internal/native.ts").PlacedParam<"query", "number">;
229
+ readonly folder: import("../internal/native.ts").PlacedParam<"query", "string">;
230
+ readonly lead_id: import("../internal/native.ts").PlacedParam<"query", "number">;
231
+ readonly read: import("../internal/native.ts").PlacedParam<"query", "boolean">;
232
+ readonly search: import("../internal/native.ts").PlacedParam<"query", "string">;
233
+ readonly status: import("../internal/native.ts").PlacedParam<"query", "string">;
234
+ readonly "tag_ids[]": import("../internal/native.ts").PlacedParam<"query", "list">;
235
+ readonly page: import("../internal/native.ts").PlacedParam<"query", "number">;
236
+ readonly cursor: import("../internal/native.ts").PlacedParam<"query", "string">;
237
+ readonly pagination_type: import("../internal/native.ts").PlacedParam<"query", "string">;
238
+ readonly senderEmailId: import("../internal/native.ts").PlacedParam<"path", "string">;
239
+ };
240
+ readonly path: "/api/sender-emails/{senderEmailId}/replies";
241
+ };
242
+ readonly warmupSenders: {
243
+ readonly description: "Every sender with its warmup counts and score between two days, filtered by tag, warmup state and MX records.";
244
+ readonly docs: string;
245
+ readonly method: "GET";
246
+ readonly params: {
247
+ readonly "excluded_tag_ids[]": import("../internal/native.ts").PlacedParam<"query", "list">;
248
+ readonly mx_records_status: import("../internal/native.ts").PlacedParam<"query", "string">;
249
+ readonly search: import("../internal/native.ts").PlacedParam<"query", "string">;
250
+ readonly "tag_ids[]": import("../internal/native.ts").PlacedParam<"query", "list">;
251
+ readonly warmup_status: import("../internal/native.ts").PlacedParam<"query", "string">;
252
+ readonly without_tags: import("../internal/native.ts").PlacedParam<"query", "boolean">;
253
+ readonly end_date: import("../internal/native.ts").NeededParam<"query", "string">;
254
+ readonly start_date: import("../internal/native.ts").NeededParam<"query", "string">;
255
+ readonly page: import("../internal/native.ts").PlacedParam<"query", "number">;
256
+ readonly cursor: import("../internal/native.ts").PlacedParam<"query", "string">;
257
+ readonly pagination_type: import("../internal/native.ts").PlacedParam<"query", "string">;
258
+ };
259
+ readonly path: "/api/warmup/sender-emails";
260
+ };
261
+ readonly campaignReplies: {
262
+ readonly description: "A campaign's master inbox messages, filtered by folder, status, read state, sender, lead or lead tag.";
263
+ readonly docs: string;
264
+ readonly method: "GET";
265
+ readonly params: {
266
+ readonly sender_email_id: import("../internal/native.ts").PlacedParam<"query", "number">;
267
+ readonly folder: import("../internal/native.ts").PlacedParam<"query", "string">;
268
+ readonly lead_id: import("../internal/native.ts").PlacedParam<"query", "number">;
269
+ readonly read: import("../internal/native.ts").PlacedParam<"query", "boolean">;
270
+ readonly search: import("../internal/native.ts").PlacedParam<"query", "string">;
271
+ readonly status: import("../internal/native.ts").PlacedParam<"query", "string">;
272
+ readonly "tag_ids[]": import("../internal/native.ts").PlacedParam<"query", "list">;
273
+ readonly page: import("../internal/native.ts").PlacedParam<"query", "number">;
274
+ readonly cursor: import("../internal/native.ts").PlacedParam<"query", "string">;
275
+ readonly pagination_type: import("../internal/native.ts").PlacedParam<"query", "string">;
276
+ readonly campaign_id: import("../internal/native.ts").PlacedParam<"path", "string">;
277
+ };
278
+ readonly path: "/api/campaigns/{campaign_id}/replies";
279
+ };
280
+ readonly campaignScheduledEmails: {
281
+ readonly description: "A campaign's emails in every state (scheduled, sent, failed, paused, stopped, bounced, unsubscribed), each with its lead and sender.";
282
+ readonly docs: string;
283
+ readonly method: "GET";
284
+ readonly params: {
285
+ readonly scheduled_date: import("../internal/native.ts").PlacedParam<"query", "string">;
286
+ readonly scheduled_date_local: import("../internal/native.ts").PlacedParam<"query", "string">;
287
+ readonly status: import("../internal/native.ts").PlacedParam<"query", "string">;
288
+ readonly page: import("../internal/native.ts").PlacedParam<"query", "number">;
289
+ readonly cursor: import("../internal/native.ts").PlacedParam<"query", "string">;
290
+ readonly pagination_type: import("../internal/native.ts").PlacedParam<"query", "string">;
291
+ readonly campaign_id: import("../internal/native.ts").PlacedParam<"path", "string">;
292
+ };
293
+ readonly path: "/api/campaigns/{campaign_id}/scheduled-emails";
294
+ };
295
+ readonly campaignSendingSchedule: {
296
+ readonly description: "How many emails one campaign is set to send on a day, by sender.";
297
+ readonly docs: string;
298
+ readonly method: "GET";
299
+ readonly params: {
300
+ readonly day: import("../internal/native.ts").PlacedParam<"query", "string">;
301
+ readonly campaign_id: import("../internal/native.ts").PlacedParam<"path", "string">;
302
+ };
303
+ readonly path: "/api/campaigns/{campaign_id}/sending-schedule";
304
+ };
305
+ readonly scheduleTemplates: {
306
+ readonly description: "The saved schedule templates a campaign's sending window can be made from.";
307
+ readonly docs: string;
308
+ readonly method: "GET";
309
+ readonly path: "/api/campaigns/schedule/templates";
310
+ };
311
+ readonly scheduleTimezones: {
312
+ readonly description: "The timezones a campaign schedule accepts, with their ids.";
313
+ readonly docs: string;
314
+ readonly method: "GET";
315
+ readonly path: "/api/campaigns/schedule/available-timezones";
316
+ };
317
+ readonly sendingSchedules: {
318
+ readonly description: "How many emails each campaign is set to send on a day, by sender.";
319
+ readonly docs: string;
320
+ readonly method: "GET";
321
+ readonly params: {
322
+ readonly day: import("../internal/native.ts").PlacedParam<"query", "string">;
323
+ };
324
+ readonly path: "/api/campaigns/sending-schedules";
325
+ };
326
+ };
327
+ export type EmailBisonNative = typeof NATIVE;
@@ -0,0 +1,4 @@
1
+ import type { AdapterContext, StatsQuery } from "../internal/adapter.ts";
2
+ import type { MetricRow } from "../internal/entities.ts";
3
+ import type { EmailBisonClient } from "./client.ts";
4
+ export declare const readStats: (client: EmailBisonClient, ctx: AdapterContext, query: StatsQuery, now?: number) => Promise<MetricRow[]>;
@@ -0,0 +1,2 @@
1
+ import type { EventFormat } from "../internal/adapter.ts";
2
+ export declare const emailbisonEvents: (provider: string) => EventFormat;
@@ -1,9 +1,3 @@
1
- import {
2
- profileSlug
3
- } from "../chunks/chunk-NAWZ73QS.js";
4
- import {
5
- stableId
6
- } from "../chunks/chunk-FHKSLCVW.js";
7
1
  import {
8
2
  evidenceSchema
9
3
  } from "../chunks/chunk-BOWXGMN3.js";
@@ -12,6 +6,12 @@ import {
12
6
  makeRef,
13
7
  parseRef
14
8
  } from "../chunks/chunk-QAKJ76HB.js";
9
+ import {
10
+ profileSlug
11
+ } from "../chunks/chunk-NAWZ73QS.js";
12
+ import {
13
+ stableId
14
+ } from "../chunks/chunk-FHKSLCVW.js";
15
15
  import {
16
16
  OutboundError
17
17
  } from "../chunks/chunk-J7DDZ4C2.js";