@tangle-network/agent-integrations 0.1.2 → 0.2.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 +369 -1
- package/dist/index.js +2474 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -535,6 +535,374 @@ interface GenericHmacVerifyOptions {
|
|
|
535
535
|
declare function verifyHmacSignature(rawBody: string, signatureHeader: string, secret: string, options?: GenericHmacVerifyOptions): boolean;
|
|
536
536
|
declare function firstHeader(headers: Record<string, string | string[] | undefined>, name: string): string | undefined;
|
|
537
537
|
|
|
538
|
+
/**
|
|
539
|
+
* Google Calendar connector — CAS reference implementation.
|
|
540
|
+
*
|
|
541
|
+
* Scopes: `https://www.googleapis.com/auth/calendar` covers list/insert/
|
|
542
|
+
* patch on the user's calendars. We could split read/write but for v1 the
|
|
543
|
+
* single scope keeps the consent screen simple; an operator who wants
|
|
544
|
+
* read-only-Calendar can pick a different `kind` later (`google-calendar-readonly`).
|
|
545
|
+
*
|
|
546
|
+
* The two capabilities the agent actually needs:
|
|
547
|
+
*
|
|
548
|
+
* list_availability(calendarId, timeMin, timeMax)
|
|
549
|
+
* → {busy: [{start, end}], events: [{id, etag, start, end, summary}]}
|
|
550
|
+
* Read; no CAS. Cheap (events.list).
|
|
551
|
+
*
|
|
552
|
+
* book_slot(calendarId, start, end, summary, attendees?)
|
|
553
|
+
* → {eventId, etag}
|
|
554
|
+
* Mutation. CAS by Calendar's own conflict-detection: we re-list
|
|
555
|
+
* events for the requested window inside the same call, and if any
|
|
556
|
+
* OVERLAP exists we return `conflict` with the next-3 free slots
|
|
557
|
+
* mined from the user's freebusy, instead of inserting.
|
|
558
|
+
*
|
|
559
|
+
* Why pre-flight read-then-insert rather than relying on If-Match:
|
|
560
|
+
* `events.insert` doesn't take If-Match (you can't precondition an
|
|
561
|
+
* insert against a non-existent resource). Calendar's own
|
|
562
|
+
* `freebusy.query` is the canonical conflict signal. The whole flow is:
|
|
563
|
+
*
|
|
564
|
+
* 1. freebusy.query for [start, end] on this calendarId
|
|
565
|
+
* 2. if busy → emit ResourceContention with next-3 free slots
|
|
566
|
+
* (computed by walking forward in 30-min steps until 3 free
|
|
567
|
+
* windows of (end-start) duration found)
|
|
568
|
+
* 3. else events.insert with idempotency-key as `requestId` (a Calendar
|
|
569
|
+
* API feature that gives us per-key dedup at upstream)
|
|
570
|
+
*
|
|
571
|
+
* Step 3's `requestId` parameter means a retry of the same idempotency
|
|
572
|
+
* key on the same calendar will return the original event rather than
|
|
573
|
+
* creating a duplicate, which composes correctly with our MutationGuard's
|
|
574
|
+
* idempotency record (which short-circuits before ever hitting upstream
|
|
575
|
+
* on the second call). Defense-in-depth.
|
|
576
|
+
*/
|
|
577
|
+
|
|
578
|
+
/** OAuth client config the factory closes over. Caller resolves these
|
|
579
|
+
* at construction time (env, DB, secret manager — package doesn't care). */
|
|
580
|
+
interface GoogleCalendarOptions {
|
|
581
|
+
clientId: string;
|
|
582
|
+
clientSecret: string;
|
|
583
|
+
}
|
|
584
|
+
declare function googleCalendar(opts: GoogleCalendarOptions): ConnectorAdapter;
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* Google Sheets connector — live KB source + writable rows.
|
|
588
|
+
*
|
|
589
|
+
* The flagship for the "agent reads from a live spreadsheet" UX. The
|
|
590
|
+
* customer points the connection at a Sheet (spreadsheetId + sheetName +
|
|
591
|
+
* headerRow). We expose:
|
|
592
|
+
*
|
|
593
|
+
* list_rows(filter?, limit?)
|
|
594
|
+
* → {rows: [{...header→cell}], nextCursor?}
|
|
595
|
+
* Cheap; just spreadsheets.values.get with the configured range.
|
|
596
|
+
*
|
|
597
|
+
* query_rows(predicate)
|
|
598
|
+
* → same shape as list_rows but with a structured filter (k=v pairs
|
|
599
|
+
* ANDed together). Simple and explainable; no SQL.
|
|
600
|
+
*
|
|
601
|
+
* update_row(rowKey, patch)
|
|
602
|
+
* → {row: {...header→cell}, updatedRange}
|
|
603
|
+
* Mutation. CAS via Sheets' spreadsheets.values.update + a
|
|
604
|
+
* pre-flight read of the row's revisionId-equivalent hash. Sheets
|
|
605
|
+
* doesn't expose a per-row etag, so we synthesize one — see
|
|
606
|
+
* `rowFingerprint`. If the fingerprint doesn't match what the agent
|
|
607
|
+
* last read, we surface ResourceContention with the current row in
|
|
608
|
+
* `currentState`.
|
|
609
|
+
*
|
|
610
|
+
* KB binding: when a Sheet is `consistencyModel: 'cache'` (the default
|
|
611
|
+
* for spreadsheets — they're slow-moving), the system also indexes the
|
|
612
|
+
* rows as KB chunks. The KB build pipeline calls `list_rows` and emits
|
|
613
|
+
* one markdown page per row; on a connector-level "refresh" event the
|
|
614
|
+
* agent's KB rebuilds.
|
|
615
|
+
*/
|
|
616
|
+
|
|
617
|
+
/** OAuth client config the factory closes over. Caller resolves these
|
|
618
|
+
* at construction time (env, DB, secret manager — package doesn't care). */
|
|
619
|
+
interface GoogleSheetsOptions {
|
|
620
|
+
clientId: string;
|
|
621
|
+
clientSecret: string;
|
|
622
|
+
}
|
|
623
|
+
declare function googleSheets(opts: GoogleSheetsOptions): ConnectorAdapter;
|
|
624
|
+
|
|
625
|
+
/**
|
|
626
|
+
* Microsoft Graph Calendar connector — the Outlook half of the
|
|
627
|
+
* voice-agent's "book me a slot" surface.
|
|
628
|
+
*
|
|
629
|
+
* Mirrors the Google Calendar pattern almost line-for-line, with two
|
|
630
|
+
* upstream-specific quirks worth calling out:
|
|
631
|
+
*
|
|
632
|
+
* 1. Graph exposes `@odata.etag` on every event resource AND honors
|
|
633
|
+
* `If-Match` on `events.patch` / `events.delete`. So unlike Calendar
|
|
634
|
+
* (insert can't be preconditioned against a non-existent resource),
|
|
635
|
+
* we DO get real etag CAS for updates after the booking. We still
|
|
636
|
+
* use the freebusy pre-flight for the create path, because the
|
|
637
|
+
* "two callers grab the same slot" race happens before any event
|
|
638
|
+
* exists.
|
|
639
|
+
*
|
|
640
|
+
* 2. `getSchedule` is the Graph equivalent of `freeBusy.query`. Same
|
|
641
|
+
* shape: send `[start, end]` plus the calendar's email/UPN, get
|
|
642
|
+
* back a `scheduleItems` list of busy windows.
|
|
643
|
+
*
|
|
644
|
+
* Why the same flow ports cleanly: the conflict mode is identical
|
|
645
|
+
* ("did someone else grab this slot between read and write?"). The
|
|
646
|
+
* mechanism — pre-flight read + idempotent insert — composes regardless
|
|
647
|
+
* of whether upstream gives us a request-id dedup feature. Graph does
|
|
648
|
+
* not have a `requestId` analogue on `events.create`, so we rely
|
|
649
|
+
* exclusively on MutationGuard's idempotency-key short-circuit ABOVE
|
|
650
|
+
* the connector. That layer prevents duplicate inserts on retry.
|
|
651
|
+
*/
|
|
652
|
+
|
|
653
|
+
/** OAuth client config the factory closes over. Caller resolves these
|
|
654
|
+
* at construction time (env, DB, secret manager — package doesn't care). */
|
|
655
|
+
interface MicrosoftCalendarOptions {
|
|
656
|
+
clientId: string;
|
|
657
|
+
clientSecret: string;
|
|
658
|
+
}
|
|
659
|
+
declare function microsoftCalendar(opts: MicrosoftCalendarOptions): ConnectorAdapter;
|
|
660
|
+
|
|
661
|
+
/**
|
|
662
|
+
* HubSpot CRM connector — three load-bearing capabilities, picked to
|
|
663
|
+
* cover the voice-agent's CRM hot path without trying to swallow all of
|
|
664
|
+
* HubSpot's surface in v1.
|
|
665
|
+
*
|
|
666
|
+
* find_contact(email)
|
|
667
|
+
* → {contact: {id, properties}} | {found: false}
|
|
668
|
+
* POST /crm/v3/objects/contacts/search with an email-equality filter.
|
|
669
|
+
* Cheap, idempotent, no CAS needed (read).
|
|
670
|
+
*
|
|
671
|
+
* upsert_contact(email, properties)
|
|
672
|
+
* → {contactId, created}
|
|
673
|
+
* Mutation. CAS strategy = native-idempotency, BUT: HubSpot's
|
|
674
|
+
* `idempotencyKey` query param is ONLY available on the v3 *batch*
|
|
675
|
+
* endpoints (`/crm/v3/objects/contacts/batch/upsert`). The
|
|
676
|
+
* single-record endpoints don't honor it. We use the batch endpoint
|
|
677
|
+
* with a single-element array to get native idempotency on retry.
|
|
678
|
+
*
|
|
679
|
+
* create_note(contactId, body)
|
|
680
|
+
* → {noteId}
|
|
681
|
+
* Mutation that logs a note engagement on a contact and associates
|
|
682
|
+
* it. Notes are append-only — there's no conflict to detect — so we
|
|
683
|
+
* use native-idempotency via the same batch trick on
|
|
684
|
+
* `/crm/v3/objects/notes/batch/create`.
|
|
685
|
+
*
|
|
686
|
+
* Why three and not thirty: the agent's leverage on HubSpot is
|
|
687
|
+
* "remember who I just spoke to". `find_contact` lets the agent address
|
|
688
|
+
* a returning caller by name; `upsert_contact` captures a new one
|
|
689
|
+
* without duplicates; `create_note` writes the call's outcome as a CRM
|
|
690
|
+
* activity. Anything beyond these (deals, tickets, lists) lives in
|
|
691
|
+
* Tier-2 specific kinds — keeping the manifest tight keeps the agent's
|
|
692
|
+
* tool registry comprehensible.
|
|
693
|
+
*/
|
|
694
|
+
|
|
695
|
+
/** OAuth client config the factory closes over. Caller resolves these
|
|
696
|
+
* at construction time (env, DB, secret manager — package doesn't care). */
|
|
697
|
+
interface HubSpotOptions {
|
|
698
|
+
clientId: string;
|
|
699
|
+
clientSecret: string;
|
|
700
|
+
}
|
|
701
|
+
declare function hubspot(opts: HubSpotOptions): ConnectorAdapter;
|
|
702
|
+
|
|
703
|
+
/**
|
|
704
|
+
* Slack connector — bot-token OAuth, three messaging-oriented capabilities.
|
|
705
|
+
*
|
|
706
|
+
* post_message(channel, text|blocks) → mutation; cas: 'none'
|
|
707
|
+
* lookup_user(email) → read
|
|
708
|
+
* list_channels(types?, limit?) → read
|
|
709
|
+
*
|
|
710
|
+
* Why `cas: 'none'` is acceptable here (and only here in this batch):
|
|
711
|
+
* Slack messages are advisory — we set
|
|
712
|
+
* `defaultConsistencyModel: 'advisory'`. The registry validator allows
|
|
713
|
+
* `cas: 'none'` only on non-authoritative connectors precisely so that
|
|
714
|
+
* append-only messaging surfaces don't have to invent fake CAS theatre.
|
|
715
|
+
* The agent's planner already treats `advisory` data as informational
|
|
716
|
+
* and does not promise outcomes based on its post results without
|
|
717
|
+
* a separate authoritative confirm. MutationGuard's idempotency-key
|
|
718
|
+
* dedup remains in force above the connector — a retry of the same
|
|
719
|
+
* post_message call will short-circuit before reaching Slack.
|
|
720
|
+
*
|
|
721
|
+
* Auth: standard OAuth2. Slack's `/oauth.v2.access` returns a bot
|
|
722
|
+
* `access_token` (`xoxb-…`) but does NOT return a refresh_token unless
|
|
723
|
+
* the app has rotated tokens enabled. Bot tokens are long-lived by
|
|
724
|
+
* default; we surface refreshToken handling but treat its absence as
|
|
725
|
+
* normal rather than an error.
|
|
726
|
+
*/
|
|
727
|
+
|
|
728
|
+
/** OAuth client config the factory closes over. Caller resolves these
|
|
729
|
+
* at construction time (env, DB, secret manager — package doesn't care). */
|
|
730
|
+
interface SlackOptions {
|
|
731
|
+
clientId: string;
|
|
732
|
+
clientSecret: string;
|
|
733
|
+
}
|
|
734
|
+
declare function slack(opts: SlackOptions): ConnectorAdapter;
|
|
735
|
+
|
|
736
|
+
/**
|
|
737
|
+
* Notion database connector — query + page-level CRUD against a single
|
|
738
|
+
* connected database.
|
|
739
|
+
*
|
|
740
|
+
* query_database(filter?, pageSize?) → read
|
|
741
|
+
* create_page(properties) → mutation; cas: 'native-idempotency'
|
|
742
|
+
* update_page(pageId, properties) → mutation; cas: 'etag-if-match'
|
|
743
|
+
*
|
|
744
|
+
* CAS quirks worth flagging:
|
|
745
|
+
*
|
|
746
|
+
* 1. Notion added support for the `Idempotency-Key` HTTP header on
|
|
747
|
+
* mutating requests. We forward our SDK's idempotency key on
|
|
748
|
+
* create_page, which gives at-most-once semantics under the same
|
|
749
|
+
* key for ~24h. MutationGuard's record short-circuits above us;
|
|
750
|
+
* Notion's dedup is the second line of defense.
|
|
751
|
+
*
|
|
752
|
+
* 2. Notion does NOT expose a per-page etag the way Graph does. The
|
|
753
|
+
* canonical drift signal is `last_edited_time` (RFC3339). Our
|
|
754
|
+
* `update_page` capability accepts an `expectedLastEditedTime` arg;
|
|
755
|
+
* if supplied, we GET the page first and compare. Mismatch →
|
|
756
|
+
* ResourceContention with the current page state. Conflict-free
|
|
757
|
+
* callers can omit the field (last-write-wins, the Notion default).
|
|
758
|
+
*
|
|
759
|
+
* Auth: standard OAuth2. Notion's token endpoint follows RFC 6749 with
|
|
760
|
+
* one twist — the workspace_id and bot_id come back in the response and
|
|
761
|
+
* we stash them in `metadata` so the agent can address resources by
|
|
762
|
+
* workspace where useful.
|
|
763
|
+
*/
|
|
764
|
+
|
|
765
|
+
/** OAuth client config the factory closes over. Caller resolves these
|
|
766
|
+
* at construction time (env, DB, secret manager — package doesn't care). */
|
|
767
|
+
interface NotionDatabaseOptions {
|
|
768
|
+
clientId: string;
|
|
769
|
+
clientSecret: string;
|
|
770
|
+
}
|
|
771
|
+
declare function notionDatabase(opts: NotionDatabaseOptions): ConnectorAdapter;
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* Twilio SMS connector — outbound texts + recent-message lookup. The
|
|
775
|
+
* agent's "send the caller a confirmation link" surface.
|
|
776
|
+
*
|
|
777
|
+
* Auth: HTTP Basic (Account SID + Auth Token). Twilio's API key auth
|
|
778
|
+
* also supports SID/Secret pairs; we accept either by treating the
|
|
779
|
+
* stored apiKey envelope as `accountSid:authToken` (or
|
|
780
|
+
* `accountSid:keySid:secret`) — the connector parses it at call time.
|
|
781
|
+
*
|
|
782
|
+
* send_sms(to, body)
|
|
783
|
+
* Mutation. CAS = native-idempotency. Twilio added the
|
|
784
|
+
* `Idempotency-Key` HTTP header to POST /Messages in 2024 — same
|
|
785
|
+
* key + same args within 24h returns the original Message resource
|
|
786
|
+
* instead of sending a second SMS. MutationGuard's record short-
|
|
787
|
+
* circuits before us; Twilio's own dedup is defense-in-depth.
|
|
788
|
+
*
|
|
789
|
+
* lookup_number(phoneNumber)
|
|
790
|
+
* Read. Hits /v1/PhoneNumbers/{e164} on Lookup API. Confirms the
|
|
791
|
+
* number is real, returns carrier info if the caller has Lookup
|
|
792
|
+
* enabled on their account.
|
|
793
|
+
*
|
|
794
|
+
* find_recent_messages(toOrFrom?, limit?)
|
|
795
|
+
* Read. Returns the most recent Messages on the account, optionally
|
|
796
|
+
* filtered by To/From. Useful for "did the confirmation actually
|
|
797
|
+
* send?" introspection inside an agent run.
|
|
798
|
+
*/
|
|
799
|
+
|
|
800
|
+
declare const twilioSmsConnector: ConnectorAdapter;
|
|
801
|
+
|
|
802
|
+
/**
|
|
803
|
+
* Stripe pack connector — single connector kind packing 3 capabilities,
|
|
804
|
+
* validating the "connector pack" concept (one auth handshake, multiple
|
|
805
|
+
* related capabilities) without exploding the registry into
|
|
806
|
+
* `stripe-customers`, `stripe-checkout`, `stripe-invoices` triplets.
|
|
807
|
+
*
|
|
808
|
+
* find_customer(email) → read; CAS n/a
|
|
809
|
+
* create_invoice(customerId, items) → mutation; cas: 'native-idempotency'
|
|
810
|
+
* create_checkout_session(...) → mutation; cas: 'native-idempotency'
|
|
811
|
+
*
|
|
812
|
+
* Auth: API key (Stripe restricted key). Operator pastes the key into
|
|
813
|
+
* the Connections UI. We never see their account password / OAuth flow;
|
|
814
|
+
* Stripe restricted keys are the customer's responsibility (they pick
|
|
815
|
+
* which permissions the key carries). The kind exposes a webhook URL
|
|
816
|
+
* post-connect for the operator to paste into the Stripe dashboard —
|
|
817
|
+
* we'll wire the receiver to P-3's inbound webhook surface in a later
|
|
818
|
+
* commit. That URL is returned in `metadata.webhookUrl` so the UI can
|
|
819
|
+
* render it.
|
|
820
|
+
*
|
|
821
|
+
* Why this is the textbook example of `cas: 'native-idempotency'`:
|
|
822
|
+
* Stripe's `Idempotency-Key` HTTP header is THE reference implementation
|
|
823
|
+
* of native idempotency. Same key + same args within 24h returns the
|
|
824
|
+
* stored response (Stripe's words, not ours). Same key + different args
|
|
825
|
+
* → 400 with `idempotency_error`. We forward the SDK's idempotency key
|
|
826
|
+
* directly. MutationGuard short-circuits before us on retry; Stripe's
|
|
827
|
+
* own dedup is the second line of defense.
|
|
828
|
+
*/
|
|
829
|
+
|
|
830
|
+
declare const stripePackConnector: ConnectorAdapter;
|
|
831
|
+
|
|
832
|
+
/**
|
|
833
|
+
* Universal webhook connector — the long-tail escape hatch.
|
|
834
|
+
*
|
|
835
|
+
* The user declares a target URL + a JSON-schema for the request body
|
|
836
|
+
* the agent should send, plus an optional shared secret. We sign every
|
|
837
|
+
* outbound POST with HMAC-SHA256 over `timestamp.body` and forward the
|
|
838
|
+
* agent's idempotency key as a header. The receiving system enforces
|
|
839
|
+
* its own idempotency.
|
|
840
|
+
*
|
|
841
|
+
* One adapter, two capabilities. Both arity-1 — `body` is whatever JSON
|
|
842
|
+
* the agent's planner constructs from the operator-defined schema (which
|
|
843
|
+
* lives in DataSource.metadata.requestSchema). The agent's planner reads
|
|
844
|
+
* that schema at request time and constructs valid args.
|
|
845
|
+
*
|
|
846
|
+
* Why one connector covers 50 systems badly and 1 system well: the agent
|
|
847
|
+
* gets a generic "send_event" tool that doesn't *know* what the upstream
|
|
848
|
+
* does with the payload. That's fine for fire-and-forget event posting
|
|
849
|
+
* (Zapier-style); it's wrong for booking against a calendar where you
|
|
850
|
+
* need conflict-resolution. So webhook's `post_event` capability is
|
|
851
|
+
* marked `cas: 'native-idempotency'` (we forward the key — the receiver
|
|
852
|
+
* MUST honor it) and `defaultConsistencyModel: 'advisory'`. Anyone
|
|
853
|
+
* needing real CAS uses a kind-specific connector (Calendar, Sheets, ...).
|
|
854
|
+
*/
|
|
855
|
+
|
|
856
|
+
declare const webhookConnector: ConnectorAdapter;
|
|
857
|
+
|
|
858
|
+
/**
|
|
859
|
+
* Stripe inbound-webhook receiver — push-only side of a Stripe connector.
|
|
860
|
+
*
|
|
861
|
+
* The full Stripe connector (charges/customers/invoices read+mutation) is
|
|
862
|
+
* tracked in INTEGRATIONS.md as separate `stripe-customers` / `stripe-invoices`
|
|
863
|
+
* rows. This adapter only ships the inbound surface today: receive a push,
|
|
864
|
+
* verify the signature, persist one `InboundEvent` per Stripe event so the
|
|
865
|
+
* agent's runtime can react (e.g. payment_failed → outbound dunning call).
|
|
866
|
+
*
|
|
867
|
+
* Why a dedicated `kind: 'stripe'` rather than reusing the billing webhook
|
|
868
|
+
* at /api/billing/stripe-webhook: that route is hard-coded for OUR Stripe
|
|
869
|
+
* account (Builder subscription state). This connector is for the customer's
|
|
870
|
+
* OWN Stripe account — they paste their `whsec_*` and we listen on a
|
|
871
|
+
* per-DataSource URL, /api/webhooks/inbound/stripe/:dataSourceId.
|
|
872
|
+
*
|
|
873
|
+
* Signature scheme: Stripe's `t=<unix>,v1=<hmac>` header. HMAC is
|
|
874
|
+
* sha256(`${t}.${rawBody}`) keyed by the customer's webhook secret. We use
|
|
875
|
+
* `timingSafeEqual` to defeat timing oracles and bound timestamp skew at
|
|
876
|
+
* 5 minutes (Stripe's recommendation) to thwart replay against captured
|
|
877
|
+
* signatures.
|
|
878
|
+
*/
|
|
879
|
+
|
|
880
|
+
declare const stripeWebhookReceiverConnector: ConnectorAdapter;
|
|
881
|
+
|
|
882
|
+
/**
|
|
883
|
+
* Slack Events API inbound receiver.
|
|
884
|
+
*
|
|
885
|
+
* Slack sends two distinct request shapes to the same webhook URL:
|
|
886
|
+
*
|
|
887
|
+
* 1. `url_verification` — a one-off handshake during app-config. The body
|
|
888
|
+
* contains a `challenge` string we MUST echo back as the response body
|
|
889
|
+
* (Slack's app-config UI fails the URL otherwise). No InboundEvent is
|
|
890
|
+
* persisted for this — it's an infrastructure ping, not a user event.
|
|
891
|
+
*
|
|
892
|
+
* 2. `event_callback` — every actual workspace event (message posted,
|
|
893
|
+
* reaction added, channel created, …). We persist one InboundEvent
|
|
894
|
+
* keyed by `event_id` so a Slack retry (Slack retries 3 times on any
|
|
895
|
+
* non-2xx) is deduped at the unique constraint, not after we've
|
|
896
|
+
* double-processed.
|
|
897
|
+
*
|
|
898
|
+
* Signature scheme: `v0=<hmac(sha256, "v0:<timestamp>:<rawBody>")>` keyed by
|
|
899
|
+
* the app's signing secret. Header `X-Slack-Request-Timestamp` carries the
|
|
900
|
+
* timestamp; we reject anything older than 5 minutes (Slack's recommendation)
|
|
901
|
+
* to bound replay risk.
|
|
902
|
+
*/
|
|
903
|
+
|
|
904
|
+
declare const slackEventsConnector: ConnectorAdapter;
|
|
905
|
+
|
|
538
906
|
type IntegrationProviderKind = 'first_party' | 'nango' | 'pipedream' | 'zapier' | 'activepieces' | 'executor' | 'custom';
|
|
539
907
|
type IntegrationConnectorCategory = 'email' | 'calendar' | 'chat' | 'crm' | 'storage' | 'docs' | 'database' | 'webhook' | 'workflow' | 'internal' | 'other';
|
|
540
908
|
type IntegrationActionRisk = 'read' | 'write' | 'destructive';
|
|
@@ -793,4 +1161,4 @@ declare function createHttpIntegrationProvider(options: HttpIntegrationProviderO
|
|
|
793
1161
|
declare function signCapability(capability: IntegrationCapability, secret: string): string;
|
|
794
1162
|
declare function verifyCapabilityToken(token: string, secret: string): IntegrationCapability;
|
|
795
1163
|
|
|
796
|
-
export { type AuthSpec, type CASStrategy, type Capability, type CapabilityClass, type CapabilityMutation, type CapabilityMutationResult, type CapabilityParameterSchema, type CapabilityRead, type CapabilityReadResult, type CompleteAuthRequest, type ConnectorAdapter, type ConnectorCredentials, type ConnectorInvocation, type ConnectorManifest, type ConnectorManifestValidationIssue, type ConnectorManifestValidationResult, type ConsistencyModel, CredentialsExpired, DEFAULT_SIGNATURE_TOLERANCE_SECONDS, type DataSourceMetadata, type EventHandlerResult, type ExchangeCodeInput, type GenericHmacVerifyOptions, type HttpIntegrationProviderOptions, InMemoryConnectionStore, InMemoryOAuthFlowStore, type InboundEvent, type IntegrationActionGuard, type IntegrationActionRequest, type IntegrationActionResult, type IntegrationActionRisk, type IntegrationActor, type IntegrationCapability, type IntegrationConnection, type IntegrationConnectionStore, type IntegrationConnector, type IntegrationConnectorAction, type IntegrationConnectorCategory, type IntegrationConnectorTrigger, type IntegrationDataClass, IntegrationError, type IntegrationGuardContext, IntegrationHub, type IntegrationHubOptions, type IntegrationProvider, type IntegrationProviderKind, type IntegrationTriggerEvent, type IntegrationTriggerSubscription, type InvokeWithCapabilityRequest, type IssueCapabilityRequest, type IssuedIntegrationCapability, type OAuthFlowStore, type OAuthTokens, type ParsedStripeSignatureHeader, type PendingOAuthFlow, type RateLimitSpec, type RefreshInput, type ResolvedDataSource, ResourceContention, type SecretRef, type SlackVerifyOptions, type StartAuthRequest, type StartAuthResult, type StartOAuthInput, type StartOAuthOutput, type StripeVerifyOptions, _resetPendingFlowsForTests, assertValidConnectorManifest, consumePendingFlow, createHttpIntegrationProvider, createMockIntegrationProvider, exchangeAuthorizationCode, firstHeader, parseStripeSignatureHeader, refreshAccessToken, sanitizeConnection, signCapability, startOAuthFlow, validateConnectorManifest, verifyCapabilityToken, verifyHmacSignature, verifySlackSignature, verifyStripeSignature };
|
|
1164
|
+
export { type AuthSpec, type CASStrategy, type Capability, type CapabilityClass, type CapabilityMutation, type CapabilityMutationResult, type CapabilityParameterSchema, type CapabilityRead, type CapabilityReadResult, type CompleteAuthRequest, type ConnectorAdapter, type ConnectorCredentials, type ConnectorInvocation, type ConnectorManifest, type ConnectorManifestValidationIssue, type ConnectorManifestValidationResult, type ConsistencyModel, CredentialsExpired, DEFAULT_SIGNATURE_TOLERANCE_SECONDS, type DataSourceMetadata, type EventHandlerResult, type ExchangeCodeInput, type GenericHmacVerifyOptions, type GoogleCalendarOptions, type GoogleSheetsOptions, type HttpIntegrationProviderOptions, type HubSpotOptions, InMemoryConnectionStore, InMemoryOAuthFlowStore, type InboundEvent, type IntegrationActionGuard, type IntegrationActionRequest, type IntegrationActionResult, type IntegrationActionRisk, type IntegrationActor, type IntegrationCapability, type IntegrationConnection, type IntegrationConnectionStore, type IntegrationConnector, type IntegrationConnectorAction, type IntegrationConnectorCategory, type IntegrationConnectorTrigger, type IntegrationDataClass, IntegrationError, type IntegrationGuardContext, IntegrationHub, type IntegrationHubOptions, type IntegrationProvider, type IntegrationProviderKind, type IntegrationTriggerEvent, type IntegrationTriggerSubscription, type InvokeWithCapabilityRequest, type IssueCapabilityRequest, type IssuedIntegrationCapability, type MicrosoftCalendarOptions, type NotionDatabaseOptions, type OAuthFlowStore, type OAuthTokens, type ParsedStripeSignatureHeader, type PendingOAuthFlow, type RateLimitSpec, type RefreshInput, type ResolvedDataSource, ResourceContention, type SecretRef, type SlackOptions, type SlackVerifyOptions, type StartAuthRequest, type StartAuthResult, type StartOAuthInput, type StartOAuthOutput, type StripeVerifyOptions, _resetPendingFlowsForTests, assertValidConnectorManifest, consumePendingFlow, createHttpIntegrationProvider, createMockIntegrationProvider, exchangeAuthorizationCode, firstHeader, googleCalendar, googleSheets, hubspot, microsoftCalendar, notionDatabase, parseStripeSignatureHeader, refreshAccessToken, sanitizeConnection, signCapability, slack, slackEventsConnector, startOAuthFlow, stripePackConnector, stripeWebhookReceiverConnector, twilioSmsConnector, validateConnectorManifest, verifyCapabilityToken, verifyHmacSignature, verifySlackSignature, verifyStripeSignature, webhookConnector };
|