@tangle-network/hub-sdk 0.28.0-develop.20260819071312.197e010 → 0.28.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" | "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 {
@@ -358,9 +580,18 @@ interface HubExecRequest {
358
580
  path: string;
359
581
  input?: unknown;
360
582
  connectionId?: string;
583
+ /** Caller-minted key for this exec. The platform ledger replays the first
584
+ * call's result for a retry that carries the same key, and rejects a key
585
+ * reused for a different request. On the capability-token arm the key only
586
+ * reaches the connector for provider-native dedupe: that arm is at-most-once
587
+ * per token and replays no stored result. */
588
+ idempotencyKey?: string;
361
589
  }
362
590
  interface HubExecResponse<TResult = unknown> {
363
591
  result: TResult;
592
+ /** True when the result was replayed from a previous call with the same
593
+ * idempotency key, so the action did not run again. */
594
+ replayed?: boolean;
364
595
  }
365
596
  interface HubTokenMintRequest {
366
597
  connectionId?: string;
@@ -518,7 +749,7 @@ interface HubGithubAppInstallation {
518
749
  accountType: string | null;
519
750
  /** "all" ⇒ every repo under the account; "selected" ⇒ only repoFullNames. */
520
751
  repositorySelection: "all" | "selected";
521
- /** Lowercased "owner/repo" — empty when repositorySelection = "all". */
752
+ /** Metadata omits names; use githubApp.listRepos(id) for a live caller-safe list. */
522
753
  repoFullNames: string[];
523
754
  suspended: boolean;
524
755
  }
@@ -571,8 +802,10 @@ interface HubGithubAppSyncResponse {
571
802
  }
572
803
  interface HubGithubAppListReposResponse {
573
804
  installationId: number;
574
- /** Lowercased "owner/repo" — covers the full registry view of the install. */
805
+ /** Complete live intersection of App coverage and the caller's GitHub access. */
575
806
  repoFullNames: string[];
807
+ /** True only when both upstream listings completed; failures return an error. */
808
+ complete: true;
576
809
  }
577
810
  interface HubGithubAppIsRepoInstalledRequest {
578
811
  owner: string;
@@ -603,10 +836,14 @@ interface HubWorkflowTrigger {
603
836
  timezone: string | null;
604
837
  nextFireAt: string | null;
605
838
  lastFiredAt: string | null;
839
+ /** Schedule only: the ISO-8601 instant it stops firing; null when unbounded. */
840
+ until: string | null;
606
841
  }
607
842
  interface HubWorkflowValidationError {
608
843
  path: string;
609
844
  message: string;
845
+ /** Machine-readable reason where one is defined, e.g. `schedule_outlives_grant`. */
846
+ code?: string;
610
847
  }
611
848
  type HubWorkflowRunStatus = "queued" | "running" | "waiting" | "succeeded" | "failed" | "cancelled";
612
849
  /** One agent iteration of an `agent.run`, as the single-run detail carries it
@@ -1213,6 +1450,409 @@ interface HubWorkflowRunStepsPage {
1213
1450
  nextCursor: number | null;
1214
1451
  }
1215
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/lines.d.ts
1540
+ interface HubLineMember {
1541
+ id: string;
1542
+ label: string | null;
1543
+ role: string;
1544
+ self?: boolean;
1545
+ consent?: "enabled" | "required";
1546
+ }
1547
+ interface HubLineContext {
1548
+ self: {
1549
+ id: string;
1550
+ label: string | null;
1551
+ role: string;
1552
+ };
1553
+ line: {
1554
+ id: string;
1555
+ label: string | null;
1556
+ transport: string;
1557
+ };
1558
+ members: HubLineMember[];
1559
+ capabilities: Record<string, {
1560
+ allowed: boolean;
1561
+ reason?: string;
1562
+ }>;
1563
+ pendingReminders: Array<{
1564
+ messageId: string;
1565
+ wakeAt?: string;
1566
+ prompt: string | null;
1567
+ }>;
1568
+ quotas: {
1569
+ selfMessagesToday: number;
1570
+ selfMessagesPerDay: number;
1571
+ selfMessagesPending: number;
1572
+ selfMessagesPendingLimit: number;
1573
+ };
1574
+ }
1575
+ interface HubLineSendInput {
1576
+ toMember: string;
1577
+ text: string;
1578
+ notBefore?: string;
1579
+ onBehalfOf?: string;
1580
+ idempotencyKey?: string;
1581
+ }
1582
+ interface HubLineOwnerSendInput {
1583
+ memberId: string;
1584
+ text: string;
1585
+ notBefore?: string;
1586
+ idempotencyKey: string;
1587
+ /** Ask a coded question; the member's reply that starts with `code` returns here. */
1588
+ reply?: HubLineReplyCodeInput;
1589
+ }
1590
+ interface HubLineReplyCodeInput {
1591
+ /** A letter, then up to seven letters or digits, with at least one digit (`F7`). Hub compares it case-insensitively. */
1592
+ code: string;
1593
+ /** 60 to 604800; the window opens when the send first becomes eligible. */
1594
+ ttlSeconds: number;
1595
+ /**
1596
+ * 1 to 20 distinct texted choices, each 1-32 of `a-z 0-9 _ -` after lower-casing.
1597
+ * An answer must then be `<code> <option>[ <note>]`; any other coded text keeps the question open.
1598
+ */
1599
+ options?: string[];
1600
+ }
1601
+ /** The coded question's state on an owner send receipt. */
1602
+ interface HubLineReplyCode {
1603
+ /** Upper case. */
1604
+ code: string;
1605
+ expiresAt: string;
1606
+ /** The first coded answer; `text` is null after content retention ends. */
1607
+ answer: {
1608
+ messageId: string;
1609
+ text: string | null;
1610
+ receivedAt: string; /** The named option, lower case; null when the send listed no options. */
1611
+ option: string | null; /** Words after the option; null when there were none or retention ended. */
1612
+ note: string | null;
1613
+ } | null;
1614
+ }
1615
+ interface HubLineReminderInput {
1616
+ text: string;
1617
+ notBefore: string;
1618
+ idempotencyKey: string;
1619
+ }
1620
+ interface HubLineApplicationDispatchCurrentInput {
1621
+ attachmentId: string;
1622
+ memberId: string;
1623
+ memberRevision: string;
1624
+ senderAddress: string;
1625
+ textSha256: string;
1626
+ binding: string;
1627
+ dispatchFence: string;
1628
+ dispatchDeadline: string;
1629
+ }
1630
+ interface HubLineMemberApplication {
1631
+ id: string;
1632
+ lineId: string;
1633
+ attachmentId: string;
1634
+ memberId: string;
1635
+ subjectId: string;
1636
+ status: "active" | "revoked";
1637
+ application: {
1638
+ url: string;
1639
+ binding: string;
1640
+ };
1641
+ /** Hub's name for the app at this callback; present on reads. */
1642
+ app?: {
1643
+ name: string;
1644
+ };
1645
+ createdAt: string;
1646
+ revokedAt: string | null;
1647
+ }
1648
+ interface HubLineMemberApplicationInput {
1649
+ expectedSelectionId: string | null;
1650
+ expectedMemberRevision: string;
1651
+ subjectId: string;
1652
+ application: {
1653
+ url: string;
1654
+ binding: string;
1655
+ secret: string;
1656
+ };
1657
+ }
1658
+ interface HubLineSendReceipt {
1659
+ message: {
1660
+ id: string;
1661
+ status: string;
1662
+ text: string | null;
1663
+ };
1664
+ eligibleAt: string | null;
1665
+ expiresAt: string;
1666
+ /** Null when the send asked no coded question; absent from Hub before reply codes. */
1667
+ reply?: HubLineReplyCode | null;
1668
+ }
1669
+ interface HubLineReminderReceipt {
1670
+ state: "queued" | "skipped";
1671
+ lineId: string;
1672
+ messageId?: string;
1673
+ sessionId?: string;
1674
+ completion?: string;
1675
+ reason?: string;
1676
+ }
1677
+ interface HubLineScheduledSendOptions {
1678
+ lineId: string;
1679
+ memberId: string;
1680
+ text: string;
1681
+ timezone: string;
1682
+ name?: string;
1683
+ notBefore?: string;
1684
+ /**
1685
+ * RFC 3339 instant the schedule stops at. Required when the calling key
1686
+ * expires, and no later than that expiry: a schedule never outlives the
1687
+ * key that wrote it.
1688
+ */
1689
+ until?: string;
1690
+ }
1691
+ interface HubLineCheckinOptions {
1692
+ lineId: string;
1693
+ member: string;
1694
+ timezone: string;
1695
+ prompt: string;
1696
+ name?: string;
1697
+ /** RFC 3339 instant the schedule stops at; see {@link HubLineScheduledSendOptions.until}. */
1698
+ until?: string;
1699
+ }
1700
+ /** Line calls share HubClient authentication and envelope handling. */
1701
+ declare class HubLinesClient {
1702
+ private readonly request;
1703
+ private readonly createWorkflow;
1704
+ private readonly requestApplicationDispatchCurrent?;
1705
+ readonly members: {
1706
+ list: (lineId: string) => Promise<HubLineMember[]>;
1707
+ };
1708
+ readonly memberApplications: {
1709
+ get: (lineId: string, memberId: string) => Promise<{
1710
+ memberRevision: string;
1711
+ selection: HubLineMemberApplication | null;
1712
+ }>;
1713
+ select: (lineId: string, memberId: string, input: HubLineMemberApplicationInput) => Promise<HubLineMemberApplication>;
1714
+ clear: (lineId: string, memberId: string, input: {
1715
+ expectedSelectionId: string;
1716
+ expectedMemberRevision: string;
1717
+ }) => Promise<void>;
1718
+ };
1719
+ readonly checkins: {
1720
+ schedule: (cron: string, options: HubLineCheckinOptions) => Promise<HubWorkflow>;
1721
+ };
1722
+ constructor(request: <T>(path: string, init: RequestInit) => Promise<T>, createWorkflow: (yaml: string) => Promise<HubWorkflow>, requestApplicationDispatchCurrent?: ((path: string, init: RequestInit, callbackBearer: string) => Promise<{
1723
+ current: boolean;
1724
+ }>) | undefined);
1725
+ scheduleSend(cron: string, options: HubLineScheduledSendOptions): Promise<HubWorkflow>;
1726
+ context(): Promise<HubLineContext>;
1727
+ send(lineId: string, input: HubLineSendInput | HubLineOwnerSendInput): Promise<HubLineSendReceipt>;
1728
+ /** Read an owner send's receipt, including its coded answer. Queued is not delivered. */
1729
+ sentMessage(lineId: string, messageId: string): Promise<HubLineSendReceipt>;
1730
+ remind(lineId: string, input: HubLineReminderInput): Promise<HubLineReminderReceipt>;
1731
+ applicationDispatchCurrent(lineId: string, messageId: string, input: HubLineApplicationDispatchCurrentInput, callbackBearer: string): Promise<boolean>;
1732
+ }
1733
+ //#endregion
1734
+ //#region src/managed-numbers.d.ts
1735
+ interface HubNumberReadiness {
1736
+ configured: boolean;
1737
+ provider: "inkbox";
1738
+ transports: Array<"sms" | "imessage">;
1739
+ billing: "prepaid_activation";
1740
+ automaticRentalBilling: false;
1741
+ deliveryVerified: false;
1742
+ }
1743
+ interface HubNumberQuote {
1744
+ transport: "sms" | "imessage";
1745
+ activationCents: number;
1746
+ currency: "usd";
1747
+ termsVersion: string;
1748
+ terms: string;
1749
+ expiresAt: number;
1750
+ /** The binding the quote was issued for. Absent from older servers. */
1751
+ clientReference?: string;
1752
+ /** Opaque. Pass it back to `create`; never decode it. */
1753
+ token: string;
1754
+ }
1755
+ /** One page of the owner's orders, newest first. */
1756
+ interface HubNumberOrderPage {
1757
+ orders: HubNumberOrder[];
1758
+ /** Present while more orders exist. Older servers omit it and return one
1759
+ * bounded page, so an absent cursor never proves an order does not exist. */
1760
+ nextCursor?: string | null;
1761
+ }
1762
+ interface HubNumberListQuery {
1763
+ /** Only orders requested for this binding, including closed ones. */
1764
+ clientReference?: string;
1765
+ cursor?: string;
1766
+ /** 1 to 100; the server default is 100. */
1767
+ limit?: number;
1768
+ }
1769
+ /** An operator's terminal decision on an order stuck in `needs_review`.
1770
+ * Read-only for a creator: the resolution is made through the platform's
1771
+ * admin surface, never through this client. */
1772
+ interface HubNumberResolution {
1773
+ action: "release" | "settle" | "abandon";
1774
+ operator: string;
1775
+ reason: string;
1776
+ at: number;
1777
+ /** Present while the operator's action is still running. The decision is
1778
+ * not final and the order can still return to review. */
1779
+ pending?: true;
1780
+ /** Present when a `settle` handed a live, unfinished order back to
1781
+ * provisioning, so the order is working again rather than closed. */
1782
+ requeued?: true;
1783
+ }
1784
+ interface HubNumberOrder {
1785
+ id: string;
1786
+ clientReference: string;
1787
+ transport: "sms" | "imessage";
1788
+ status: "pending" | "provider_pending" | "needs_review" | "ready_for_setup" | "cancelled";
1789
+ phase: "identity" | "number" | "credential" | "connection" | "complete";
1790
+ address: string | null;
1791
+ connectionId: string | null;
1792
+ identityId: string | null;
1793
+ providerNumberId: string | null;
1794
+ billingStatus: "unreserved" | "reserved" | "settled" | "released";
1795
+ cancellation: "none" | "requested" | "needs_review" | "released" | "abandoned";
1796
+ errorCode: string | null;
1797
+ nextAttemptAt: number | null;
1798
+ resolution: HubNumberResolution | null;
1799
+ deliveryVerified: false;
1800
+ activationCents: number;
1801
+ currency: "usd";
1802
+ terms: string;
1803
+ }
1804
+ /** Administrative number operations through Hub's authenticated transport.
1805
+ * A mutation is one attempt; an uncertain create reuses its quote and reference. */
1806
+ declare class HubManagedNumbersClient {
1807
+ private readonly request;
1808
+ constructor(request: <T>(path: string, init: RequestInit) => Promise<T>);
1809
+ readiness(): Promise<HubNumberReadiness>;
1810
+ /** One page of orders. Scope by `clientReference` to ask about one binding,
1811
+ * and follow `nextCursor` for the rest; a page is never ownership evidence. */
1812
+ list(query?: HubNumberListQuery): Promise<HubNumberOrderPage>;
1813
+ get(id: string): Promise<{
1814
+ order: HubNumberOrder;
1815
+ }>;
1816
+ quote(input: {
1817
+ transport: "sms" | "imessage";
1818
+ clientReference: string;
1819
+ }): Promise<{
1820
+ quote: HubNumberQuote;
1821
+ }>;
1822
+ /** `clientReference` and `transport`, when given, must match the signed
1823
+ * quote or Hub refuses the purchase with a conflict. */
1824
+ create(input: {
1825
+ quoteToken: string;
1826
+ consent: true;
1827
+ state?: string;
1828
+ clientReference?: string;
1829
+ transport?: "sms" | "imessage";
1830
+ }): Promise<{
1831
+ order: HubNumberOrder;
1832
+ }>;
1833
+ /** Fences references so no order can take them again. Call it as the last
1834
+ * step before retiring the resource they name: a purchase that races the
1835
+ * retirement is then refused (`409 number_reference_fenced`) instead of
1836
+ * binding a line to a resource that is gone. Refused with
1837
+ * `409 number_reference_held` while a live order holds one of them; cancel
1838
+ * it first. A cancelled order no longer holds its reference, so the fence
1839
+ * succeeds as soon as `cancel` returns, whether or not its release is still
1840
+ * pending. Repeating a fence is harmless. */
1841
+ fence(input: {
1842
+ clientReferences: string[];
1843
+ }): Promise<{
1844
+ clientReferences: string[];
1845
+ }>;
1846
+ advance(id: string): Promise<{
1847
+ order: HubNumberOrder;
1848
+ }>;
1849
+ cancel(id: string): Promise<{
1850
+ order: HubNumberOrder;
1851
+ }>;
1852
+ private path;
1853
+ private post;
1854
+ }
1855
+ //#endregion
1216
1856
  //#region src/client.d.ts
1217
1857
  type HubAuthHeaders = () => HeadersInit | Promise<HeadersInit>;
1218
1858
  interface HubClientOptions {
@@ -1241,13 +1881,24 @@ interface HubClientFromEnvOptions {
1241
1881
  }
1242
1882
  declare function resolveHubBaseUrl(env?: HubEnv): string;
1243
1883
  declare function resolveHubAuth(env?: HubEnv): string;
1244
- declare class HubClient {
1884
+ declare class HubTransport {
1245
1885
  readonly baseUrl: string;
1246
1886
  readonly fetch: typeof fetch;
1247
1887
  readonly apiKey?: string;
1248
1888
  readonly authHeaders?: HubAuthHeaders;
1889
+ constructor(options: HubClientOptions);
1890
+ protected request<TData>(path: string, init: RequestInit, options?: {
1891
+ auth?: "client" | "caller";
1892
+ validateData?: (data: unknown) => data is TData;
1893
+ }): Promise<TData>;
1894
+ protected buildHeaders(headers: HeadersInit | undefined, callerAuth?: boolean): Promise<Headers>;
1895
+ }
1896
+ declare class HubClient extends HubTransport {
1897
+ readonly allowances: HubAllowancesClient;
1898
+ readonly apps: HubAppsClient;
1249
1899
  readonly connections: HubConnectionsClient;
1250
1900
  readonly channels: HubChannelsClient;
1901
+ readonly numbers: HubManagedNumbersClient;
1251
1902
  readonly eventSubscriptions: HubEventSubscriptionsClient;
1252
1903
  readonly permissions: HubPermissionsClient;
1253
1904
  readonly tokens: HubTokensClient;
@@ -1256,10 +1907,10 @@ declare class HubClient {
1256
1907
  readonly audit: HubAuditClient;
1257
1908
  readonly githubApp: HubGithubAppClient;
1258
1909
  readonly workflows: HubWorkflowsClient;
1910
+ readonly lines: HubLinesClient;
1259
1911
  constructor(options: HubClientOptions);
1260
1912
  static fromEnv(options?: HubClientFromEnvOptions): HubClient;
1261
1913
  status(): Promise<HubStatusResponse>;
1262
- private request;
1263
1914
  /**
1264
1915
  * Open a streaming (Server-Sent Events) response and return its raw body.
1265
1916
  * Shares auth-header building + `fetch` with {@link request}, but does NOT
@@ -1280,7 +1931,6 @@ declare class HubClient {
1280
1931
  * otherwise an `HUB_HTTP_<status>` transport error.
1281
1932
  */
1282
1933
  private requestBytes;
1283
- private buildHeaders;
1284
1934
  }
1285
1935
  interface HubTokenListOptions {
1286
1936
  includeExpired?: boolean;
@@ -1325,6 +1975,13 @@ interface HubToolSearchOptions {
1325
1975
  interface HubToolInvokeOptions {
1326
1976
  connectionId?: string;
1327
1977
  approve?: boolean;
1978
+ /** Caller-minted key for this invoke. On the direct exec arm the platform
1979
+ * ledger replays the first call's result for a retry that carries the same
1980
+ * key, and refuses a key bound to a different request. The approval and
1981
+ * capability-token retries re-send the key, and the connector receives it
1982
+ * for provider-native dedupe. Capability-token execution stays at-most-once
1983
+ * per token: it refuses a replay instead of replaying a stored result. */
1984
+ idempotencyKey?: string;
1328
1985
  }
1329
1986
  declare class HubToolsClient {
1330
1987
  private readonly request;
@@ -1332,13 +1989,20 @@ declare class HubToolsClient {
1332
1989
  search(query: string, options?: HubToolSearchOptions): Promise<HubToolsSearchResponse>;
1333
1990
  sources(): Promise<HubToolSourcesResponse>;
1334
1991
  describe(path: string): Promise<HubToolsDescribeResponse>;
1335
- invoke<TResult = unknown>(path: string, input: unknown, options?: HubToolInvokeOptions): Promise<HubExecResponse<TResult>>;
1992
+ /**
1993
+ * Run one hub tool. `raw` is the tool input: the SDK forwards it verbatim as
1994
+ * the request body's `input`, and the server validates it against the tool's
1995
+ * own schema, so the client never gives it a shape.
1996
+ */
1997
+ invoke<TResult = unknown>(path: string, raw: unknown, options?: HubToolInvokeOptions): Promise<HubExecResponse<TResult>>;
1336
1998
  private buildExecInit;
1337
1999
  }
1338
2000
  interface HubConnectionStartOptions {
1339
2001
  returnUrl?: string;
1340
2002
  cli?: boolean;
1341
2003
  connectionParameters?: Record<string, string>;
2004
+ /** GitHub accepts the exact read:user, repo, read:org set. */
2005
+ requestedScopes?: readonly string[];
1342
2006
  }
1343
2007
  declare class HubChannelsClient {
1344
2008
  private readonly request;
@@ -1356,6 +2020,7 @@ declare class HubEventSubscriptionsClient {
1356
2020
  }
1357
2021
  declare class HubConnectionsClient {
1358
2022
  private readonly request;
2023
+ readonly inboundWebhook: HubInboundWebhooksClient;
1359
2024
  constructor(request: <TData>(path: string, init: RequestInit) => Promise<TData>);
1360
2025
  list(): Promise<HubConnectionsResponse>;
1361
2026
  /** Connector catalog: every provider the hub can expose, each flagged with
@@ -1368,8 +2033,9 @@ declare class HubConnectionsClient {
1368
2033
  /** Connect a non-OAuth (api-key) connector by submitting the user's key.
1369
2034
  * The server validates the key with a live probe before persisting and
1370
2035
  * returns the created (or reconnected) connection — there is no redirect,
1371
- * unlike `start`. */
1372
- connectApiKey(provider: string, apiKey: string): Promise<HubApiKeyConnectResponse>;
2036
+ * unlike `start`. Cloudbeds requires propertyId metadata and PriceLabs
2037
+ * requires listing ID/PMS pairs; other providers have no metadata. */
2038
+ connectApiKey(provider: string, apiKey: string, metadata?: HubApiKeyConnectRequest["metadata"]): Promise<HubApiKeyConnectResponse>;
1373
2039
  revoke(connectionId: string): Promise<HubConnectionDeleteResponse>;
1374
2040
  health(connectionId: string): Promise<HubConnectionHealthResponse>;
1375
2041
  }
@@ -1651,15 +2317,18 @@ declare class HubWorkflowsClient {
1651
2317
  /**
1652
2318
  * Upsert a key; returns the entry with its NEW version (increments on every
1653
2319
  * write). Throws `HubSdkError(KV_VALUE_TOO_LARGE)` past the 64KiB value cap
1654
- * or `KV_KEY_LIMIT` past the per-workflow key cap.
2320
+ * or `KV_KEY_LIMIT` past the per-workflow key cap. `raw` is the caller's
2321
+ * value, stored and read back verbatim, so the client never gives it a shape.
1655
2322
  */
1656
- putKv(id: string, key: string, value: unknown): Promise<HubWorkflowKvEntry>;
2323
+ putKv(id: string, key: string, raw: unknown): Promise<HubWorkflowKvEntry>;
1657
2324
  /**
1658
2325
  * Compare-and-swap: the write lands only when the stored version still
1659
2326
  * equals `expectedVersion`; otherwise `HubSdkError(KV_VERSION_CONFLICT)`
1660
- * (409) — re-read and retry. Creation is {@link putKv}'s job.
2327
+ * (409) — re-read and retry. Creation is {@link putKv}'s job. `raw` is the
2328
+ * caller's value, stored and read back verbatim, so the client never gives it
2329
+ * a shape.
1661
2330
  */
1662
- casKv(id: string, key: string, expectedVersion: number, value: unknown): Promise<HubWorkflowKvEntry>;
2331
+ casKv(id: string, key: string, expectedVersion: number, raw: unknown): Promise<HubWorkflowKvEntry>;
1663
2332
  /** Delete a key; idempotent — `deleted` reports whether a row was removed. */
1664
2333
  deleteKv(id: string, key: string): Promise<HubWorkflowKvDeleteResponse>;
1665
2334
  /** The curated starter gallery runnable on THIS deployment: metadata,
@@ -1785,8 +2454,157 @@ declare function authenticateHubEventRequest(input: AuthenticateHubEventRequestI
1785
2454
  declare function verifyHubEventSignature(input: VerifyHubEventSignatureInput): Promise<HubEventSignatureResult>;
1786
2455
  declare function parseHubEventDelivery(input: string | unknown): HubEventDelivery;
1787
2456
  //#endregion
2457
+ //#region src/line-grants.d.ts
2458
+ interface HubLineGrantBinding {
2459
+ workspaceId: string;
2460
+ workspaceAgentId: string;
2461
+ }
2462
+ interface HubLineGrant {
2463
+ id: string;
2464
+ lineId: string;
2465
+ connectionId: string;
2466
+ workspaceId: string;
2467
+ workspaceAgentId: string;
2468
+ agentProfileVersion: string;
2469
+ backendSha256: string;
2470
+ attachmentId: string | null;
2471
+ intakeMode: "guests" | "owner_only";
2472
+ /** "application" grants select the app's callback for the owner member instead of attaching. */
2473
+ execution: "backend" | "application";
2474
+ applicationOrigin: string | null;
2475
+ priorAttachmentId: string | null;
2476
+ priorAttachmentActive: boolean;
2477
+ monthlyBudgetUsd: number;
2478
+ monthlySpentUsd: number;
2479
+ }
2480
+ interface HubLineGrantLine {
2481
+ id: string;
2482
+ connectionId: string;
2483
+ transport: "sms" | "imessage";
2484
+ status: string;
2485
+ address: string | null;
2486
+ attachment: {
2487
+ id: string;
2488
+ sandboxId: string;
2489
+ status: string;
2490
+ } | null;
2491
+ }
2492
+ interface HubLineGrantAttachInput {
2493
+ workspaceAgentId: string;
2494
+ agentProfileVersion: string;
2495
+ renewalCode?: string;
2496
+ respond: {
2497
+ kind: "agent";
2498
+ backend: Record<string, unknown>;
2499
+ };
2500
+ }
2501
+ interface HubLineGrantAttachment {
2502
+ id: string;
2503
+ sandboxId: string;
2504
+ status: string;
2505
+ members?: Array<{
2506
+ id: string;
2507
+ role: string;
2508
+ }>;
2509
+ }
2510
+ interface HubLineGrantThread {
2511
+ id: string;
2512
+ lineId: string;
2513
+ attachmentId: string;
2514
+ }
2515
+ interface HubLineGrantMessage {
2516
+ id: string;
2517
+ threadId: string;
2518
+ direction: string;
2519
+ text: string | null;
2520
+ }
2521
+ /** The consented owner member on the owner's current attachment. */
2522
+ interface HubLineGrantMemberApplication {
2523
+ lineId: string;
2524
+ attachmentId: string;
2525
+ memberId: string;
2526
+ subjectId: string;
2527
+ /** Pass back unchanged as `expectedMemberRevision`. */
2528
+ memberRevision: string;
2529
+ /** False until the owner has texted the line and Hub recorded consent. */
2530
+ eligible: boolean;
2531
+ /** Hub-derived; every callback for this grant carries it. */
2532
+ binding: string;
2533
+ selection: {
2534
+ id: string; /** True when this grant's callback is the selected application. */
2535
+ own: boolean;
2536
+ /**
2537
+ * Hub's name for the app that answers the owner's texts, shown to the
2538
+ * owner in every app they consented on this line: a registered app's
2539
+ * name, or "Another app" when Hub has none. Absent before Platform named
2540
+ * selection holders.
2541
+ */
2542
+ app?: {
2543
+ name: string;
2544
+ }; /** When the current app started answering. */
2545
+ selectedAt?: string; /** This app's own callback; never returned for another app. */
2546
+ url?: string;
2547
+ createdAt?: string;
2548
+ } | null;
2549
+ }
2550
+ interface HubLineGrantSelectApplicationInput {
2551
+ /** The current selection exactly as read. */
2552
+ expectedSelectionId: string | null;
2553
+ /**
2554
+ * Set only when the owner chose to move their texts here from the app shown
2555
+ * in `selection.app`: that selection's id, also passed as
2556
+ * `expectedSelectionId`. Without it Hub never replaces another app.
2557
+ */
2558
+ replaceSelectionId?: string;
2559
+ expectedMemberRevision: string;
2560
+ /** HTTPS callback on the owner-approved application origin. */
2561
+ url: string;
2562
+ /** Bearer Hub sends to the callback; 32-512 printable ASCII characters. */
2563
+ secret: string;
2564
+ }
2565
+ interface HubLineGrantApplicationSelection {
2566
+ id: string;
2567
+ lineId: string;
2568
+ attachmentId: string;
2569
+ memberId: string;
2570
+ subjectId: string;
2571
+ status: string;
2572
+ application: {
2573
+ url: string;
2574
+ binding: string;
2575
+ };
2576
+ createdAt: string;
2577
+ revokedAt: string | null;
2578
+ }
2579
+ /** Every call uses HubTransport's authHeaders, so one-use app broker tokens can be minted per request. */
2580
+ declare class HubLineGrantsClient extends HubTransport {
2581
+ current(binding: HubLineGrantBinding): Promise<HubLineGrant>;
2582
+ line(binding: HubLineGrantBinding): Promise<HubLineGrantLine>;
2583
+ attach(binding: HubLineGrantBinding, input: HubLineGrantAttachInput): Promise<HubLineGrantAttachment>;
2584
+ detach(binding: HubLineGrantBinding): Promise<{
2585
+ detached: boolean;
2586
+ }>;
2587
+ threads(binding: HubLineGrantBinding): Promise<HubLineGrantThread[]>;
2588
+ messages(binding: HubLineGrantBinding, threadId: string): Promise<HubLineGrantMessage[]>;
2589
+ memberApplication(binding: HubLineGrantBinding): Promise<HubLineGrantMemberApplication>;
2590
+ /**
2591
+ * Route the owner's texts to this app's callback; the incumbent attachment
2592
+ * stays. `replaceSelectionId` moves them from another app on the owner's
2593
+ * explicit choice.
2594
+ */
2595
+ selectApplication(binding: HubLineGrantBinding, input: HubLineGrantSelectApplicationInput): Promise<HubLineGrantApplicationSelection>;
2596
+ /** Return the owner's texts to the incumbent attachment. */
2597
+ clearApplication(binding: HubLineGrantBinding, input: {
2598
+ expectedSelectionId: string;
2599
+ expectedMemberRevision: string;
2600
+ }): Promise<void>;
2601
+ revoke(binding: HubLineGrantBinding): Promise<{
2602
+ revoked: boolean;
2603
+ }>;
2604
+ }
2605
+ //#endregion
1788
2606
  //#region src/redaction.d.ts
1789
2607
  declare function redactHubValue(value: unknown): unknown;
1790
2608
  //#endregion
1791
- 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 };
2609
+ 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, 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 };
1792
2610
  //# sourceMappingURL=index.d.ts.map