@tangle-network/hub-sdk 0.29.0-develop.20260819122040.176c418 → 0.29.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.
package/dist/index.d.ts CHANGED
@@ -1,3 +1,212 @@
1
+ //#region src/allowances.d.ts
2
+ /**
3
+ * Allowances: a developer's per-member daily allowance on a meter, and the
4
+ * paywall decision past it. The platform counts every admitted turn and reads
5
+ * each payer's dollars from the ledger; the app keeps only its checkout and
6
+ * records a paying member with {@link HubAllowancesClient.grant}.
7
+ *
8
+ * Only the meter's owner may call these, signed in or with a root API key of
9
+ * their own. A delegated or resource-bound key, such as the key a hosted end
10
+ * user's sandbox runs on, is refused.
11
+ */
12
+ type HubAllowanceTier = "free" | "paid" | "owner";
13
+ type HubAllowanceRole = "owner" | "member";
14
+ interface HubAllowancePlanInput {
15
+ free: {
16
+ turnsPerDay: number;
17
+ usdPerDay: number | null;
18
+ };
19
+ /** Null turns billing off: past the free allowance nothing lifts the limit. */
20
+ paid: {
21
+ turnsPerDay: number;
22
+ usdPerDay: number | null;
23
+ priceUsdMonthly: number;
24
+ } | null;
25
+ owner?: {
26
+ turnsPerDay: number;
27
+ };
28
+ /** Key resource type whose ledger spend counts against a payer's dollars. */
29
+ spendResourceType: string | null;
30
+ }
31
+ interface HubAllowancePlan extends HubAllowancePlanInput {
32
+ meter: string;
33
+ owner: {
34
+ turnsPerDay: number;
35
+ };
36
+ /** False while the meter runs on the default plan. */
37
+ configured: boolean;
38
+ updatedAt: string | null;
39
+ }
40
+ interface HubAllowanceSubject {
41
+ member: string;
42
+ role?: HubAllowanceRole;
43
+ /** The member whose keys pay for the turn, when that is someone else. */
44
+ payer?: string;
45
+ payerRole?: HubAllowanceRole;
46
+ }
47
+ interface HubAllowanceDecision {
48
+ /** `paywall`: paying lifts the limit. `allowance_reached`: nothing does today. */
49
+ decision: "admit" | "paywall" | "allowance_reached";
50
+ tier: HubAllowanceTier;
51
+ paywall: boolean;
52
+ turns: {
53
+ used: number;
54
+ limit: number;
55
+ };
56
+ usd: {
57
+ spent: number;
58
+ limit: number;
59
+ remaining: number;
60
+ } | null;
61
+ day: string;
62
+ resetsAt: string;
63
+ /**
64
+ * A paying payer's spend in the current paid period against what funds it:
65
+ * the plan price less Tangle's 10% fee, plus the free daily allowance for
66
+ * the period. A paid turn is refused once `remaining` is gone.
67
+ */
68
+ period?: {
69
+ spent: number;
70
+ funded: number;
71
+ remaining: number;
72
+ startsAt: string;
73
+ endsAt: string;
74
+ };
75
+ replay?: boolean;
76
+ }
77
+ interface HubAllowanceUsage {
78
+ day: string;
79
+ turns: number;
80
+ members: Array<{
81
+ member: string;
82
+ turns: number;
83
+ tier: HubAllowanceTier;
84
+ usdSpent: number | null;
85
+ }>;
86
+ lines: Array<{
87
+ line: string;
88
+ turns: number;
89
+ }>;
90
+ }
91
+ interface HubAllowanceSyncInput {
92
+ source: string;
93
+ revision: number;
94
+ expiresAt: string | null;
95
+ reference: string | null;
96
+ }
97
+ interface HubAllowanceSyncReceipt extends HubAllowanceSyncInput {
98
+ member: string;
99
+ }
100
+ interface HubAllowanceGrant {
101
+ member: string;
102
+ tier: "paid";
103
+ expiresAt: string;
104
+ reference: string | null;
105
+ }
106
+ declare class HubAllowancesClient {
107
+ private readonly request;
108
+ constructor(request: <T>(path: string, init: RequestInit) => Promise<T>);
109
+ plan(meter: string): Promise<HubAllowancePlan>;
110
+ setPlan(meter: string, plan: HubAllowancePlanInput): Promise<HubAllowancePlan>;
111
+ /** Admit one turn or refuse it. Retrying the same `turnId` never counts twice. */
112
+ admit(meter: string, input: HubAllowanceSubject & {
113
+ turnId: string;
114
+ line?: string;
115
+ channel?: string;
116
+ }): Promise<HubAllowanceDecision>;
117
+ /** What the member's next turn would get, without counting anything. */
118
+ status(meter: string, subject: HubAllowanceSubject): Promise<HubAllowanceDecision>;
119
+ /** Move a member to the paid allowance until `expiresAt` (the paid period's end). */
120
+ grant(meter: string, member: string, input: {
121
+ expiresAt: string;
122
+ reference?: string | null;
123
+ }): Promise<HubAllowanceGrant>;
124
+ /** Synchronize a paid grant by durable product revision. Null expiry writes
125
+ * a retained revocation. A delayed older update is refused, never reactivated.
126
+ * There is no fallback to the unversioned grant endpoint on older servers. */
127
+ syncGrant(meter: string, member: string, input: HubAllowanceSyncInput): Promise<HubAllowanceSyncReceipt>;
128
+ revoke(meter: string, member: string): Promise<void>;
129
+ /** Turns per member and per line on one UTC day (default today). */
130
+ usage(meter: string, day?: string): Promise<HubAllowanceUsage>;
131
+ private path;
132
+ private memberPath;
133
+ private body;
134
+ }
135
+ //#endregion
136
+ //#region src/apps.d.ts
137
+ /** App identity and customer permissions over the existing Platform transport.
138
+ * These operations do not authorize spending or expose upstream credentials. */
139
+ interface HubApp {
140
+ id: string;
141
+ clientId: string;
142
+ oauthClientId: string | null;
143
+ name: string;
144
+ redirectUris: string[];
145
+ allowedScopes: string[];
146
+ homepageUrl: string | null;
147
+ accessPayer?: "user" | "app-owner";
148
+ status: "active" | "revoked";
149
+ createdAt: string;
150
+ updatedAt: string;
151
+ }
152
+ interface HubAppCreateInput {
153
+ name: string;
154
+ redirectUris: string[];
155
+ allowedScopes: string[];
156
+ homepageUrl?: string;
157
+ /** The registered app owner funds eligibility; customer permissions remain separate. */
158
+ accessPayer?: "user" | "app-owner";
159
+ /** Associate an existing owned login client in the same transaction as creation. */
160
+ oauthClientId?: string;
161
+ }
162
+ interface HubAppGrant {
163
+ id: string;
164
+ appId: string;
165
+ userId: string;
166
+ connectionId: string;
167
+ scopes: string[];
168
+ status: "active" | "revoked";
169
+ createdAt: string;
170
+ updatedAt: string;
171
+ revokedAt: string | null;
172
+ /** Display metadata is additive; older deployments may omit it. */
173
+ appName?: string | null;
174
+ oauthClientId?: string | null;
175
+ providerId?: string | null;
176
+ accountDisplay?: string | null;
177
+ connectionDisplayName?: string | null;
178
+ }
179
+ interface HubAppGrantRevoked {
180
+ grantId: string;
181
+ status: "revoked";
182
+ revokedAt: string | null;
183
+ tokensRevoked: number;
184
+ }
185
+ declare class HubAppsClient {
186
+ private readonly request;
187
+ readonly grants: {
188
+ list: () => Promise<HubAppGrant[]>;
189
+ revoke: (grantId: string) => Promise<HubAppGrantRevoked>;
190
+ };
191
+ constructor(request: <T>(path: string, init: RequestInit) => Promise<T>);
192
+ list(): Promise<HubApp[]>;
193
+ /** The secret is returned only by creation; keep it in your server vault. */
194
+ create(input: HubAppCreateInput): Promise<{
195
+ app: HubApp;
196
+ clientSecret: string;
197
+ }>;
198
+ /** Immutable association of two existing records with the same owner. */
199
+ linkOAuthClient(appId: string, clientId: string): Promise<{
200
+ appId: string;
201
+ oauthClientId: string;
202
+ }>;
203
+ revoke(appId: string): Promise<{
204
+ appId: string;
205
+ grantsRevoked: number;
206
+ tokensRevoked: number;
207
+ }>;
208
+ }
209
+ //#endregion
1
210
  //#region src/types.d.ts
2
211
  type HubPrincipalKind = "user_session" | "api_key" | "sandbox_runtime";
3
212
  interface HubSuccessEnvelope<TData> {
@@ -14,7 +223,7 @@ interface HubErrorBody {
14
223
  message: string;
15
224
  details?: unknown;
16
225
  }
17
- type HubErrorCode = "HUB_UNAUTHENTICATED" | "HUB_FORBIDDEN" | "HUB_INVALID_INPUT" | "HUB_INVALID_STATE" | "HUB_PROVIDER_MISSING" | "HUB_CONNECTION_MISSING" | "HUB_CONNECTION_REVOKED" | "HUB_TOKEN_EXPIRED" | "HUB_TOKEN_REPLAYED" | "HUB_TOKEN_REVOKED" | "HUB_TOKEN_ACTION_MISMATCH" | "HUB_POLICY_DENIED" | "HUB_APPROVAL_REQUIRED" | "HUB_EXECUTOR_FAILURE" | "HUB_PROVIDER_FAILURE" | "HUB_CONFIG_MISSING" | "HUB_CONFIG_INVALID" | "HUB_NOT_FOUND" | "HUB_NOT_IMPLEMENTED" | "HUB_CONFLICT" | "HUB_IDEMPOTENCY_CONFLICT" | "HUB_IDEMPOTENCY_IN_FLIGHT" | "VALIDATION_ERROR" | "WORKFLOW_INVALID" | "NOT_FOUND" | "UNAUTHORIZED" | "CONFLICT" | "MISSING_RUN_INPUTS" | "WORKFLOW_DISABLED" | "PAYLOAD_TOO_LARGE" | "WORKFLOW_RUN_TIMEOUT" | `HUB_HTTP_${number}`;
226
+ type HubErrorCode = "HUB_UNAUTHENTICATED" | "HUB_FORBIDDEN" | "HUB_INVALID_INPUT" | "HUB_INVALID_STATE" | "HUB_PROVIDER_MISSING" | "HUB_CONNECTION_MISSING" | "HUB_CONNECTION_REVOKED" | "HUB_TOKEN_EXPIRED" | "HUB_TOKEN_REPLAYED" | "HUB_TOKEN_REVOKED" | "HUB_TOKEN_ACTION_MISMATCH" | "HUB_POLICY_DENIED" | "HUB_APPROVAL_REQUIRED" | "HUB_EXECUTOR_FAILURE" | "HUB_PROVIDER_FAILURE" | "HUB_PROVIDER_REJECTED" | "HUB_CONFIG_MISSING" | "HUB_CONFIG_INVALID" | "HUB_NOT_FOUND" | "HUB_NOT_IMPLEMENTED" | "HUB_CONFLICT" | "HUB_IDEMPOTENCY_CONFLICT" | "HUB_IDEMPOTENCY_IN_FLIGHT" | "VALIDATION_ERROR" | "WORKFLOW_INVALID" | "NOT_FOUND" | "UNAUTHORIZED" | "CONFLICT" | "MISSING_RUN_INPUTS" | "WORKFLOW_DISABLED" | "PAYLOAD_TOO_LARGE" | "WORKFLOW_RUN_TIMEOUT" | `HUB_HTTP_${number}`;
18
227
  interface HubStatusResponse {
19
228
  contract: unknown;
20
229
  principal: HubPrincipal;
@@ -36,6 +245,7 @@ interface HubConnection {
36
245
  providerId: string;
37
246
  displayName: string;
38
247
  accountDisplay: string | null;
248
+ providerAccountId: string | null;
39
249
  scopes: string[];
40
250
  status: "active" | "revoked" | "unhealthy" | "reconnect_required";
41
251
  health: "unknown" | "healthy" | "unhealthy" | "rate_limited";
@@ -222,6 +432,7 @@ interface HubOAuthStartRequest {
222
432
  returnUrl?: string;
223
433
  cli?: boolean;
224
434
  connectionParameters?: Record<string, string>;
435
+ requestedScopes?: readonly string[];
225
436
  }
226
437
  interface HubOAuthCallbackSuccessQuery {
227
438
  provider: string;
@@ -282,7 +493,18 @@ interface HubOAuthCallbackResponse {
282
493
  interface HubApiKeyConnectRequest {
283
494
  provider: string;
284
495
  apiKey: string;
496
+ /** Connector-owned setup values. Hub validates them before testing the key. */
497
+ metadata?: HubApiKeyConnectionMetadata;
285
498
  }
499
+ type HubApiKeyConnectionMetadata = {
500
+ propertyId: string;
501
+ currency?: string;
502
+ } | {
503
+ listings: Array<{
504
+ id: string;
505
+ pms: string;
506
+ }>;
507
+ };
286
508
  /** Result of an api-key connect: the created (or reconnected) connection.
287
509
  * Synchronous — there is no redirect leg, unlike the OAuth flow. */
288
510
  interface HubApiKeyConnectResponse {
@@ -527,7 +749,7 @@ interface HubGithubAppInstallation {
527
749
  accountType: string | null;
528
750
  /** "all" ⇒ every repo under the account; "selected" ⇒ only repoFullNames. */
529
751
  repositorySelection: "all" | "selected";
530
- /** Lowercased "owner/repo" — empty when repositorySelection = "all". */
752
+ /** Metadata omits names; use githubApp.listRepos(id) for a live caller-safe list. */
531
753
  repoFullNames: string[];
532
754
  suspended: boolean;
533
755
  }
@@ -580,8 +802,10 @@ interface HubGithubAppSyncResponse {
580
802
  }
581
803
  interface HubGithubAppListReposResponse {
582
804
  installationId: number;
583
- /** Lowercased "owner/repo" — covers the full registry view of the install. */
805
+ /** Complete live intersection of App coverage and the caller's GitHub access. */
584
806
  repoFullNames: string[];
807
+ /** True only when both upstream listings completed; failures return an error. */
808
+ complete: true;
585
809
  }
586
810
  interface HubGithubAppIsRepoInstalledRequest {
587
811
  owner: string;
@@ -612,10 +836,14 @@ interface HubWorkflowTrigger {
612
836
  timezone: string | null;
613
837
  nextFireAt: string | null;
614
838
  lastFiredAt: string | null;
839
+ /** Schedule only: the ISO-8601 instant it stops firing; null when unbounded. */
840
+ until: string | null;
615
841
  }
616
842
  interface HubWorkflowValidationError {
617
843
  path: string;
618
844
  message: string;
845
+ /** Machine-readable reason where one is defined, e.g. `schedule_outlives_grant`. */
846
+ code?: string;
619
847
  }
620
848
  type HubWorkflowRunStatus = "queued" | "running" | "waiting" | "succeeded" | "failed" | "cancelled";
621
849
  /** One agent iteration of an `agent.run`, as the single-run detail carries it
@@ -1222,6 +1450,450 @@ interface HubWorkflowRunStepsPage {
1222
1450
  nextCursor: number | null;
1223
1451
  }
1224
1452
  //#endregion
1453
+ //#region src/broker.d.ts
1454
+ interface HubAppBrokerOptions {
1455
+ baseUrl: string;
1456
+ clientId: string;
1457
+ clientSecret: string;
1458
+ fetch?: typeof fetch;
1459
+ }
1460
+ interface HubAppBrokerToken {
1461
+ accessToken: string;
1462
+ expiresIn: number;
1463
+ scopes: string[];
1464
+ }
1465
+ interface HubAppBrokerExchange extends HubAppBrokerToken {
1466
+ grantId: string;
1467
+ connectionId: string;
1468
+ }
1469
+ /** Server-only client. App secrets never become a user's general API key.
1470
+ * Every invocation mints and consumes one short-lived, exact-grant token. */
1471
+ declare class HubAppBrokerClient {
1472
+ private readonly options;
1473
+ private readonly baseUrl;
1474
+ private readonly fetcher;
1475
+ constructor(options: HubAppBrokerOptions);
1476
+ private token;
1477
+ private readToken;
1478
+ exchange(input: {
1479
+ code: string;
1480
+ redirectUri: string;
1481
+ connectionId: string;
1482
+ }): Promise<HubAppBrokerExchange>;
1483
+ mint(grantId: string): Promise<HubAppBrokerToken>;
1484
+ invoke<T = unknown>(grantId: string, connectionId: string, actionPath: string, input: Record<string, unknown>): Promise<HubExecResponse<T>>;
1485
+ }
1486
+ //#endregion
1487
+ //#region src/inbound-webhooks.d.ts
1488
+ /** Provider setup uses the existing authenticated Hub transport and vault. */
1489
+ interface HubInboundWebhookCreateOptions {
1490
+ /** Inkbox identity that owns all selected channels. */
1491
+ identityId?: string;
1492
+ mailboxId?: string;
1493
+ phoneNumberId?: string;
1494
+ imessage?: boolean;
1495
+ /** Linq: explicit owned lines; omitted does not mean every account line. */
1496
+ phoneNumbers?: string[];
1497
+ /** Linq WhatsApp: explicit opaque IDs from numbers.list, not E.164 phone strings. */
1498
+ phoneNumberIds?: string[];
1499
+ /** Contiguity Console secret, or an existing Inkbox identity signing key. */
1500
+ signingSecret?: string;
1501
+ }
1502
+ interface HubInboundWebhookCreateResponse {
1503
+ url: string;
1504
+ /** True only when the provider subscription was created by the server. */
1505
+ provisioned?: boolean;
1506
+ /** Self-configured legacy providers can return a newly minted secret once. */
1507
+ secret?: string;
1508
+ inboundAddress?: string;
1509
+ requiresProviderSetup?: boolean;
1510
+ }
1511
+ interface HubInboundWebhookStatus {
1512
+ configured: boolean;
1513
+ url?: string;
1514
+ /** Configuration is not evidence of a real delivered message. */
1515
+ deliveryVerified: false;
1516
+ requiresProviderSetup?: boolean;
1517
+ }
1518
+ /** Live provider readback for one explicitly selected Linq WhatsApp number. */
1519
+ interface HubInboundPhoneNumberScope {
1520
+ configured: true;
1521
+ provisioned: true;
1522
+ subscribed: true;
1523
+ phoneNumberIds: string[];
1524
+ }
1525
+ declare class HubInboundWebhooksClient {
1526
+ private readonly request;
1527
+ constructor(request: <T>(path: string, init: RequestInit) => Promise<T>);
1528
+ create(connectionId: string, options?: HubInboundWebhookCreateOptions): Promise<HubInboundWebhookCreateResponse>;
1529
+ get(connectionId: string): Promise<HubInboundWebhookStatus>;
1530
+ /** Add one owned Linq WhatsApp number without rotating the webhook secret. */
1531
+ ensurePhoneNumber(connectionId: string, phoneNumberId: string): Promise<HubInboundPhoneNumberScope>;
1532
+ /** Remove event subscriptions first. This does not silently rotate a live URL. */
1533
+ delete(connectionId: string): Promise<{
1534
+ removed: boolean;
1535
+ }>;
1536
+ private path;
1537
+ }
1538
+ //#endregion
1539
+ //#region src/knowledge.d.ts
1540
+ interface HubKnowledgeRetrievalResult {
1541
+ attachmentId: string;
1542
+ generation: string;
1543
+ provenance: "ingested" | "record-supplied";
1544
+ hits: Array<{
1545
+ id: string;
1546
+ title: string;
1547
+ snippet: string;
1548
+ score?: number;
1549
+ citations?: Array<{
1550
+ sourceId: string;
1551
+ sourceUri: string;
1552
+ revision?: string;
1553
+ }>;
1554
+ }>;
1555
+ elapsedMs?: number;
1556
+ }
1557
+ interface HubKnowledgeQueryResult {
1558
+ results: HubKnowledgeRetrievalResult[];
1559
+ /** Individual unavailable sources do not hide evidence from healthy sources. */
1560
+ failures: Array<{
1561
+ attachmentId: string;
1562
+ code: string;
1563
+ message: string;
1564
+ }>;
1565
+ partial: boolean;
1566
+ }
1567
+ /** Runtime-only retrieval. The authenticated sandbox credential determines the
1568
+ * scope on the server; neither a caller nor an agent can supply another scope. */
1569
+ declare class HubKnowledgeClient {
1570
+ private readonly request;
1571
+ constructor(request: <T>(path: string, init: RequestInit) => Promise<T>);
1572
+ query(input: {
1573
+ query: string;
1574
+ limit?: number;
1575
+ }, options?: {
1576
+ signal?: AbortSignal;
1577
+ }): Promise<HubKnowledgeQueryResult>;
1578
+ }
1579
+ //#endregion
1580
+ //#region src/lines.d.ts
1581
+ interface HubLineMember {
1582
+ id: string;
1583
+ label: string | null;
1584
+ role: string;
1585
+ self?: boolean;
1586
+ consent?: "enabled" | "required";
1587
+ }
1588
+ interface HubLineContext {
1589
+ self: {
1590
+ id: string;
1591
+ label: string | null;
1592
+ role: string;
1593
+ };
1594
+ line: {
1595
+ id: string;
1596
+ label: string | null;
1597
+ transport: string;
1598
+ };
1599
+ members: HubLineMember[];
1600
+ capabilities: Record<string, {
1601
+ allowed: boolean;
1602
+ reason?: string;
1603
+ }>;
1604
+ pendingReminders: Array<{
1605
+ messageId: string;
1606
+ wakeAt?: string;
1607
+ prompt: string | null;
1608
+ }>;
1609
+ quotas: {
1610
+ selfMessagesToday: number;
1611
+ selfMessagesPerDay: number;
1612
+ selfMessagesPending: number;
1613
+ selfMessagesPendingLimit: number;
1614
+ };
1615
+ }
1616
+ interface HubLineSendInput {
1617
+ toMember: string;
1618
+ text: string;
1619
+ notBefore?: string;
1620
+ onBehalfOf?: string;
1621
+ idempotencyKey?: string;
1622
+ }
1623
+ interface HubLineOwnerSendInput {
1624
+ memberId: string;
1625
+ text: string;
1626
+ notBefore?: string;
1627
+ idempotencyKey: string;
1628
+ /** Ask a coded question; the member's reply that starts with `code` returns here. */
1629
+ reply?: HubLineReplyCodeInput;
1630
+ }
1631
+ interface HubLineReplyCodeInput {
1632
+ /** A letter, then up to seven letters or digits, with at least one digit (`F7`). Hub compares it case-insensitively. */
1633
+ code: string;
1634
+ /** 60 to 604800; the window opens when the send first becomes eligible. */
1635
+ ttlSeconds: number;
1636
+ /**
1637
+ * 1 to 20 distinct texted choices, each 1-32 of `a-z 0-9 _ -` after lower-casing.
1638
+ * An answer must then be `<code> <option>[ <note>]`; any other coded text keeps the question open.
1639
+ */
1640
+ options?: string[];
1641
+ }
1642
+ /** The coded question's state on an owner send receipt. */
1643
+ interface HubLineReplyCode {
1644
+ /** Upper case. */
1645
+ code: string;
1646
+ expiresAt: string;
1647
+ /** The first coded answer; `text` is null after content retention ends. */
1648
+ answer: {
1649
+ messageId: string;
1650
+ text: string | null;
1651
+ receivedAt: string; /** The named option, lower case; null when the send listed no options. */
1652
+ option: string | null; /** Words after the option; null when there were none or retention ended. */
1653
+ note: string | null;
1654
+ } | null;
1655
+ }
1656
+ interface HubLineReminderInput {
1657
+ text: string;
1658
+ notBefore: string;
1659
+ idempotencyKey: string;
1660
+ }
1661
+ interface HubLineApplicationDispatchCurrentInput {
1662
+ attachmentId: string;
1663
+ memberId: string;
1664
+ memberRevision: string;
1665
+ senderAddress: string;
1666
+ textSha256: string;
1667
+ binding: string;
1668
+ dispatchFence: string;
1669
+ dispatchDeadline: string;
1670
+ }
1671
+ interface HubLineMemberApplication {
1672
+ id: string;
1673
+ lineId: string;
1674
+ attachmentId: string;
1675
+ memberId: string;
1676
+ subjectId: string;
1677
+ status: "active" | "revoked";
1678
+ application: {
1679
+ url: string;
1680
+ binding: string;
1681
+ };
1682
+ /** Hub's name for the app at this callback; present on reads. */
1683
+ app?: {
1684
+ name: string;
1685
+ };
1686
+ createdAt: string;
1687
+ revokedAt: string | null;
1688
+ }
1689
+ interface HubLineMemberApplicationInput {
1690
+ expectedSelectionId: string | null;
1691
+ expectedMemberRevision: string;
1692
+ subjectId: string;
1693
+ application: {
1694
+ url: string;
1695
+ binding: string;
1696
+ secret: string;
1697
+ };
1698
+ }
1699
+ interface HubLineSendReceipt {
1700
+ message: {
1701
+ id: string;
1702
+ status: string;
1703
+ text: string | null;
1704
+ };
1705
+ eligibleAt: string | null;
1706
+ expiresAt: string;
1707
+ /** Null when the send asked no coded question; absent from Hub before reply codes. */
1708
+ reply?: HubLineReplyCode | null;
1709
+ }
1710
+ interface HubLineReminderReceipt {
1711
+ state: "queued" | "skipped";
1712
+ lineId: string;
1713
+ messageId?: string;
1714
+ sessionId?: string;
1715
+ completion?: string;
1716
+ reason?: string;
1717
+ }
1718
+ interface HubLineScheduledSendOptions {
1719
+ lineId: string;
1720
+ memberId: string;
1721
+ text: string;
1722
+ timezone: string;
1723
+ name?: string;
1724
+ notBefore?: string;
1725
+ /**
1726
+ * RFC 3339 instant the schedule stops at. Required when the calling key
1727
+ * expires, and no later than that expiry: a schedule never outlives the
1728
+ * key that wrote it.
1729
+ */
1730
+ until?: string;
1731
+ }
1732
+ interface HubLineCheckinOptions {
1733
+ lineId: string;
1734
+ member: string;
1735
+ timezone: string;
1736
+ prompt: string;
1737
+ name?: string;
1738
+ /** RFC 3339 instant the schedule stops at; see {@link HubLineScheduledSendOptions.until}. */
1739
+ until?: string;
1740
+ }
1741
+ /** Line calls share HubClient authentication and envelope handling. */
1742
+ declare class HubLinesClient {
1743
+ private readonly request;
1744
+ private readonly createWorkflow;
1745
+ private readonly requestApplicationDispatchCurrent?;
1746
+ readonly members: {
1747
+ list: (lineId: string) => Promise<HubLineMember[]>;
1748
+ };
1749
+ readonly memberApplications: {
1750
+ get: (lineId: string, memberId: string) => Promise<{
1751
+ memberRevision: string;
1752
+ selection: HubLineMemberApplication | null;
1753
+ }>;
1754
+ select: (lineId: string, memberId: string, input: HubLineMemberApplicationInput) => Promise<HubLineMemberApplication>;
1755
+ clear: (lineId: string, memberId: string, input: {
1756
+ expectedSelectionId: string;
1757
+ expectedMemberRevision: string;
1758
+ }) => Promise<void>;
1759
+ };
1760
+ readonly checkins: {
1761
+ schedule: (cron: string, options: HubLineCheckinOptions) => Promise<HubWorkflow>;
1762
+ };
1763
+ constructor(request: <T>(path: string, init: RequestInit) => Promise<T>, createWorkflow: (yaml: string) => Promise<HubWorkflow>, requestApplicationDispatchCurrent?: ((path: string, init: RequestInit, callbackBearer: string) => Promise<{
1764
+ current: boolean;
1765
+ }>) | undefined);
1766
+ scheduleSend(cron: string, options: HubLineScheduledSendOptions): Promise<HubWorkflow>;
1767
+ context(): Promise<HubLineContext>;
1768
+ send(lineId: string, input: HubLineSendInput | HubLineOwnerSendInput): Promise<HubLineSendReceipt>;
1769
+ /** Read an owner send's receipt, including its coded answer. Queued is not delivered. */
1770
+ sentMessage(lineId: string, messageId: string): Promise<HubLineSendReceipt>;
1771
+ remind(lineId: string, input: HubLineReminderInput): Promise<HubLineReminderReceipt>;
1772
+ applicationDispatchCurrent(lineId: string, messageId: string, input: HubLineApplicationDispatchCurrentInput, callbackBearer: string): Promise<boolean>;
1773
+ }
1774
+ //#endregion
1775
+ //#region src/managed-numbers.d.ts
1776
+ interface HubNumberReadiness {
1777
+ configured: boolean;
1778
+ provider: "inkbox";
1779
+ transports: Array<"sms" | "imessage">;
1780
+ billing: "prepaid_activation";
1781
+ automaticRentalBilling: false;
1782
+ deliveryVerified: false;
1783
+ }
1784
+ interface HubNumberQuote {
1785
+ transport: "sms" | "imessage";
1786
+ activationCents: number;
1787
+ currency: "usd";
1788
+ termsVersion: string;
1789
+ terms: string;
1790
+ expiresAt: number;
1791
+ /** The binding the quote was issued for. Absent from older servers. */
1792
+ clientReference?: string;
1793
+ /** Opaque. Pass it back to `create`; never decode it. */
1794
+ token: string;
1795
+ }
1796
+ /** One page of the owner's orders, newest first. */
1797
+ interface HubNumberOrderPage {
1798
+ orders: HubNumberOrder[];
1799
+ /** Present while more orders exist. Older servers omit it and return one
1800
+ * bounded page, so an absent cursor never proves an order does not exist. */
1801
+ nextCursor?: string | null;
1802
+ }
1803
+ interface HubNumberListQuery {
1804
+ /** Only orders requested for this binding, including closed ones. */
1805
+ clientReference?: string;
1806
+ cursor?: string;
1807
+ /** 1 to 100; the server default is 100. */
1808
+ limit?: number;
1809
+ }
1810
+ /** An operator's terminal decision on an order stuck in `needs_review`.
1811
+ * Read-only for a creator: the resolution is made through the platform's
1812
+ * admin surface, never through this client. */
1813
+ interface HubNumberResolution {
1814
+ action: "release" | "settle" | "abandon";
1815
+ operator: string;
1816
+ reason: string;
1817
+ at: number;
1818
+ /** Present while the operator's action is still running. The decision is
1819
+ * not final and the order can still return to review. */
1820
+ pending?: true;
1821
+ /** Present when a `settle` handed a live, unfinished order back to
1822
+ * provisioning, so the order is working again rather than closed. */
1823
+ requeued?: true;
1824
+ }
1825
+ interface HubNumberOrder {
1826
+ id: string;
1827
+ clientReference: string;
1828
+ transport: "sms" | "imessage";
1829
+ status: "pending" | "provider_pending" | "needs_review" | "ready_for_setup" | "cancelled";
1830
+ phase: "identity" | "number" | "credential" | "connection" | "complete";
1831
+ address: string | null;
1832
+ connectionId: string | null;
1833
+ identityId: string | null;
1834
+ providerNumberId: string | null;
1835
+ billingStatus: "unreserved" | "reserved" | "settled" | "released";
1836
+ cancellation: "none" | "requested" | "needs_review" | "released" | "abandoned";
1837
+ errorCode: string | null;
1838
+ nextAttemptAt: number | null;
1839
+ resolution: HubNumberResolution | null;
1840
+ deliveryVerified: false;
1841
+ activationCents: number;
1842
+ currency: "usd";
1843
+ terms: string;
1844
+ }
1845
+ /** Administrative number operations through Hub's authenticated transport.
1846
+ * A mutation is one attempt; an uncertain create reuses its quote and reference. */
1847
+ declare class HubManagedNumbersClient {
1848
+ private readonly request;
1849
+ constructor(request: <T>(path: string, init: RequestInit) => Promise<T>);
1850
+ readiness(): Promise<HubNumberReadiness>;
1851
+ /** One page of orders. Scope by `clientReference` to ask about one binding,
1852
+ * and follow `nextCursor` for the rest; a page is never ownership evidence. */
1853
+ list(query?: HubNumberListQuery): Promise<HubNumberOrderPage>;
1854
+ get(id: string): Promise<{
1855
+ order: HubNumberOrder;
1856
+ }>;
1857
+ quote(input: {
1858
+ transport: "sms" | "imessage";
1859
+ clientReference: string;
1860
+ }): Promise<{
1861
+ quote: HubNumberQuote;
1862
+ }>;
1863
+ /** `clientReference` and `transport`, when given, must match the signed
1864
+ * quote or Hub refuses the purchase with a conflict. */
1865
+ create(input: {
1866
+ quoteToken: string;
1867
+ consent: true;
1868
+ state?: string;
1869
+ clientReference?: string;
1870
+ transport?: "sms" | "imessage";
1871
+ }): Promise<{
1872
+ order: HubNumberOrder;
1873
+ }>;
1874
+ /** Fences references so no order can take them again. Call it as the last
1875
+ * step before retiring the resource they name: a purchase that races the
1876
+ * retirement is then refused (`409 number_reference_fenced`) instead of
1877
+ * binding a line to a resource that is gone. Refused with
1878
+ * `409 number_reference_held` while a live order holds one of them; cancel
1879
+ * it first. A cancelled order no longer holds its reference, so the fence
1880
+ * succeeds as soon as `cancel` returns, whether or not its release is still
1881
+ * pending. Repeating a fence is harmless. */
1882
+ fence(input: {
1883
+ clientReferences: string[];
1884
+ }): Promise<{
1885
+ clientReferences: string[];
1886
+ }>;
1887
+ advance(id: string): Promise<{
1888
+ order: HubNumberOrder;
1889
+ }>;
1890
+ cancel(id: string): Promise<{
1891
+ order: HubNumberOrder;
1892
+ }>;
1893
+ private path;
1894
+ private post;
1895
+ }
1896
+ //#endregion
1225
1897
  //#region src/client.d.ts
1226
1898
  type HubAuthHeaders = () => HeadersInit | Promise<HeadersInit>;
1227
1899
  interface HubClientOptions {
@@ -1250,13 +1922,25 @@ interface HubClientFromEnvOptions {
1250
1922
  }
1251
1923
  declare function resolveHubBaseUrl(env?: HubEnv): string;
1252
1924
  declare function resolveHubAuth(env?: HubEnv): string;
1253
- declare class HubClient {
1925
+ declare class HubTransport {
1254
1926
  readonly baseUrl: string;
1255
1927
  readonly fetch: typeof fetch;
1256
1928
  readonly apiKey?: string;
1257
1929
  readonly authHeaders?: HubAuthHeaders;
1930
+ constructor(options: HubClientOptions);
1931
+ protected request<TData>(path: string, init: RequestInit, options?: {
1932
+ auth?: "client" | "caller";
1933
+ validateData?: (data: unknown) => data is TData;
1934
+ }): Promise<TData>;
1935
+ protected buildHeaders(headers: HeadersInit | undefined, callerAuth?: boolean): Promise<Headers>;
1936
+ }
1937
+ declare class HubClient extends HubTransport {
1938
+ readonly knowledge: HubKnowledgeClient;
1939
+ readonly allowances: HubAllowancesClient;
1940
+ readonly apps: HubAppsClient;
1258
1941
  readonly connections: HubConnectionsClient;
1259
1942
  readonly channels: HubChannelsClient;
1943
+ readonly numbers: HubManagedNumbersClient;
1260
1944
  readonly eventSubscriptions: HubEventSubscriptionsClient;
1261
1945
  readonly permissions: HubPermissionsClient;
1262
1946
  readonly tokens: HubTokensClient;
@@ -1265,10 +1949,10 @@ declare class HubClient {
1265
1949
  readonly audit: HubAuditClient;
1266
1950
  readonly githubApp: HubGithubAppClient;
1267
1951
  readonly workflows: HubWorkflowsClient;
1952
+ readonly lines: HubLinesClient;
1268
1953
  constructor(options: HubClientOptions);
1269
1954
  static fromEnv(options?: HubClientFromEnvOptions): HubClient;
1270
1955
  status(): Promise<HubStatusResponse>;
1271
- private request;
1272
1956
  /**
1273
1957
  * Open a streaming (Server-Sent Events) response and return its raw body.
1274
1958
  * Shares auth-header building + `fetch` with {@link request}, but does NOT
@@ -1289,7 +1973,6 @@ declare class HubClient {
1289
1973
  * otherwise an `HUB_HTTP_<status>` transport error.
1290
1974
  */
1291
1975
  private requestBytes;
1292
- private buildHeaders;
1293
1976
  }
1294
1977
  interface HubTokenListOptions {
1295
1978
  includeExpired?: boolean;
@@ -1360,6 +2043,8 @@ interface HubConnectionStartOptions {
1360
2043
  returnUrl?: string;
1361
2044
  cli?: boolean;
1362
2045
  connectionParameters?: Record<string, string>;
2046
+ /** GitHub accepts the exact read:user, repo, read:org set. */
2047
+ requestedScopes?: readonly string[];
1363
2048
  }
1364
2049
  declare class HubChannelsClient {
1365
2050
  private readonly request;
@@ -1377,6 +2062,7 @@ declare class HubEventSubscriptionsClient {
1377
2062
  }
1378
2063
  declare class HubConnectionsClient {
1379
2064
  private readonly request;
2065
+ readonly inboundWebhook: HubInboundWebhooksClient;
1380
2066
  constructor(request: <TData>(path: string, init: RequestInit) => Promise<TData>);
1381
2067
  list(): Promise<HubConnectionsResponse>;
1382
2068
  /** Connector catalog: every provider the hub can expose, each flagged with
@@ -1389,8 +2075,9 @@ declare class HubConnectionsClient {
1389
2075
  /** Connect a non-OAuth (api-key) connector by submitting the user's key.
1390
2076
  * The server validates the key with a live probe before persisting and
1391
2077
  * returns the created (or reconnected) connection — there is no redirect,
1392
- * unlike `start`. */
1393
- connectApiKey(provider: string, apiKey: string): Promise<HubApiKeyConnectResponse>;
2078
+ * unlike `start`. Cloudbeds requires propertyId metadata and PriceLabs
2079
+ * requires listing ID/PMS pairs; other providers have no metadata. */
2080
+ connectApiKey(provider: string, apiKey: string, metadata?: HubApiKeyConnectRequest["metadata"]): Promise<HubApiKeyConnectResponse>;
1394
2081
  revoke(connectionId: string): Promise<HubConnectionDeleteResponse>;
1395
2082
  health(connectionId: string): Promise<HubConnectionHealthResponse>;
1396
2083
  }
@@ -1809,8 +2496,157 @@ declare function authenticateHubEventRequest(input: AuthenticateHubEventRequestI
1809
2496
  declare function verifyHubEventSignature(input: VerifyHubEventSignatureInput): Promise<HubEventSignatureResult>;
1810
2497
  declare function parseHubEventDelivery(input: string | unknown): HubEventDelivery;
1811
2498
  //#endregion
2499
+ //#region src/line-grants.d.ts
2500
+ interface HubLineGrantBinding {
2501
+ workspaceId: string;
2502
+ workspaceAgentId: string;
2503
+ }
2504
+ interface HubLineGrant {
2505
+ id: string;
2506
+ lineId: string;
2507
+ connectionId: string;
2508
+ workspaceId: string;
2509
+ workspaceAgentId: string;
2510
+ agentProfileVersion: string;
2511
+ backendSha256: string;
2512
+ attachmentId: string | null;
2513
+ intakeMode: "guests" | "owner_only";
2514
+ /** "application" grants select the app's callback for the owner member instead of attaching. */
2515
+ execution: "backend" | "application";
2516
+ applicationOrigin: string | null;
2517
+ priorAttachmentId: string | null;
2518
+ priorAttachmentActive: boolean;
2519
+ monthlyBudgetUsd: number;
2520
+ monthlySpentUsd: number;
2521
+ }
2522
+ interface HubLineGrantLine {
2523
+ id: string;
2524
+ connectionId: string;
2525
+ transport: "sms" | "imessage";
2526
+ status: string;
2527
+ address: string | null;
2528
+ attachment: {
2529
+ id: string;
2530
+ sandboxId: string;
2531
+ status: string;
2532
+ } | null;
2533
+ }
2534
+ interface HubLineGrantAttachInput {
2535
+ workspaceAgentId: string;
2536
+ agentProfileVersion: string;
2537
+ renewalCode?: string;
2538
+ respond: {
2539
+ kind: "agent";
2540
+ backend: Record<string, unknown>;
2541
+ };
2542
+ }
2543
+ interface HubLineGrantAttachment {
2544
+ id: string;
2545
+ sandboxId: string;
2546
+ status: string;
2547
+ members?: Array<{
2548
+ id: string;
2549
+ role: string;
2550
+ }>;
2551
+ }
2552
+ interface HubLineGrantThread {
2553
+ id: string;
2554
+ lineId: string;
2555
+ attachmentId: string;
2556
+ }
2557
+ interface HubLineGrantMessage {
2558
+ id: string;
2559
+ threadId: string;
2560
+ direction: string;
2561
+ text: string | null;
2562
+ }
2563
+ /** The consented owner member on the owner's current attachment. */
2564
+ interface HubLineGrantMemberApplication {
2565
+ lineId: string;
2566
+ attachmentId: string;
2567
+ memberId: string;
2568
+ subjectId: string;
2569
+ /** Pass back unchanged as `expectedMemberRevision`. */
2570
+ memberRevision: string;
2571
+ /** False until the owner has texted the line and Hub recorded consent. */
2572
+ eligible: boolean;
2573
+ /** Hub-derived; every callback for this grant carries it. */
2574
+ binding: string;
2575
+ selection: {
2576
+ id: string; /** True when this grant's callback is the selected application. */
2577
+ own: boolean;
2578
+ /**
2579
+ * Hub's name for the app that answers the owner's texts, shown to the
2580
+ * owner in every app they consented on this line: a registered app's
2581
+ * name, or "Another app" when Hub has none. Absent before Platform named
2582
+ * selection holders.
2583
+ */
2584
+ app?: {
2585
+ name: string;
2586
+ }; /** When the current app started answering. */
2587
+ selectedAt?: string; /** This app's own callback; never returned for another app. */
2588
+ url?: string;
2589
+ createdAt?: string;
2590
+ } | null;
2591
+ }
2592
+ interface HubLineGrantSelectApplicationInput {
2593
+ /** The current selection exactly as read. */
2594
+ expectedSelectionId: string | null;
2595
+ /**
2596
+ * Set only when the owner chose to move their texts here from the app shown
2597
+ * in `selection.app`: that selection's id, also passed as
2598
+ * `expectedSelectionId`. Without it Hub never replaces another app.
2599
+ */
2600
+ replaceSelectionId?: string;
2601
+ expectedMemberRevision: string;
2602
+ /** HTTPS callback on the owner-approved application origin. */
2603
+ url: string;
2604
+ /** Bearer Hub sends to the callback; 32-512 printable ASCII characters. */
2605
+ secret: string;
2606
+ }
2607
+ interface HubLineGrantApplicationSelection {
2608
+ id: string;
2609
+ lineId: string;
2610
+ attachmentId: string;
2611
+ memberId: string;
2612
+ subjectId: string;
2613
+ status: string;
2614
+ application: {
2615
+ url: string;
2616
+ binding: string;
2617
+ };
2618
+ createdAt: string;
2619
+ revokedAt: string | null;
2620
+ }
2621
+ /** Every call uses HubTransport's authHeaders, so one-use app broker tokens can be minted per request. */
2622
+ declare class HubLineGrantsClient extends HubTransport {
2623
+ current(binding: HubLineGrantBinding): Promise<HubLineGrant>;
2624
+ line(binding: HubLineGrantBinding): Promise<HubLineGrantLine>;
2625
+ attach(binding: HubLineGrantBinding, input: HubLineGrantAttachInput): Promise<HubLineGrantAttachment>;
2626
+ detach(binding: HubLineGrantBinding): Promise<{
2627
+ detached: boolean;
2628
+ }>;
2629
+ threads(binding: HubLineGrantBinding): Promise<HubLineGrantThread[]>;
2630
+ messages(binding: HubLineGrantBinding, threadId: string): Promise<HubLineGrantMessage[]>;
2631
+ memberApplication(binding: HubLineGrantBinding): Promise<HubLineGrantMemberApplication>;
2632
+ /**
2633
+ * Route the owner's texts to this app's callback; the incumbent attachment
2634
+ * stays. `replaceSelectionId` moves them from another app on the owner's
2635
+ * explicit choice.
2636
+ */
2637
+ selectApplication(binding: HubLineGrantBinding, input: HubLineGrantSelectApplicationInput): Promise<HubLineGrantApplicationSelection>;
2638
+ /** Return the owner's texts to the incumbent attachment. */
2639
+ clearApplication(binding: HubLineGrantBinding, input: {
2640
+ expectedSelectionId: string;
2641
+ expectedMemberRevision: string;
2642
+ }): Promise<void>;
2643
+ revoke(binding: HubLineGrantBinding): Promise<{
2644
+ revoked: boolean;
2645
+ }>;
2646
+ }
2647
+ //#endregion
1812
2648
  //#region src/redaction.d.ts
1813
2649
  declare function redactHubValue(value: unknown): unknown;
1814
2650
  //#endregion
1815
- export { type AuthenticateHubEventRequestInput, type DeriveHubEventCallbackSecretInput, HUB_API_KEY_ENV_VAR, HUB_CAPABILITY_TOKEN_ENV_VAR, HUB_URL_ENV_VAR, type HubAgentIterationSpan, type HubAgentRunDetail, type HubApiKeyConnectRequest, type HubApiKeyConnectResponse, type HubApproval, type HubApprovalCapabilityToken, type HubApprovalDecisionResponse, type HubApprovalStatus, HubApprovalsClient, HubAuditClient, type HubAuditEvent, type HubAuditListRequest, type HubAuditResponse, type HubAuthHeaders, type HubCapabilityToken, type HubChannel, type HubChannelCreateResponse, type HubChannelDeleteResponse, HubChannelsClient, type HubChannelsResponse, HubClient, type HubClientFromEnvOptions, type HubClientOptions, type HubConnection, type HubConnectionDeleteRequest, type HubConnectionDeleteResponse, type HubConnectionHealthError, type HubConnectionHealthInfo, type HubConnectionHealthRequest, type HubConnectionHealthResponse, type HubConnectionHealthStatus, type HubConnectionStartOptions, HubConnectionsClient, type HubConnectionsResponse, type HubEmailChannel, type HubEmailChannelCreateRequest, type HubEnv, type HubEnvelope, type HubErrorBody, type HubErrorCode, type HubErrorEnvelope, type HubEventCondition, type HubEventConditionScalar, type HubEventDelivery, HubEventDeliveryError, type HubEventRequestFailureCode, type HubEventRequestResult, type HubEventSignatureFailure, type HubEventSignatureResult, type HubEventSubscription, type HubEventSubscriptionCallback, type HubEventSubscriptionCreateRequest, type HubEventSubscriptionCreateResponse, type HubEventSubscriptionDeleteResponse, type HubEventSubscriptionFilter, type HubEventSubscriptionSource, HubEventSubscriptionsClient, type HubEventSubscriptionsResponse, type HubExecRequest, type HubExecResponse, HubGithubAppClient, type HubGithubAppDisconnectResponse, type HubGithubAppInstallation, type HubGithubAppInstallationResponse, type HubGithubAppIsRepoInstalledRequest, type HubGithubAppIsRepoInstalledResponse, type HubGithubAppListInstallationsResponse, type HubGithubAppListReposResponse, type HubGithubAppManagedInstallation, type HubGithubAppMintInstallationTokenRequest, type HubGithubAppMintInstallationTokenResponse, type HubGithubAppSyncResponse, type HubGithubAppSyncedInstallation, type HubManualRunInput, type HubOAuthCallbackErrorQuery, type HubOAuthCallbackQuery, type HubOAuthCallbackResponse, type HubOAuthCallbackSuccessQuery, type HubOAuthConnectionParameter, type HubOAuthStartRequest, type HubOAuthStartResponse, HubPermissionsClient, type HubPolicy, type HubPolicyDecision, type HubPolicyDeleteRequest, type HubPolicyDeleteResponse, type HubPolicyListRequest, type HubPolicyListResponse, type HubPolicyResponse, type HubPolicyUpdateRequest, type HubPrincipal, type HubPrincipalKind, type HubProvider, type HubProviderAuthKind, type HubProviderEvent, type HubProvidersResponse, HubSdkError, type HubStatusConnections, type HubStatusResponse, type HubSuccessEnvelope, type HubTokenListOptions, type HubTokenMintRequest, type HubTokenMintResponse, type HubTokenRevokeResponse, HubTokensClient, type HubTokensListResponse, type HubTool, type HubToolInvokeOptions, type HubToolRisk, type HubToolSearchOptions, type HubToolSource, type HubToolSourcesResponse, HubToolsClient, type HubToolsDescribeRequest, type HubToolsDescribeResponse, type HubToolsSearchRequest, type HubToolsSearchResponse, type HubUnimplementedErrorEnvelope, type HubWhatsappEmbeddedSignupCompleteRequest, type HubWhatsappEmbeddedSignupCompleteResponse, type HubWhatsappEmbeddedSignupStartRequest, type HubWhatsappEmbeddedSignupStartResponse, type HubWorkflow, type HubWorkflowAction, type HubWorkflowActionResult, type HubWorkflowAgentStep, type HubWorkflowArtifact, type HubWorkflowArtifactDownload, type HubWorkflowArtifactRef, type HubWorkflowArtifactsResponse, type HubWorkflowCondition, type HubWorkflowConditionOp, type HubWorkflowConditionScalar, type HubWorkflowConnectionRequirement, type HubWorkflowDecision, type HubWorkflowDecisionOnTimeout, type HubWorkflowDecisionResolveResult, type HubWorkflowDecisionResolvedVia, type HubWorkflowDecisionStatus, type HubWorkflowDistillationCandidate, type HubWorkflowEdgeVerdicts, type HubWorkflowEventFilter, type HubWorkflowFailureCluster, type HubWorkflowFleetEntry, type HubWorkflowFleetInsights, type HubWorkflowFleetWindow, type HubWorkflowGraphEdge, type HubWorkflowGraphJoinRule, type HubWorkflowGraphNode, type HubWorkflowGraphSpec, type HubWorkflowHealth, type HubWorkflowHookEndpoint, type HubWorkflowHookToken, type HubWorkflowKvDeleteResponse, type HubWorkflowKvEntry, type HubWorkflowKvEntryMeta, type HubWorkflowKvListResponse, type HubWorkflowNodeHealth, type HubWorkflowOnErrorOutcome, type HubWorkflowPendingDecision, type HubWorkflowPendingDecisionsResponse, type HubWorkflowProposal, type HubWorkflowProposalInput, type HubWorkflowRevision, type HubWorkflowRevisionMeta, type HubWorkflowRevisionSource, type HubWorkflowRevisionStatus, type HubWorkflowRun, type HubWorkflowRunCancelResult, type HubWorkflowRunDetail, type HubWorkflowRunEnqueued, type HubWorkflowRunInputs, type HubWorkflowRunRetried, type HubWorkflowRunStatus, type HubWorkflowRunStepsPage, type HubWorkflowRunStreamEvent, type HubWorkflowRunSummary, type HubWorkflowRunsPage, type HubWorkflowSchemaResponse, type HubWorkflowTemplate, type HubWorkflowTemplateCategory, type HubWorkflowTemplateInstantiateResult, type HubWorkflowTemplateParameter, type HubWorkflowTrigger, type HubWorkflowValidateResponse, type HubWorkflowValidationError, HubWorkflowsClient, type VerifyHubEventSignatureInput, authenticateHubEventRequest, deriveHubEventCallbackSecret, parseHubEventDelivery, redactHubValue, resolveHubAuth, resolveHubBaseUrl, verifyHubEventSignature };
2651
+ export { type AuthenticateHubEventRequestInput, type DeriveHubEventCallbackSecretInput, HUB_API_KEY_ENV_VAR, HUB_CAPABILITY_TOKEN_ENV_VAR, HUB_URL_ENV_VAR, type HubAgentIterationSpan, type HubAgentRunDetail, type HubAllowanceDecision, type HubAllowanceGrant, type HubAllowancePlan, type HubAllowancePlanInput, type HubAllowanceRole, type HubAllowanceSubject, type HubAllowanceSyncInput, type HubAllowanceSyncReceipt, type HubAllowanceTier, type HubAllowanceUsage, HubAllowancesClient, type HubApiKeyConnectRequest, type HubApiKeyConnectResponse, type HubApiKeyConnectionMetadata, type HubApp, HubAppBrokerClient, type HubAppBrokerExchange, type HubAppBrokerOptions, type HubAppBrokerToken, type HubAppCreateInput, type HubAppGrant, type HubAppGrantRevoked, type HubApproval, type HubApprovalCapabilityToken, type HubApprovalDecisionResponse, type HubApprovalStatus, HubApprovalsClient, HubAppsClient, HubAuditClient, type HubAuditEvent, type HubAuditListRequest, type HubAuditResponse, type HubAuthHeaders, type HubCapabilityToken, type HubChannel, type HubChannelCreateResponse, type HubChannelDeleteResponse, HubChannelsClient, type HubChannelsResponse, HubClient, type HubClientFromEnvOptions, type HubClientOptions, type HubConnection, type HubConnectionDeleteRequest, type HubConnectionDeleteResponse, type HubConnectionHealthError, type HubConnectionHealthInfo, type HubConnectionHealthRequest, type HubConnectionHealthResponse, type HubConnectionHealthStatus, type HubConnectionStartOptions, HubConnectionsClient, type HubConnectionsResponse, type HubEmailChannel, type HubEmailChannelCreateRequest, type HubEnv, type HubEnvelope, type HubErrorBody, type HubErrorCode, type HubErrorEnvelope, type HubEventCondition, type HubEventConditionScalar, type HubEventDelivery, HubEventDeliveryError, type HubEventRequestFailureCode, type HubEventRequestResult, type HubEventSignatureFailure, type HubEventSignatureResult, type HubEventSubscription, type HubEventSubscriptionCallback, type HubEventSubscriptionCreateRequest, type HubEventSubscriptionCreateResponse, type HubEventSubscriptionDeleteResponse, type HubEventSubscriptionFilter, type HubEventSubscriptionSource, HubEventSubscriptionsClient, type HubEventSubscriptionsResponse, type HubExecRequest, type HubExecResponse, HubGithubAppClient, type HubGithubAppDisconnectResponse, type HubGithubAppInstallation, type HubGithubAppInstallationResponse, type HubGithubAppIsRepoInstalledRequest, type HubGithubAppIsRepoInstalledResponse, type HubGithubAppListInstallationsResponse, type HubGithubAppListReposResponse, type HubGithubAppManagedInstallation, type HubGithubAppMintInstallationTokenRequest, type HubGithubAppMintInstallationTokenResponse, type HubGithubAppSyncResponse, type HubGithubAppSyncedInstallation, type HubInboundPhoneNumberScope, type HubInboundWebhookCreateOptions, type HubInboundWebhookCreateResponse, type HubInboundWebhookStatus, HubInboundWebhooksClient, HubKnowledgeClient, type HubKnowledgeQueryResult, type HubKnowledgeRetrievalResult, type HubLineApplicationDispatchCurrentInput, type HubLineCheckinOptions, type HubLineContext, type HubLineGrant, type HubLineGrantApplicationSelection, type HubLineGrantAttachInput, type HubLineGrantAttachment, type HubLineGrantBinding, type HubLineGrantLine, type HubLineGrantMemberApplication, type HubLineGrantMessage, type HubLineGrantSelectApplicationInput, type HubLineGrantThread, HubLineGrantsClient, type HubLineMember, type HubLineMemberApplication, type HubLineMemberApplicationInput, type HubLineOwnerSendInput, type HubLineReminderInput, type HubLineReminderReceipt, type HubLineReplyCode, type HubLineReplyCodeInput, type HubLineScheduledSendOptions, type HubLineSendInput, type HubLineSendReceipt, HubLinesClient, HubManagedNumbersClient, type HubManualRunInput, type HubNumberListQuery, type HubNumberOrder, type HubNumberOrderPage, type HubNumberQuote, type HubNumberReadiness, type HubNumberResolution, type HubOAuthCallbackErrorQuery, type HubOAuthCallbackQuery, type HubOAuthCallbackResponse, type HubOAuthCallbackSuccessQuery, type HubOAuthConnectionParameter, type HubOAuthStartRequest, type HubOAuthStartResponse, HubPermissionsClient, type HubPolicy, type HubPolicyDecision, type HubPolicyDeleteRequest, type HubPolicyDeleteResponse, type HubPolicyListRequest, type HubPolicyListResponse, type HubPolicyResponse, type HubPolicyUpdateRequest, type HubPrincipal, type HubPrincipalKind, type HubProvider, type HubProviderAuthKind, type HubProviderEvent, type HubProvidersResponse, HubSdkError, type HubStatusConnections, type HubStatusResponse, type HubSuccessEnvelope, type HubTokenListOptions, type HubTokenMintRequest, type HubTokenMintResponse, type HubTokenRevokeResponse, HubTokensClient, type HubTokensListResponse, type HubTool, type HubToolInvokeOptions, type HubToolRisk, type HubToolSearchOptions, type HubToolSource, type HubToolSourcesResponse, HubToolsClient, type HubToolsDescribeRequest, type HubToolsDescribeResponse, type HubToolsSearchRequest, type HubToolsSearchResponse, type HubUnimplementedErrorEnvelope, type HubWhatsappEmbeddedSignupCompleteRequest, type HubWhatsappEmbeddedSignupCompleteResponse, type HubWhatsappEmbeddedSignupStartRequest, type HubWhatsappEmbeddedSignupStartResponse, type HubWorkflow, type HubWorkflowAction, type HubWorkflowActionResult, type HubWorkflowAgentStep, type HubWorkflowArtifact, type HubWorkflowArtifactDownload, type HubWorkflowArtifactRef, type HubWorkflowArtifactsResponse, type HubWorkflowCondition, type HubWorkflowConditionOp, type HubWorkflowConditionScalar, type HubWorkflowConnectionRequirement, type HubWorkflowDecision, type HubWorkflowDecisionOnTimeout, type HubWorkflowDecisionResolveResult, type HubWorkflowDecisionResolvedVia, type HubWorkflowDecisionStatus, type HubWorkflowDistillationCandidate, type HubWorkflowEdgeVerdicts, type HubWorkflowEventFilter, type HubWorkflowFailureCluster, type HubWorkflowFleetEntry, type HubWorkflowFleetInsights, type HubWorkflowFleetWindow, type HubWorkflowGraphEdge, type HubWorkflowGraphJoinRule, type HubWorkflowGraphNode, type HubWorkflowGraphSpec, type HubWorkflowHealth, type HubWorkflowHookEndpoint, type HubWorkflowHookToken, type HubWorkflowKvDeleteResponse, type HubWorkflowKvEntry, type HubWorkflowKvEntryMeta, type HubWorkflowKvListResponse, type HubWorkflowNodeHealth, type HubWorkflowOnErrorOutcome, type HubWorkflowPendingDecision, type HubWorkflowPendingDecisionsResponse, type HubWorkflowProposal, type HubWorkflowProposalInput, type HubWorkflowRevision, type HubWorkflowRevisionMeta, type HubWorkflowRevisionSource, type HubWorkflowRevisionStatus, type HubWorkflowRun, type HubWorkflowRunCancelResult, type HubWorkflowRunDetail, type HubWorkflowRunEnqueued, type HubWorkflowRunInputs, type HubWorkflowRunRetried, type HubWorkflowRunStatus, type HubWorkflowRunStepsPage, type HubWorkflowRunStreamEvent, type HubWorkflowRunSummary, type HubWorkflowRunsPage, type HubWorkflowSchemaResponse, type HubWorkflowTemplate, type HubWorkflowTemplateCategory, type HubWorkflowTemplateInstantiateResult, type HubWorkflowTemplateParameter, type HubWorkflowTrigger, type HubWorkflowValidateResponse, type HubWorkflowValidationError, HubWorkflowsClient, type VerifyHubEventSignatureInput, authenticateHubEventRequest, deriveHubEventCallbackSecret, parseHubEventDelivery, redactHubValue, resolveHubAuth, resolveHubBaseUrl, verifyHubEventSignature };
1816
2652
  //# sourceMappingURL=index.d.ts.map