@particle-academy/fancy-connector-core 0.12.0 → 0.14.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.cts CHANGED
@@ -916,6 +916,72 @@ type ConnectorResult<T = unknown> = {
916
916
  declare function registerTransport(next: Transport | null): void;
917
917
  declare function callConnector<T = unknown>(service: ServiceDescriptor, options: CallOptions): Promise<ConnectorResult<T>>;
918
918
 
919
+ /**
920
+ * A read that resumes from a HOST-HELD cursor, and pages.
921
+ *
922
+ * Gmail's push and Drive's channel notifications carry no changes: they say
923
+ * "something moved", and the follow-up read fetches what did, starting from
924
+ * the position the HOST stored last time (Gmail's `startHistoryId`, Drive's
925
+ * `pageToken`). Reading from the delivery's own position instead misses the
926
+ * very change that caused it. The package holds no state: the host stores the
927
+ * cursor, passes it in, and persists `cursor.next` when the run succeeds.
928
+ *
929
+ * The PHP twin is `CursorRead::read`; both read `fixtures/cursor-read/`.
930
+ *
931
+ * The decisions, each pinned by a case:
932
+ *
933
+ * - **`next` comes ONLY from the LAST page.** Gmail's `historyId` is the
934
+ * mailbox's CURRENT one on every page, and Google says to store it only "if
935
+ * you receive no nextPageToken". Taking it after page one would skip every
936
+ * page not yet read, silently.
937
+ * - **Too many pages is refused** (`cursor-overflow`), never a partial read
938
+ * with a cursor that skips the rest. The host's answer is a bounded resync.
939
+ * - **The provider's own "cursor out of range"** (`expiredStatus`, Gmail's
940
+ * 404) is `cursor-expired`; every OTHER failure is rethrown unchanged, so a
941
+ * 500 is never mistaken for a lapse.
942
+ * - **No stored cursor is `cursor-missing`**, and the provider is not called:
943
+ * a read with no starting point is a read from the beginning of time.
944
+ * - `collect` absent is `[]` (Gmail omits `history` when nothing changed); not
945
+ * a list is `bad-page`. The cursor and `next` are strings: history ids are
946
+ * uint64.
947
+ */
948
+ declare const CURSOR_READ_REASONS: readonly ["cursor-missing", "cursor-expired", "cursor-overflow", "bad-page"];
949
+ type CursorReadReason = (typeof CURSOR_READ_REASONS)[number];
950
+ type CursorReadSpec = {
951
+ /** The read's parameter the stored cursor fills (Gmail: `startHistoryId`). */
952
+ param: string;
953
+ /** Where the NEXT cursor is read in the last page's data (Gmail: `historyId`). */
954
+ advanceFrom: string;
955
+ /** Paging, when the read pages (Gmail: `pageToken` / `nextPageToken`, `history`). */
956
+ page?: {
957
+ param: string;
958
+ from: string;
959
+ collect: string;
960
+ maxPages: number;
961
+ };
962
+ /** The status the provider answers for a cursor out of range (Gmail: 404). */
963
+ expiredStatus?: number;
964
+ };
965
+ type CursorReadResult = {
966
+ data: unknown;
967
+ cursor: {
968
+ used: string;
969
+ next: string | null;
970
+ };
971
+ };
972
+ /** Refused BY NAME; `reason` is the same string PHP's exception carries. */
973
+ declare class CursorReadError extends Error {
974
+ readonly reason: CursorReadReason;
975
+ /** The host's bounded resync, when the caller declared one (Gmail: `newer_than:7d`). */
976
+ readonly resyncQuery?: string | undefined;
977
+ constructor(reason: CursorReadReason, message: string,
978
+ /** The host's bounded resync, when the caller declared one (Gmail: `newer_than:7d`). */
979
+ resyncQuery?: string | undefined);
980
+ }
981
+ declare function readWithCursor(spec: CursorReadSpec, cursor: unknown, call: (params: Record<string, string>) => Promise<unknown>, options?: {
982
+ resyncQuery?: string;
983
+ }): Promise<CursorReadResult>;
984
+
919
985
  /**
920
986
  * API drift — being told the provider changed, rather than discovering it.
921
987
  *
@@ -1474,6 +1540,58 @@ declare function idempotencyKeyFor(ctx: unknown, nodeId: string, options?: Idemp
1474
1540
  */
1475
1541
  declare const NO_IDEMPOTENCY_KEY_WARNING: string;
1476
1542
 
1543
+ /**
1544
+ * RS256 JWT verification against keys the HOST supplies.
1545
+ *
1546
+ * Gmail's Pub/Sub push carries an OIDC token, and a Gmail add-on's requests
1547
+ * carry a Google-signed one; both are RS256 JWS compact tokens. This verifies
1548
+ * one. It NEVER fetches a key set: nothing in this package contacts a URL of
1549
+ * its own, so the host fetches and caches the provider's JWKS and passes the
1550
+ * keys in. The PHP twin is `Jwt::verify`, and both runtimes read
1551
+ * `fixtures/jwt/cases.json`, led by RFC 7515 Appendix A.2.
1552
+ *
1553
+ * Every rule fails CLOSED, and each is a known way JWT verification goes wrong:
1554
+ * - RS256 only. `none` and `HS256` are refused BY NAME before anything else;
1555
+ * HS256 keyed with the public key is the classic confusion attack.
1556
+ * - A `kid` must name a supplied key. An unknown kid is refused, never
1557
+ * "try every key".
1558
+ * - `exp` is REQUIRED: a token that never expires is refused. `nbf` is honoured.
1559
+ * Both allow `leeway` seconds of clock skew (default 60).
1560
+ * - The audience is REQUIRED. A caller that deliberately checks none must pass
1561
+ * `audience: null`, so forgetting it cannot happen by omission.
1562
+ * - The issuer is matched when one is given.
1563
+ */
1564
+ /** An RSA public key as a JWKS lists it. Extra members are ignored. */
1565
+ type Jwk = {
1566
+ kty: string;
1567
+ n?: string;
1568
+ e?: string;
1569
+ kid?: string;
1570
+ alg?: string;
1571
+ use?: string;
1572
+ };
1573
+ type JwtVerification = {
1574
+ ok: true;
1575
+ header: Record<string, unknown>;
1576
+ claims: Record<string, unknown>;
1577
+ } | {
1578
+ ok: false;
1579
+ reason: string;
1580
+ };
1581
+ type VerifyJwtOptions = {
1582
+ keys: readonly Jwk[];
1583
+ /** REQUIRED: the expected `aud` (any of a list), or `null` to check none ON PURPOSE. */
1584
+ audience: string | readonly string[] | null;
1585
+ issuer?: string | readonly string[];
1586
+ /** Seconds since the epoch. Injected so tests are not clock-dependent. */
1587
+ now?: number;
1588
+ /** Allowed clock skew for exp and nbf, in seconds. */
1589
+ leeway?: number;
1590
+ };
1591
+ /** The algorithms accepted. Closed, and shipped as data. */
1592
+ declare const JWT_ALGORITHMS: readonly ["RS256"];
1593
+ declare function verifyJwt(token: string, options: VerifyJwtOptions): Promise<JwtVerification>;
1594
+
1477
1595
  /**
1478
1596
  * A subscription that EXPIRES, and when the host must act on it.
1479
1597
  *
@@ -2319,105 +2437,15 @@ declare function decodeFormFieldJson(raw: Uint8Array | string, field: string): u
2319
2437
  * then calls `decodeDelivery` with the declaration, then starts the run.
2320
2438
  * Shipped as data too, for a host mirroring the union across a JSON boundary.
2321
2439
  */
2322
- declare const DELIVERY_DECODE_KINDS: readonly ["form-field-json"];
2440
+ declare const DELIVERY_DECODE_KINDS: readonly ["form-field-json", "pubsub-push"];
2323
2441
  type DeliveryDecode = {
2324
- kind: (typeof DELIVERY_DECODE_KINDS)[number];
2442
+ kind: "form-field-json";
2325
2443
  field: string;
2444
+ } | {
2445
+ kind: "pubsub-push";
2326
2446
  };
2327
2447
  declare function decodeDelivery(decode: DeliveryDecode, raw: Uint8Array | string): unknown;
2328
2448
 
2329
- /**
2330
- * Dry-verify — proving the transport with a credential that cannot work.
2331
- *
2332
- * ## The discipline, and why it beats a fake server
2333
- *
2334
- * A connector written from documentation can be wrong in three ways that look
2335
- * identical until a real credential arrives:
2336
- *
2337
- * 1. the URL is wrong,
2338
- * 2. the request shape is wrong,
2339
- * 3. the error handling never runs.
2340
- *
2341
- * **All three are invisible to a test with a fake server**, because a fake
2342
- * server agrees with whatever the code does. That is the single most important
2343
- * thing this module encodes: a green unit suite against a mock proves the code
2344
- * is consistent with itself.
2345
- *
2346
- * So a probe calls the REAL API with a deliberately invalid credential and
2347
- * requires an **auth-shaped refusal**. That proves the host resolved, the path
2348
- * exists, the method was accepted, and a failure was recognised as a failure.
2349
- *
2350
- * ## What counts as a pass, precisely
2351
- *
2352
- * An auth-shaped refusal is `401`, `403`, or a `404` on a provider that answers
2353
- * 404 for an unknown credential-in-the-path (a Discord webhook does exactly
2354
- * this). The provider declares which, because guessing here would let a genuine
2355
- * "this endpoint moved" 404 read as success — the one outcome a probe exists to
2356
- * catch.
2357
- *
2358
- * ## Offline is SKIPPED, never failed
2359
- *
2360
- * A check that goes red on a train gets ignored, and then it is worth nothing
2361
- * when it goes red for real. Unreachable is reported as skipped with the reason,
2362
- * and the assertions that need no network still run.
2363
- *
2364
- * ## And nothing is ever sent
2365
- *
2366
- * Every probe is a READ. A probe that wrote something would be a send, and sends
2367
- * are the host's to gate.
2368
- */
2369
-
2370
- type ProbeOutcome = "pass" | "fail" | "skip";
2371
- type ProbeResult = {
2372
- connector: string;
2373
- outcome: ProbeOutcome;
2374
- /** What happened, in the provider's own words where possible. */
2375
- detail: string;
2376
- status?: number;
2377
- kind?: FailureKind;
2378
- };
2379
- type ProbeSpec = {
2380
- /** Which connector this probes. */
2381
- connector: string;
2382
- /**
2383
- * The read-only request, fully formed, carrying a credential that cannot be
2384
- * valid. Built by the connector so the probe exercises the connector's own URL
2385
- * and auth placement rather than a second copy of them.
2386
- */
2387
- request: () => Promise<{
2388
- status: number;
2389
- body: string;
2390
- }>;
2391
- /**
2392
- * Statuses that count as an auth-shaped refusal for THIS provider.
2393
- *
2394
- * Declared rather than assumed. Discord answers `404` for an unknown webhook
2395
- * id, and on a provider that does not, a 404 means the endpoint moved — the
2396
- * exact drift a probe is for.
2397
- */
2398
- authStatuses: number[];
2399
- /** Why those statuses, for whoever reads a failure at 3am. */
2400
- why: string;
2401
- };
2402
- /**
2403
- * Run one probe.
2404
- *
2405
- * Never throws. A probe that threw would take the suite down with it, and the
2406
- * suite's whole value is that it runs everywhere including on a laptop with no
2407
- * network.
2408
- */
2409
- declare function probe(spec: ProbeSpec): Promise<ProbeResult>;
2410
- type ProbeReport = {
2411
- results: ProbeResult[];
2412
- passed: number;
2413
- failed: number;
2414
- skipped: number;
2415
- /** True when nothing failed. Skips do not fail a report. */
2416
- ok: boolean;
2417
- };
2418
- /** Run a set of probes and summarise. Sequential: probes hit real providers. */
2419
- declare function runProbes(specs: ProbeSpec[]): Promise<ProbeReport>;
2420
-
2421
2449
  /**
2422
2450
  * Verifying an inbound provider webhook.
2423
2451
  *
@@ -2633,6 +2661,195 @@ declare function handshakeResponse(handshake: ChallengeHandshake | undefined, qu
2633
2661
  */
2634
2662
  declare function header(headers: Record<string, string | string[] | undefined>, name: string): string | undefined;
2635
2663
 
2664
+ /**
2665
+ * A delivery authenticated by an OIDC BEARER TOKEN rather than a signature over
2666
+ * its body: Google Cloud Pub/Sub push, which carries Gmail's `users.watch`
2667
+ * notifications, sends `Authorization: Bearer <JWT>` signed by Google.
2668
+ *
2669
+ * The PHP twin is `OidcDelivery::verify`; both read
2670
+ * `fixtures/oidc-delivery/cases.json`. The token itself is checked by
2671
+ * `verifyJwt`, so every JWT rule there applies here unchanged.
2672
+ *
2673
+ * What this adds, and why each piece fails closed:
2674
+ *
2675
+ * - **The audience is REQUIRED.** Google signs a token for any push
2676
+ * subscription anyone creates; without the audience, every Google-signed
2677
+ * token in the world verifies.
2678
+ * - **The principal is REQUIRED, and it is the check people skip.** A
2679
+ * stranger can create a push subscription in their OWN project, aimed at
2680
+ * your public URL, with your URL as its audience: Google signs that token
2681
+ * correctly. Only the service account (`email`) says it was yours.
2682
+ * Its verified flag (`email_verified`) must be the literal `true`.
2683
+ * - **The keys are the host's.** Nothing here fetches Google's JWKS: the host
2684
+ * fetches and caches it and passes the keys in.
2685
+ *
2686
+ * A host's own configuration is checked before the delivery is read, so a
2687
+ * misconfigured trigger refuses every push rather than accepting any of them.
2688
+ */
2689
+
2690
+ declare const OIDC_JWT_SCHEME_KIND: "oidc-jwt";
2691
+ type OidcJwtScheme = {
2692
+ kind: typeof OIDC_JWT_SCHEME_KIND;
2693
+ /** The header carrying `Bearer <token>`. */
2694
+ header: string;
2695
+ /** Accepted `iss` values. Google documents two spellings. */
2696
+ issuers: readonly string[];
2697
+ /** The claim naming WHO the token was minted for: Google push uses `email`. */
2698
+ principalClaim: string;
2699
+ /** A claim that must be the literal `true` beside it: `email_verified`. */
2700
+ verifiedClaim?: string;
2701
+ };
2702
+ /** What the HOST configured for this trigger. Never in the package. */
2703
+ type OidcExpectation = {
2704
+ keys: readonly Jwk[];
2705
+ /** The audience the subscription was created with. */
2706
+ audience: string | null;
2707
+ /** The service account the subscription pushes as. */
2708
+ principal: string | null;
2709
+ };
2710
+ declare function isOidcJwtScheme(scheme: unknown): scheme is OidcJwtScheme;
2711
+ declare function verifyOidcDelivery(options: {
2712
+ headers: Record<string, string | string[] | undefined>;
2713
+ scheme: OidcJwtScheme;
2714
+ expected: OidcExpectation | undefined;
2715
+ /** Seconds since the epoch. */
2716
+ now?: number;
2717
+ }): Promise<WebhookVerification>;
2718
+
2719
+ /**
2720
+ * Dry-verify — proving the transport with a credential that cannot work.
2721
+ *
2722
+ * ## The discipline, and why it beats a fake server
2723
+ *
2724
+ * A connector written from documentation can be wrong in three ways that look
2725
+ * identical until a real credential arrives:
2726
+ *
2727
+ * 1. the URL is wrong,
2728
+ * 2. the request shape is wrong,
2729
+ * 3. the error handling never runs.
2730
+ *
2731
+ * **All three are invisible to a test with a fake server**, because a fake
2732
+ * server agrees with whatever the code does. That is the single most important
2733
+ * thing this module encodes: a green unit suite against a mock proves the code
2734
+ * is consistent with itself.
2735
+ *
2736
+ * So a probe calls the REAL API with a deliberately invalid credential and
2737
+ * requires an **auth-shaped refusal**. That proves the host resolved, the path
2738
+ * exists, the method was accepted, and a failure was recognised as a failure.
2739
+ *
2740
+ * ## What counts as a pass, precisely
2741
+ *
2742
+ * An auth-shaped refusal is `401`, `403`, or a `404` on a provider that answers
2743
+ * 404 for an unknown credential-in-the-path (a Discord webhook does exactly
2744
+ * this). The provider declares which, because guessing here would let a genuine
2745
+ * "this endpoint moved" 404 read as success — the one outcome a probe exists to
2746
+ * catch.
2747
+ *
2748
+ * ## Offline is SKIPPED, never failed
2749
+ *
2750
+ * A check that goes red on a train gets ignored, and then it is worth nothing
2751
+ * when it goes red for real. Unreachable is reported as skipped with the reason,
2752
+ * and the assertions that need no network still run.
2753
+ *
2754
+ * ## And nothing is ever sent
2755
+ *
2756
+ * Every probe is a READ. A probe that wrote something would be a send, and sends
2757
+ * are the host's to gate.
2758
+ */
2759
+
2760
+ type ProbeOutcome = "pass" | "fail" | "skip";
2761
+ type ProbeResult = {
2762
+ connector: string;
2763
+ outcome: ProbeOutcome;
2764
+ /** What happened, in the provider's own words where possible. */
2765
+ detail: string;
2766
+ status?: number;
2767
+ kind?: FailureKind;
2768
+ };
2769
+ type ProbeSpec = {
2770
+ /** Which connector this probes. */
2771
+ connector: string;
2772
+ /**
2773
+ * The read-only request, fully formed, carrying a credential that cannot be
2774
+ * valid. Built by the connector so the probe exercises the connector's own URL
2775
+ * and auth placement rather than a second copy of them.
2776
+ */
2777
+ request: () => Promise<{
2778
+ status: number;
2779
+ body: string;
2780
+ }>;
2781
+ /**
2782
+ * Statuses that count as an auth-shaped refusal for THIS provider.
2783
+ *
2784
+ * Declared rather than assumed. Discord answers `404` for an unknown webhook
2785
+ * id, and on a provider that does not, a 404 means the endpoint moved — the
2786
+ * exact drift a probe is for.
2787
+ */
2788
+ authStatuses: number[];
2789
+ /** Why those statuses, for whoever reads a failure at 3am. */
2790
+ why: string;
2791
+ };
2792
+ /**
2793
+ * Run one probe.
2794
+ *
2795
+ * Never throws. A probe that threw would take the suite down with it, and the
2796
+ * suite's whole value is that it runs everywhere including on a laptop with no
2797
+ * network.
2798
+ */
2799
+ declare function probe(spec: ProbeSpec): Promise<ProbeResult>;
2800
+ type ProbeReport = {
2801
+ results: ProbeResult[];
2802
+ passed: number;
2803
+ failed: number;
2804
+ skipped: number;
2805
+ /** True when nothing failed. Skips do not fail a report. */
2806
+ ok: boolean;
2807
+ };
2808
+ /** Run a set of probes and summarise. Sequential: probes hit real providers. */
2809
+ declare function runProbes(specs: ProbeSpec[]): Promise<ProbeReport>;
2810
+
2811
+ /**
2812
+ * A Google Cloud Pub/Sub PUSH body, decoded to the message it carries: the
2813
+ * payload TRANSFORM Gmail's `users.watch` notifications need. Pub/Sub wraps
2814
+ * each message in an envelope and base64-encodes its `data`.
2815
+ *
2816
+ * ONE implementation in two runtimes (`php/src/PubSubPush.php` is the twin),
2817
+ * held to the authored corpus under `fixtures/pubsub-push/`, whose README
2818
+ * names the decision each case pins. It runs AFTER verification: a push is
2819
+ * authenticated by the OIDC token in its `Authorization` header, not by
2820
+ * anything in the body.
2821
+ *
2822
+ * The decisions:
2823
+ *
2824
+ * - `data` may be standard base64 or base64url, padded or not. The Gmail guide
2825
+ * says one, Pub/Sub's page the other. Anything outside both alphabets, and
2826
+ * bytes that are not UTF-8, are `bad-encoding`.
2827
+ * - `data` is parsed as JSON, and text that is not JSON is `data-not-json`,
2828
+ * never the raw string.
2829
+ * - `messageId` / `publishTime` are read camelCase first, snake_case second:
2830
+ * Google sends both spellings.
2831
+ * - Absent `attributes` is `{}` (Pub/Sub omits an empty map); absent
2832
+ * `deliveryAttempt` is `null` (it is only sent under a dead-letter policy,
2833
+ * and an attempt count nobody reported is not attempt one).
2834
+ */
2835
+ declare const PUBSUB_PUSH_REASONS: readonly ["not-json", "missing-message", "missing-data", "bad-encoding", "data-not-json"];
2836
+ type PubSubPushReason = (typeof PUBSUB_PUSH_REASONS)[number];
2837
+ /** Refused BY NAME; `reason` is the same string PHP's exception carries. */
2838
+ declare class PubSubPushError extends Error {
2839
+ readonly reason: PubSubPushReason;
2840
+ constructor(reason: PubSubPushReason, message: string);
2841
+ }
2842
+ type PubSubPushMessage = {
2843
+ subscription: string | null;
2844
+ messageId: string | null;
2845
+ publishTime: string | null;
2846
+ attributes: Record<string, string>;
2847
+ deliveryAttempt: number | null;
2848
+ /** The message's `data`, base64-decoded and parsed as JSON. */
2849
+ data: unknown;
2850
+ };
2851
+ declare function decodePubSubPush(raw: Uint8Array | string): PubSubPushMessage;
2852
+
2636
2853
  /**
2637
2854
  * How a connector trigger learns that something happened.
2638
2855
  *
@@ -2746,7 +2963,16 @@ type SharedTokenVerificationSpec = {
2746
2963
  /** A challenge the provider makes before it will deliver anything. */
2747
2964
  handshake?: ChallengeHandshake;
2748
2965
  };
2749
- type WebhookVerificationSpec = HmacVerificationSpec | SharedTokenVerificationSpec;
2966
+ /**
2967
+ * The provider sends a BEARER TOKEN it signed (Google Cloud Pub/Sub push). The
2968
+ * keys, audience and principal it is checked against are the HOST's, passed
2969
+ * to `verifyDelivery` as an `OidcExpectation`. See `verifyOidcDelivery`.
2970
+ */
2971
+ type OidcJwtVerificationSpec = {
2972
+ scheme: OidcJwtScheme;
2973
+ };
2974
+ type WebhookVerificationSpec = HmacVerificationSpec | SharedTokenVerificationSpec | OidcJwtVerificationSpec;
2975
+ declare function isOidcJwtSpec(spec: WebhookVerificationSpec): spec is OidcJwtVerificationSpec;
2750
2976
  declare function isSharedTokenSpec(spec: WebhookVerificationSpec): spec is SharedTokenVerificationSpec;
2751
2977
  type InboundDelivery = {
2752
2978
  /** The body EXACTLY as received. Not re-serialised. See `webhook.ts`. */
@@ -2768,7 +2994,9 @@ type InboundDelivery = {
2768
2994
  * for starting workflows in your account, and defaulting to "allow" would make
2769
2995
  * every misconfiguration into an open door that looks shut.
2770
2996
  */
2771
- declare function verifyDelivery(trigger: TriggerDescriptor, delivery: InboundDelivery, secret: string | undefined, now?: number): Promise<WebhookVerification>;
2997
+ declare function verifyDelivery(trigger: TriggerDescriptor, delivery: InboundDelivery, secret: string | undefined, now?: number,
2998
+ /** For an `oidc-jwt` scheme: the keys, audience and principal the host configured. `secret` is not read. */
2999
+ oidc?: OidcExpectation): Promise<WebhookVerification>;
2772
3000
  /**
2773
3001
  * The event a trigger node publishes when it runs.
2774
3002
  *
@@ -2784,4 +3012,4 @@ declare function verifyDelivery(trigger: TriggerDescriptor, delivery: InboundDel
2784
3012
  */
2785
3013
  declare function triggerEvent(trigger: TriggerDescriptor, connection: ResolvedConnection, injected: unknown, config: Record<string, unknown>): unknown;
2786
3014
 
2787
- export { AMBIGUOUS_REFUSAL, type ApiContract, type Attempt, type Attendee, type ByteRange, CANONICAL_METRICS, CONNECTOR_API_VERSION, CONNECTOR_MODES, CREDENTIAL_SCOPES, type CallOptions, type CallResult, type Capabilities, type Catalogue, type ChainLinks, type ChainOutcome, type ChainRef, type ChallengeHandshake, type Citation, type Classified, type ConnectionCredentials, type ConnectionHost, type ConnectionSpec, type Connector, ConnectorAmbiguous, ConnectorApiMismatch, ConnectorAuthError, ConnectorConfigError, ConnectorError, type ConnectorErrorContext, type ConnectorFaker, ConnectorIdempotencyExpiredError, type ConnectorMode, ConnectorModeError, ConnectorRateLimited, type ConnectorRequest, ConnectorRequestError, type ConnectorResult, ConnectorTransient, ConnectorUnreachable, type ContractOperation, type CredentialField, type CredentialScope, DEFAULT_IDEMPOTENCY_WINDOW_SECONDS, DEFAULT_RETRY, DELIVERY_DECODE_KINDS, type DeliveryDeclaration, type DeliveryDecode, type DeliveryMechanism, type DeliveryOutcome, type DeliveryRoute, type DriftFinding, type DriftReport, EXPIRES_AT_UNITS, type ExpiresAtUnit, FAKE_EPOCH, FORM_FIELD_JSON_REASONS, type FailureKind, type FakeRequest, type FakeValues, FormFieldJsonError, type FormFieldJsonReason, type HmacScheme, type HmacVerificationSpec, type HostEnvironment, type IdempotencyOptions, type InboundDelivery, type Invite, type InviteMethod, type JoinTarget, type JoinTargetKind, type LeaseAction, type LeaseDeclaration, type LeaseState, MAX_IDEMPOTENCY_KEY_LENGTH, type MetricDescriptor, type MetricSample, type MimeAttachment, type MimeHeader, type MimeMessage, type MimePart, type ModeInputs, NO_IDEMPOTENCY_KEY_WARNING, PROBLEM_SEVERITIES, type PreparedRequest, type ProbeOutcome, type ProbeReport, type ProbeResult, type ProbeSpec, type Problem, type ProviderAdapter, RENDERER_VERSION, REVIEW_STALE_DAYS, type RecordedShape, type RecurrenceRule, type RenderRules, type RenderedPayload, type RequestedMode, type ResolveOptions, type ResolvedConnection, type RetryPolicy, type RunIdentity, SANDBOX_KINDS, SIGNED_URI_RULES, SUPPORTED_CONNECTOR_API, type SandboxKind, type Segment, type ServiceDescriptor, type SetupStep, type ShapeMismatch, type SharedTokenScheme, type SharedTokenVerificationSpec, type SignedRequestLine, type SignedUriRule, type SpecSource, type SubscriptionLease, type TextUnit, type Transport, type TransportResponse, type TriggerDescriptor, type VerifyResult, type WebhookVerification, type WebhookVerificationSpec, assertConnectorApi, byteRangeOf, callConnector, capabilityProblems, checkAgainstOpenApi, checkAgainstRecordedShape, classifyError, classifyHttp, classifyStatus, classifyThrown, compareShape, connectionsFor, constantTimeEquals, decodeDelivery, decodeFormFieldJson, deliver, fakeRequest, fakeValues, getConnectionHost, graphemes, handshakeResponse, header, hmac, httpFailure, idempotencyKeyFor, isEmptyPayload, isRemote, isSharedTokenScheme, isSharedTokenSpec, isUnconditionallyRetryable, joinTargets, leaseAction, leaseFromResponse, leaseRenewAt, leaseState, linkRanges, measure, nextOccurrence, normaliseSignedUri, parseInvite, parseMime, payloadHash, postChain, probe, providerProblems, providerSandboxIsSelectable, registerConnectionHost, registerTransport, render, reported, resetRateState, resolveConnection, resolveConnectorMode, respectRate, runIdentityFrom, runKeyFrom, runProbes, sandboxIsSelectable, sandboxRefusal, satisfiesMinimum, secretKeyBytes, seedFrom, shapeOf, shouldRetry, sliceByteRange, splitToFit, subscriptionLease, triggerEvent, unchecked, utf8Length, verifyDelivery, verifyHmac, verifySharedToken, withResolvedLimit };
3015
+ export { AMBIGUOUS_REFUSAL, type ApiContract, type Attempt, type Attendee, type ByteRange, CANONICAL_METRICS, CONNECTOR_API_VERSION, CONNECTOR_MODES, CREDENTIAL_SCOPES, CURSOR_READ_REASONS, type CallOptions, type CallResult, type Capabilities, type Catalogue, type ChainLinks, type ChainOutcome, type ChainRef, type ChallengeHandshake, type Citation, type Classified, type ConnectionCredentials, type ConnectionHost, type ConnectionSpec, type Connector, ConnectorAmbiguous, ConnectorApiMismatch, ConnectorAuthError, ConnectorConfigError, ConnectorError, type ConnectorErrorContext, type ConnectorFaker, ConnectorIdempotencyExpiredError, type ConnectorMode, ConnectorModeError, ConnectorRateLimited, type ConnectorRequest, ConnectorRequestError, type ConnectorResult, ConnectorTransient, ConnectorUnreachable, type ContractOperation, type CredentialField, type CredentialScope, CursorReadError, type CursorReadReason, type CursorReadResult, type CursorReadSpec, DEFAULT_IDEMPOTENCY_WINDOW_SECONDS, DEFAULT_RETRY, DELIVERY_DECODE_KINDS, type DeliveryDeclaration, type DeliveryDecode, type DeliveryMechanism, type DeliveryOutcome, type DeliveryRoute, type DriftFinding, type DriftReport, EXPIRES_AT_UNITS, type ExpiresAtUnit, FAKE_EPOCH, FORM_FIELD_JSON_REASONS, type FailureKind, type FakeRequest, type FakeValues, FormFieldJsonError, type FormFieldJsonReason, type HmacScheme, type HmacVerificationSpec, type HostEnvironment, type IdempotencyOptions, type InboundDelivery, type Invite, type InviteMethod, JWT_ALGORITHMS, type JoinTarget, type JoinTargetKind, type Jwk, type JwtVerification, type LeaseAction, type LeaseDeclaration, type LeaseState, MAX_IDEMPOTENCY_KEY_LENGTH, type MetricDescriptor, type MetricSample, type MimeAttachment, type MimeHeader, type MimeMessage, type MimePart, type ModeInputs, NO_IDEMPOTENCY_KEY_WARNING, OIDC_JWT_SCHEME_KIND, type OidcExpectation, type OidcJwtScheme, type OidcJwtVerificationSpec, PROBLEM_SEVERITIES, PUBSUB_PUSH_REASONS, type PreparedRequest, type ProbeOutcome, type ProbeReport, type ProbeResult, type ProbeSpec, type Problem, type ProviderAdapter, PubSubPushError, type PubSubPushMessage, type PubSubPushReason, RENDERER_VERSION, REVIEW_STALE_DAYS, type RecordedShape, type RecurrenceRule, type RenderRules, type RenderedPayload, type RequestedMode, type ResolveOptions, type ResolvedConnection, type RetryPolicy, type RunIdentity, SANDBOX_KINDS, SIGNED_URI_RULES, SUPPORTED_CONNECTOR_API, type SandboxKind, type Segment, type ServiceDescriptor, type SetupStep, type ShapeMismatch, type SharedTokenScheme, type SharedTokenVerificationSpec, type SignedRequestLine, type SignedUriRule, type SpecSource, type SubscriptionLease, type TextUnit, type Transport, type TransportResponse, type TriggerDescriptor, type VerifyJwtOptions, type VerifyResult, type WebhookVerification, type WebhookVerificationSpec, assertConnectorApi, byteRangeOf, callConnector, capabilityProblems, checkAgainstOpenApi, checkAgainstRecordedShape, classifyError, classifyHttp, classifyStatus, classifyThrown, compareShape, connectionsFor, constantTimeEquals, decodeDelivery, decodeFormFieldJson, decodePubSubPush, deliver, fakeRequest, fakeValues, getConnectionHost, graphemes, handshakeResponse, header, hmac, httpFailure, idempotencyKeyFor, isEmptyPayload, isOidcJwtScheme, isOidcJwtSpec, isRemote, isSharedTokenScheme, isSharedTokenSpec, isUnconditionallyRetryable, joinTargets, leaseAction, leaseFromResponse, leaseRenewAt, leaseState, linkRanges, measure, nextOccurrence, normaliseSignedUri, parseInvite, parseMime, payloadHash, postChain, probe, providerProblems, providerSandboxIsSelectable, readWithCursor, registerConnectionHost, registerTransport, render, reported, resetRateState, resolveConnection, resolveConnectorMode, respectRate, runIdentityFrom, runKeyFrom, runProbes, sandboxIsSelectable, sandboxRefusal, satisfiesMinimum, secretKeyBytes, seedFrom, shapeOf, shouldRetry, sliceByteRange, splitToFit, subscriptionLease, triggerEvent, unchecked, utf8Length, verifyDelivery, verifyHmac, verifyJwt, verifyOidcDelivery, verifySharedToken, withResolvedLimit };