@primitivedotdev/sdk 1.2.0 → 1.3.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.
@@ -705,6 +705,88 @@ type AgentSignupVerifyResult = {
705
705
  */
706
706
  orgs: Array<AgentOrgRef>;
707
707
  };
708
+ /**
709
+ * Plan-derived quota limits for an account.
710
+ */
711
+ type PlanLimits = {
712
+ storage_mb: number;
713
+ send_per_hour: number;
714
+ send_per_day: number;
715
+ api_per_minute: number;
716
+ webhooks_max_global: number | null;
717
+ webhooks_per_domain: boolean;
718
+ filters_per_domain: boolean;
719
+ spam_thresholds_per_domain: boolean;
720
+ };
721
+ type CreateAgentAccountInput = {
722
+ /**
723
+ * Must be true to accept the Terms of Service and Privacy Policy.
724
+ */
725
+ terms_accepted: true;
726
+ /**
727
+ * Optional label for the device or agent creating the account.
728
+ */
729
+ device_name?: string;
730
+ };
731
+ /**
732
+ * In-band pointer to the upgrade path for an agent account.
733
+ */
734
+ type AgentAccountUpgradeHint = {
735
+ plan: 'developer';
736
+ description: string;
737
+ claim_path: string;
738
+ };
739
+ type AgentAccountResult = {
740
+ /**
741
+ * One-time API key (prefixed `prim_`). Shown once; store it securely.
742
+ */
743
+ api_key: string;
744
+ org_id: string;
745
+ /**
746
+ * Provisioned managed inbox FQDN, or null if the inbox publish was deferred.
747
+ */
748
+ address: string | null;
749
+ plan: 'agent';
750
+ limits: PlanLimits;
751
+ upgrade: AgentAccountUpgradeHint;
752
+ };
753
+ type StartAgentClaimInput = {
754
+ /**
755
+ * Email to confirm. Must not already belong to a Primitive account.
756
+ */
757
+ email: string;
758
+ };
759
+ type AgentClaimStartResult = {
760
+ claim_session_id: string;
761
+ resend_after_seconds: number;
762
+ expires_in_seconds: number;
763
+ };
764
+ type VerifyAgentClaimInput = {
765
+ /**
766
+ * The verification code emailed by the claim start step.
767
+ */
768
+ verification_code: string;
769
+ };
770
+ type AgentClaimResult = {
771
+ org_id: string;
772
+ plan: 'developer';
773
+ email: string;
774
+ limits: PlanLimits;
775
+ };
776
+ /**
777
+ * No fields; an empty object is accepted.
778
+ */
779
+ type CreateAgentClaimLinkInput = {
780
+ [key: string]: never;
781
+ };
782
+ type AgentClaimLinkResult = {
783
+ claim_token: string;
784
+ /**
785
+ * Browser URL to hand to a human, or null if no web origin is configured.
786
+ */
787
+ claim_url: string | null;
788
+ expires_in_seconds: number;
789
+ };
708
790
  type CliLogoutInput = {
709
791
  /**
710
792
  * Optional id guard; when provided it must match the authenticated OAuth grant id or API key id
@@ -3159,6 +3241,146 @@ type VerifyAgentSignupResponses = {
3159
3241
  };
3160
3242
  };
3161
3243
  type VerifyAgentSignupResponse = VerifyAgentSignupResponses[keyof VerifyAgentSignupResponses];
3244
+ type CreateAgentAccountData = {
3245
+ body: CreateAgentAccountInput;
3246
+ path?: never;
3247
+ query?: never;
3248
+ url: '/agent/accounts';
3249
+ };
3250
+ type CreateAgentAccountErrors = {
3251
+ /**
3252
+ * Invalid request parameters
3253
+ */
3254
+ 400: ErrorResponse;
3255
+ /**
3256
+ * Rate limit exceeded
3257
+ */
3258
+ 429: ErrorResponse;
3259
+ };
3260
+ type CreateAgentAccountError = CreateAgentAccountErrors[keyof CreateAgentAccountErrors];
3261
+ type CreateAgentAccountResponses = {
3262
+ /**
3263
+ * Agent account created; the API key is returned once
3264
+ */
3265
+ 200: SuccessEnvelope & {
3266
+ data?: AgentAccountResult;
3267
+ };
3268
+ };
3269
+ type CreateAgentAccountResponse = CreateAgentAccountResponses[keyof CreateAgentAccountResponses];
3270
+ type StartAgentClaimData = {
3271
+ body: StartAgentClaimInput;
3272
+ path?: never;
3273
+ query?: never;
3274
+ url: '/agent/claim/start';
3275
+ };
3276
+ type StartAgentClaimErrors = {
3277
+ /**
3278
+ * Invalid request parameters
3279
+ */
3280
+ 400: ErrorResponse;
3281
+ /**
3282
+ * Invalid or missing API key
3283
+ */
3284
+ 401: ErrorResponse;
3285
+ /**
3286
+ * Resource not found
3287
+ */
3288
+ 404: ErrorResponse;
3289
+ /**
3290
+ * The email is already in use, or the account is not claimable
3291
+ */
3292
+ 409: ErrorResponse;
3293
+ /**
3294
+ * Rate limit exceeded
3295
+ */
3296
+ 429: ErrorResponse;
3297
+ };
3298
+ type StartAgentClaimError = StartAgentClaimErrors[keyof StartAgentClaimErrors];
3299
+ type StartAgentClaimResponses = {
3300
+ /**
3301
+ * Claim started and verification email sent
3302
+ */
3303
+ 200: SuccessEnvelope & {
3304
+ data?: AgentClaimStartResult;
3305
+ };
3306
+ };
3307
+ type StartAgentClaimResponse = StartAgentClaimResponses[keyof StartAgentClaimResponses];
3308
+ type VerifyAgentClaimData = {
3309
+ body: VerifyAgentClaimInput;
3310
+ path?: never;
3311
+ query?: never;
3312
+ url: '/agent/claim/verify';
3313
+ };
3314
+ type VerifyAgentClaimErrors = {
3315
+ /**
3316
+ * Invalid request parameters
3317
+ */
3318
+ 400: ErrorResponse;
3319
+ /**
3320
+ * Invalid or missing API key
3321
+ */
3322
+ 401: ErrorResponse;
3323
+ /**
3324
+ * Resource not found
3325
+ */
3326
+ 404: ErrorResponse;
3327
+ /**
3328
+ * The account is already claimed, or the email is in use
3329
+ */
3330
+ 409: ErrorResponse;
3331
+ /**
3332
+ * The claim or its verification code has expired
3333
+ */
3334
+ 410: ErrorResponse;
3335
+ /**
3336
+ * Rate limit exceeded
3337
+ */
3338
+ 429: ErrorResponse;
3339
+ };
3340
+ type VerifyAgentClaimError = VerifyAgentClaimErrors[keyof VerifyAgentClaimErrors];
3341
+ type VerifyAgentClaimResponses = {
3342
+ /**
3343
+ * Claim verified; account upgraded to developer
3344
+ */
3345
+ 200: SuccessEnvelope & {
3346
+ data?: AgentClaimResult;
3347
+ };
3348
+ };
3349
+ type VerifyAgentClaimResponse = VerifyAgentClaimResponses[keyof VerifyAgentClaimResponses];
3350
+ type CreateAgentClaimLinkData = {
3351
+ body?: CreateAgentClaimLinkInput;
3352
+ path?: never;
3353
+ query?: never;
3354
+ url: '/agent/claim/link';
3355
+ };
3356
+ type CreateAgentClaimLinkErrors = {
3357
+ /**
3358
+ * Invalid or missing API key
3359
+ */
3360
+ 401: ErrorResponse;
3361
+ /**
3362
+ * Resource not found
3363
+ */
3364
+ 404: ErrorResponse;
3365
+ /**
3366
+ * The account is not claimable (not an agent account, or already claimed)
3367
+ */
3368
+ 409: ErrorResponse;
3369
+ /**
3370
+ * Rate limit exceeded
3371
+ */
3372
+ 429: ErrorResponse;
3373
+ };
3374
+ type CreateAgentClaimLinkError = CreateAgentClaimLinkErrors[keyof CreateAgentClaimLinkErrors];
3375
+ type CreateAgentClaimLinkResponses = {
3376
+ /**
3377
+ * Claim link created
3378
+ */
3379
+ 200: SuccessEnvelope & {
3380
+ data?: AgentClaimLinkResult;
3381
+ };
3382
+ };
3383
+ type CreateAgentClaimLinkResponse = CreateAgentClaimLinkResponses[keyof CreateAgentClaimLinkResponses];
3162
3384
  type CliLogoutData = {
3163
3385
  body?: CliLogoutInput;
3164
3386
  path?: never;
@@ -5344,7 +5566,7 @@ type ListFunctionLogsResponses = {
5344
5566
  };
5345
5567
  type ListFunctionLogsResponse = ListFunctionLogsResponses[keyof ListFunctionLogsResponses];
5346
5568
  declare namespace sdk_gen_d_exports {
5347
- export { Options, addDomain, cliLogout, createEndpoint, createFilter, createFunction, createFunctionSecret, deleteDomain, deleteEmail, deleteEndpoint, deleteFilter, deleteFunction, deleteFunctionSecret, discardEmailContent, downloadAttachments, downloadDomainZoneFile, downloadRawEmail, getAccount, getConversation, getEmail, getFunction, getFunctionRouting, getFunctionTestRunTrace, getInboxStatus, getOrgRoutingTopology, getSendPermissions, getSentEmail, getStorageStats, getThread, getWebhookSecret, listDeliveries, listDomains, listEmails, listEndpoints, listFilters, listFunctionLogs, listFunctionSecrets, listFunctions, listSentEmails, pollCliLogin, replayDelivery, replayEmailWebhooks, replyToEmail, resendAgentSignupVerification, resendCliSignupVerification, rotateWebhookSecret, searchEmails, semanticSearch, sendEmail, setFunctionRoute, setFunctionSecret, startAgentSignup, startCliLogin, startCliSignup, testEndpoint, testFunction, unsetFunctionRoute, updateAccount, updateDomain, updateEndpoint, updateFilter, updateFunction, verifyAgentSignup, verifyCliSignup, verifyDomain };
5569
+ export { Options, addDomain, cliLogout, createAgentAccount, createAgentClaimLink, createEndpoint, createFilter, createFunction, createFunctionSecret, deleteDomain, deleteEmail, deleteEndpoint, deleteFilter, deleteFunction, deleteFunctionSecret, discardEmailContent, downloadAttachments, downloadDomainZoneFile, downloadRawEmail, getAccount, getConversation, getEmail, getFunction, getFunctionRouting, getFunctionTestRunTrace, getInboxStatus, getOrgRoutingTopology, getSendPermissions, getSentEmail, getStorageStats, getThread, getWebhookSecret, listDeliveries, listDomains, listEmails, listEndpoints, listFilters, listFunctionLogs, listFunctionSecrets, listFunctions, listSentEmails, pollCliLogin, replayDelivery, replayEmailWebhooks, replyToEmail, resendAgentSignupVerification, resendCliSignupVerification, rotateWebhookSecret, searchEmails, semanticSearch, sendEmail, setFunctionRoute, setFunctionSecret, startAgentClaim, startAgentSignup, startCliLogin, startCliSignup, testEndpoint, testFunction, unsetFunctionRoute, updateAccount, updateDomain, updateEndpoint, updateFilter, updateFunction, verifyAgentClaim, verifyAgentSignup, verifyCliSignup, verifyDomain };
5348
5570
  }
5349
5571
  type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options$1<TData, ThrowOnError, TResponse> & {
5350
5572
  /**
@@ -5442,6 +5664,52 @@ declare const resendAgentSignupVerification: <ThrowOnError extends boolean = fal
5442
5664
  *
5443
5665
  */
5444
5666
  declare const verifyAgentSignup: <ThrowOnError extends boolean = false>(options: Options<VerifyAgentSignupData, ThrowOnError>) => RequestResult<VerifyAgentSignupResponses, VerifyAgentSignupErrors, ThrowOnError, "fields">;
5667
+ /**
5668
+ * Create an emailless agent account
5669
+ *
5670
+ * Creates an emailless agent account without authentication and returns a
5671
+ * one-time API key (prefixed `prim_`) plus a provisioned managed inbox.
5672
+ * The account is on the `agent` plan: reply-only (it can send only to
5673
+ * addresses that have already sent it authenticated mail) with tight send
5674
+ * limits. Use the returned `api_key` as a Bearer token on later calls. The
5675
+ * account can be upgraded to a full developer account by confirming an
5676
+ * email through the claim flow. This endpoint does not require an API key.
5677
+ *
5678
+ */
5679
+ declare const createAgentAccount: <ThrowOnError extends boolean = false>(options: Options<CreateAgentAccountData, ThrowOnError>) => RequestResult<CreateAgentAccountResponses, CreateAgentAccountErrors, ThrowOnError, "fields">;
5680
+ /**
5681
+ * Start an agent account email claim
5682
+ *
5683
+ * Begins upgrading an emailless `agent` account into a full `developer`
5684
+ * account by confirming an email address. Authenticated by the agent's own
5685
+ * API key (the org is taken from the credential). Sends a verification
5686
+ * code to the supplied email and returns the claim session id plus resend
5687
+ * timing. Submit the code to `/agent/claim/verify` to complete the
5688
+ * upgrade. Confirming an email that already belongs to a Primitive account
5689
+ * is rejected.
5690
+ *
5691
+ */
5692
+ declare const startAgentClaim: <ThrowOnError extends boolean = false>(options: Options<StartAgentClaimData, ThrowOnError>) => RequestResult<StartAgentClaimResponses, StartAgentClaimErrors, ThrowOnError, "fields">;
5693
+ /**
5694
+ * Verify an agent account email claim
5695
+ *
5696
+ * Confirms the verification code emailed by `/agent/claim/start` and
5697
+ * upgrades the account to the `developer` plan. The org id, API key, and
5698
+ * managed inbox all carry over; the send cap lifts. Authenticated by the
5699
+ * agent's own API key.
5700
+ *
5701
+ */
5702
+ declare const verifyAgentClaim: <ThrowOnError extends boolean = false>(options: Options<VerifyAgentClaimData, ThrowOnError>) => RequestResult<VerifyAgentClaimResponses, VerifyAgentClaimErrors, ThrowOnError, "fields">;
5703
+ /**
5704
+ * Create a browser claim link
5705
+ *
5706
+ * Mints an opaque, single-use link an agent can hand to a human to
5707
+ * complete the email-confirmation upgrade in a browser. Authenticated by
5708
+ * the agent's own API key. `claim_url` is null when the API host cannot
5709
+ * resolve a web origin to build the link.
5710
+ *
5711
+ */
5712
+ declare const createAgentClaimLink: <ThrowOnError extends boolean = false>(options?: Options<CreateAgentClaimLinkData, ThrowOnError>) => RequestResult<CreateAgentClaimLinkResponses, CreateAgentClaimLinkErrors, ThrowOnError, "fields">;
5445
5713
  /**
5446
5714
  * Revoke the current CLI OAuth session
5447
5715
  *
@@ -6420,7 +6688,48 @@ interface SemanticSearchResponse {
6420
6688
  meta: SemanticSearchMeta;
6421
6689
  }
6422
6690
  type PrimitiveClientOptions = PrimitiveApiClientOptions;
6691
+ /**
6692
+ * Agent-account operations, grouped under `client.agent`.
6693
+ *
6694
+ * These cover the emailless agent lifecycle: create a zero-touch account
6695
+ * (no auth required), then later upgrade it to a full developer account by
6696
+ * confirming an email (the claim flow, authenticated by the agent's own
6697
+ * API key). Field shapes are the generated request/response types, matching
6698
+ * the documented API surface.
6699
+ */
6700
+ declare class AgentResource {
6701
+ private readonly client;
6702
+ constructor(client: PrimitiveApiClient["client"]);
6703
+ /**
6704
+ * Create an emailless agent account. Unauthenticated: call this on a
6705
+ * client constructed without an API key. Returns a one-time `api_key`
6706
+ * (prefixed `prim_`, shown once) plus a provisioned managed inbox. The
6707
+ * account is on the reply-only `agent` plan and can be upgraded later via
6708
+ * the claim flow.
6709
+ */
6710
+ createAccount(input: CreateAgentAccountInput, options?: RequestOptions): Promise<AgentAccountResult>;
6711
+ /**
6712
+ * Start the email-claim upgrade for the authenticated agent account.
6713
+ * Sends a verification code to `email` and returns the claim session id
6714
+ * plus resend timing. Authenticated by the agent's own API key.
6715
+ */
6716
+ claimStart(input: StartAgentClaimInput, options?: RequestOptions): Promise<AgentClaimStartResult>;
6717
+ /**
6718
+ * Confirm the claim verification code and upgrade the account to the
6719
+ * `developer` plan. The org id, API key, and managed inbox carry over;
6720
+ * the send cap lifts.
6721
+ */
6722
+ claimVerify(input: VerifyAgentClaimInput, options?: RequestOptions): Promise<AgentClaimResult>;
6723
+ /**
6724
+ * Mint a browser claim link to hand to a human for the email-confirmation
6725
+ * upgrade. `claim_url` is null when the API host has no web origin to
6726
+ * build the link.
6727
+ */
6728
+ claimLink(input?: CreateAgentClaimLinkInput, options?: RequestOptions): Promise<AgentClaimLinkResult>;
6729
+ }
6423
6730
  declare class PrimitiveClient extends PrimitiveApiClient {
6731
+ /** Agent-account lifecycle operations (create, claim/upgrade). */
6732
+ readonly agent: AgentResource;
6424
6733
  send(input: SendInput, options?: RequestOptions): Promise<SendResult>;
6425
6734
  /**
6426
6735
  * Semantic / hybrid / keyword search across received and sent mail.
@@ -6454,4 +6763,4 @@ declare class PrimitiveClient extends PrimitiveApiClient {
6454
6763
  declare function createPrimitiveClient(options?: PrimitiveClientOptions): PrimitiveClient;
6455
6764
  declare function client(options?: PrimitiveClientOptions): PrimitiveClient;
6456
6765
  //#endregion
6457
- export { listDomains as $, ListEndpointsResponse as $a, UpdateDomainError as $c, GetOrgRoutingTopologyError as $i, DeleteFunctionError as $n, ResendAgentSignupVerificationErrors as $o, FunctionListItem as $r, SetFunctionRouteResponses as $s, CliLogoutResponses as $t, deleteEmail as A, InboxStatusEndpointSummary as Aa, TestEndpointResponses as Ac, GetEmailResponse as Ai, VerifyCliSignupError as Al, CreateFunctionSecretResponses as An, PollCliLoginError as Ao, DownloadRawEmailData as Ar, SemanticSearchScoreBreakdown as As, updateFunction as At, getConversation as B, ListDomainsData as Ba, UnsetFunctionRouteData as Bc, GetFunctionRoutingResponse as Bi, WebhookSecret as Bl, DeleteEmailResponse as Bn, ReplayEmailWebhooksData as Bo, EmailSearchFacetBucket as Br, SendPermissionAddress as Bs, AddDomainResponse as Bt, addDomain as C, GetWebhookSecretData as Ca, StartCliSignupResponses as Cc, GetConversationError as Ci, VerifyAgentSignupData as Cl, CreateFunctionResponses as Cn, ListSentEmailsError as Co, DownloadAttachmentsResponse as Cr, SemanticSearchError as Cs, testEndpoint as Ct, createFunction as D, GetWebhookSecretResponses as Da, TestEndpointError as Dc, GetEmailData as Di, VerifyAgentSignupResponse as Dl, CreateFunctionSecretErrors as Dn, PaginationMeta as Do, DownloadDomainZoneFileErrors as Dr, SemanticSearchMeta as Ds, updateDomain as Dt, createFilter as E, GetWebhookSecretResponse as Ea, TestEndpointData as Ec, GetConversationResponses as Ei, VerifyAgentSignupInput as El, CreateFunctionSecretError as En, ListSentEmailsResponses as Eo, DownloadDomainZoneFileError as Er, SemanticSearchInput as Es, updateAccount as Et, discardEmailContent as F, ListDeliveriesData as Fa, TestFunctionResponses as Fc, GetFunctionResponse as Fi, VerifyDomainData as Fl, DeleteDomainResponse as Fn, ReplayDeliveryData as Fo, EmailAddress as Fr, SendEmailResponse as Fs, AccountUpdated as Ft, getInboxStatus as G, ListEmailsData as Ga, UnverifiedDomain as Gc, GetFunctionTestRunTraceResponse as Gi, CreateClientConfig as Gl, DeleteEndpointResponse as Gn, ReplayResult as Go, EmailStatus as Gr, SendPermissionsMeta as Gs, AgentSignupVerifyResult as Gt, getFunction as H, ListDomainsErrors as Ha, UnsetFunctionRouteErrors as Hc, GetFunctionTestRunTraceData as Hi, Client as Hl, DeleteEndpointData as Hn, ReplayEmailWebhooksErrors as Ho, EmailSearchHighlights as Hr, SendPermissionManagedZone as Hs, AgentOrgRef as Ht, downloadAttachments as I, ListDeliveriesError as Ia, TestInvocationResult as Ic, GetFunctionResponses as Ii, VerifyDomainError as Il, DeleteDomainResponses as In, ReplayDeliveryError as Io, EmailAttachment as Ir, SendEmailResponses as Is, AddDomainData as It, getSentEmail as J, ListEmailsResponse as Ja, UpdateAccountErrors as Jc, GetInboxStatusError as Ji, RequestResult as Jl, DeleteFilterError as Jn, ReplyToEmailErrors as Jo, Endpoint as Jr, SentEmailSummary as Js, CliLogoutData as Jt, getOrgRoutingTopology as K, ListEmailsError as Ka, UpdateAccountData as Kc, GetFunctionTestRunTraceResponses as Ki, Options$1 as Kl, DeleteEndpointResponses as Kn, ReplyToEmailData as Ko, EmailSummary as Kr, SentEmailDetail as Ks, CliLoginPollResult as Kt, downloadDomainZoneFile as L, ListDeliveriesErrors as La, TestResult as Lc, GetFunctionRoutingData as Li, VerifyDomainErrors as Ll, DeleteEmailData as Ln, ReplayDeliveryErrors as Lo, EmailAuth as Lr, SendMailAttachment as Ls, AddDomainError as Lt, deleteFilter as M, InboxStatusNextAction as Ma, TestFunctionError as Mc, GetFunctionData as Mi, VerifyCliSignupInput as Ml, DeleteDomainData as Mn, PollCliLoginInput as Mo, DownloadRawEmailErrors as Mr, SendEmailData as Ms, verifyCliSignup as Mt, deleteFunction as N, InboxStatusRecentEmailSummary as Na, TestFunctionErrors as Nc, GetFunctionError as Ni, VerifyCliSignupResponse as Nl, DeleteDomainError as Nn, PollCliLoginResponse as No, DownloadRawEmailResponse as Nr, SendEmailError as Ns, verifyDomain as Nt, createFunctionSecret as O, InboxStatus as Oa, TestEndpointErrors as Oc, GetEmailError as Oi, VerifyAgentSignupResponses as Ol, CreateFunctionSecretInput as On, ParsedEmailData as Oo, DownloadDomainZoneFileResponse as Or, SemanticSearchResponses as Os, updateEndpoint as Ot, deleteFunctionSecret as P, Limit as Pa, TestFunctionResponse as Pc, GetFunctionErrors as Pi, VerifyCliSignupResponses as Pl, DeleteDomainErrors as Pn, PollCliLoginResponses as Po, DownloadRawEmailResponses as Pr, SendEmailErrors as Ps, Account as Pt, listDeliveries as Q, ListEndpointsErrors as Qa, UpdateDomainData as Qc, GetOrgRoutingTopologyData as Qi, DeleteFunctionData as Qn, ResendAgentSignupVerificationError as Qo, FunctionDetail as Qr, SetFunctionRouteResponse as Qs, CliLogoutResponse as Qt, downloadRawEmail as R, ListDeliveriesResponse as Ra, Thread as Rc, GetFunctionRoutingError as Ri, VerifyDomainResponse as Rl, DeleteEmailError as Rn, ReplayDeliveryResponse as Ro, EmailDetail as Rr, SendMailInput as Rs, AddDomainErrors as Rt, createPrimitiveApiClient as S, GetThreadResponses as Sa, StartCliSignupResponse as Sc, GetConversationData as Si, VerifiedDomain as Sl, CreateFunctionResponse as Sn, ListSentEmailsData as So, DownloadAttachmentsErrors as Sr, SemanticSearchData as Ss, startCliSignup as St, createEndpoint as T, GetWebhookSecretErrors as Ta, SuccessEnvelope as Tc, GetConversationResponse as Ti, VerifyAgentSignupErrors as Tl, CreateFunctionSecretData as Tn, ListSentEmailsResponse as To, DownloadDomainZoneFileData as Tr, SemanticSearchField as Ts, unsetFunctionRoute as Tt, getFunctionRouting as U, ListDomainsResponse as Ua, UnsetFunctionRouteResponse as Uc, GetFunctionTestRunTraceError as Ui, ClientOptions as Ul, DeleteEndpointError as Un, ReplayEmailWebhooksResponse as Uo, EmailSearchMeta as Ur, SendPermissionRule as Us, AgentSignupResendResult as Ut, getEmail as V, ListDomainsError as Va, UnsetFunctionRouteError as Vc, GetFunctionRoutingResponses as Vi, createClient as Vl, DeleteEmailResponses as Vn, ReplayEmailWebhooksError as Vo, EmailSearchFacets as Vr, SendPermissionAnyRecipient as Vs, AddDomainResponses as Vt, getFunctionTestRunTrace as W, ListDomainsResponses as Wa, UnsetFunctionRouteResponses as Wc, GetFunctionTestRunTraceErrors as Wi, Config as Wl, DeleteEndpointErrors as Wn, ReplayEmailWebhooksResponses as Wo, EmailSearchResult as Wr, SendPermissionYourDomain as Ws, AgentSignupStartResult as Wt, getThread as X, ListEndpointsData as Xa, UpdateAccountResponse as Xc, GetInboxStatusResponse as Xi, createConfig as Xl, DeleteFilterResponse as Xn, ReplyToEmailResponses as Xo, Filter as Xr, SetFunctionRouteError as Xs, CliLogoutErrors as Xt, getStorageStats as Y, ListEmailsResponses as Ya, UpdateAccountInput as Yc, GetInboxStatusErrors as Yi, ResponseStyle as Yl, DeleteFilterErrors as Yn, ReplyToEmailResponse as Yo, ErrorResponse as Yr, SetFunctionRouteData as Ys, CliLogoutError as Yt, getWebhookSecret as Z, ListEndpointsError as Za, UpdateAccountResponses as Zc, GetInboxStatusResponses as Zi, Auth as Zl, DeleteFilterResponses as Zn, ResendAgentSignupVerificationData as Zo, FunctionDeployStatus as Zr, SetFunctionRouteErrors as Zs, CliLogoutInput as Zt, PrimitiveApiClient as _, GetStorageStatsResponses as _a, StartCliLoginResponses as _c, GetAccountData as _i, UpdateFunctionError as _l, CreateFilterResponses as _n, ListFunctionsData as _o, Domain as _r, SearchEmailsError as _s, sendEmail as _t, RequestOptions as a, GetSendPermissionsErrors as aa, SetFunctionSecretResponses as ac, FunctionSecretWriteResult as ai, UpdateEndpointError as al, ConversationMessage as an, ListFiltersResponse as ao, DeleteFunctionSecretErrors as ar, ResendCliSignupVerificationErrors as as, listFunctions as at, PrimitiveApiErrorDetails as b, GetThreadErrors as ba, StartCliSignupErrors as bc, GetAccountResponse as bi, UpdateFunctionResponse as bl, CreateFunctionErrors as bn, ListFunctionsResponse as bo, DownloadAttachmentsData as br, SearchEmailsResponses as bs, startAgentSignup as bt, SendInput as c, GetSentEmailData as ca, StartAgentSignupErrors as cc, FunctionTestRunDeliveryEndpoint as ci, UpdateEndpointResponse as cl, CreateEndpointErrors as cn, ListFunctionLogsError as co, DeliveryStatus as cr, ResendCliSignupVerificationResponses as cs, replayDelivery as ct, client as d, GetSentEmailResponse as da, StartAgentSignupResponses as dc, FunctionTestRunReply as di, UpdateFilterError as dl, CreateEndpointResponses as dn, ListFunctionLogsResponses as do, DiscardEmailContentData as dr, RotateWebhookSecretError as ds, resendAgentSignupVerification as dt, GetOrgRoutingTopologyErrors as ea, SetFunctionSecretData as ec, FunctionLogRow as ei, UpdateDomainErrors as el, CliLogoutResult as en, ListEndpointsResponses as eo, DeleteFunctionErrors as er, ResendAgentSignupVerificationInput as es, listEmails as et, createPrimitiveClient as f, GetSentEmailResponses as fa, StartCliLoginData as fc, FunctionTestRunSend as fi, UpdateFilterErrors as fl, CreateFilterData as fn, ListFunctionSecretsData as fo, DiscardEmailContentError as fr, RotateWebhookSecretErrors as fs, resendCliSignupVerification as ft, DEFAULT_API_BASE_URL as g, GetStorageStatsResponse as ga, StartCliLoginResponse as gc, GateFix as gi, UpdateFunctionData as gl, CreateFilterResponse as gn, ListFunctionSecretsResponses as go, DkimSignature as gr, SearchEmailsData as gs, semanticSearch as gt, verifyWebhookSignature as h, GetStorageStatsErrors as ha, StartCliLoginInput as hc, GateDenial as hi, UpdateFilterResponses as hl, CreateFilterInput as hn, ListFunctionSecretsResponse as ho, DiscardEmailContentResponses as hr, RoutingTopology as hs, searchEmails as ht, ReplyInput as i, GetSendPermissionsError as ia, SetFunctionSecretResponse as ic, FunctionSecretListItem as ii, UpdateEndpointData as il, Conversation as in, ListFiltersErrors as io, DeleteFunctionSecretError as ir, ResendCliSignupVerificationError as is, listFunctionSecrets as it, deleteEndpoint as j, InboxStatusFunctionSummary as ja, TestFunctionData as jc, GetEmailResponses as ji, VerifyCliSignupErrors as jl, Cursor as jn, PollCliLoginErrors as jo, DownloadRawEmailError as jr, SemanticSearchSnippet as js, verifyAgentSignup as jt, deleteDomain as k, InboxStatusDomain as ka, TestEndpointResponse as kc, GetEmailErrors as ki, VerifyCliSignupData as kl, CreateFunctionSecretResponse as kn, PollCliLoginData as ko, DownloadDomainZoneFileResponses as kr, SemanticSearchResult as ks, updateFilter as kt, SendResult as l, GetSentEmailError as la, StartAgentSignupInput as lc, FunctionTestRunInboundEmail as li, UpdateEndpointResponses as ll, CreateEndpointInput as ln, ListFunctionLogsErrors as lo, DeliverySummary as lr, ResourceId as ls, replayEmailWebhooks as lt, VerifyOptions as m, GetStorageStatsError as ma, StartCliLoginErrors as mc, FunctionTestRunTrace as mi, UpdateFilterResponse as ml, CreateFilterErrors as mn, ListFunctionSecretsErrors as mo, DiscardEmailContentResponse as mr, RotateWebhookSecretResponses as ms, sdk_gen_d_exports as mt, PrimitiveClient as n, GetOrgRoutingTopologyResponses as na, SetFunctionSecretErrors as nc, FunctionRouteResult as ni, UpdateDomainResponse as nl, CliSignupStartResult as nn, ListFiltersData as no, DeleteFunctionResponses as nr, ResendAgentSignupVerificationResponses as ns, listFilters as nt, SemanticSearchResponse as o, GetSendPermissionsResponse as oa, StartAgentSignupData as oc, FunctionTestRun as oi, UpdateEndpointErrors as ol, CreateEndpointData as on, ListFiltersResponses as oo, DeleteFunctionSecretResponse as or, ResendCliSignupVerificationInput as os, listSentEmails as ot, PRIMITIVE_SIGNATURE_HEADER as p, GetStorageStatsData as pa, StartCliLoginError as pc, FunctionTestRunState as pi, UpdateFilterInput as pl, CreateFilterError as pn, ListFunctionSecretsError as po, DiscardEmailContentErrors as pr, RotateWebhookSecretResponse as ps, rotateWebhookSecret as pt, getSendPermissions as q, ListEmailsErrors as qa, UpdateAccountError as qc, GetInboxStatusData as qi, RequestOptions$2 as ql, DeleteFilterData as qn, ReplyToEmailError as qo, EmailWebhookStatus as qr, SentEmailStatus as qs, CliLoginStartResult as qt, PrimitiveClientOptions as r, GetSendPermissionsData as ra, SetFunctionSecretInput as rc, FunctionRouting as ri, UpdateDomainResponses as rl, CliSignupVerifyResult as rn, ListFiltersError as ro, DeleteFunctionSecretData as rr, ResendCliSignupVerificationData as rs, listFunctionLogs as rt, SendAttachment as s, GetSendPermissionsResponses as sa, StartAgentSignupError as sc, FunctionTestRunDelivery as si, UpdateEndpointInput as sl, CreateEndpointError as sn, ListFunctionLogsData as so, DeleteFunctionSecretResponses as sr, ResendCliSignupVerificationResponse as ss, pollCliLogin as st, ForwardInput as t, GetOrgRoutingTopologyResponse as ta, SetFunctionSecretError as tc, FunctionRouteBody as ti, UpdateDomainInput as tl, CliSignupResendResult as tn, ListEnvelope as to, DeleteFunctionResponse as tr, ResendAgentSignupVerificationResponse as ts, listEndpoints as tt, SendThreadInput as u, GetSentEmailErrors as ua, StartAgentSignupResponse as uc, FunctionTestRunOutboundRequest as ui, UpdateFilterData as ul, CreateEndpointResponse as un, ListFunctionLogsResponse as uo, DiscardContentResult as ur, RotateWebhookSecretData as us, replyToEmail as ut, PrimitiveApiClientOptions as v, GetThreadData as va, StartCliSignupData as vc, GetAccountError as vi, UpdateFunctionErrors as vl, CreateFunctionData as vn, ListFunctionsError as vo, DomainDnsRecord as vr, SearchEmailsErrors as vs, setFunctionRoute as vt, cliLogout as w, GetWebhookSecretError as wa, StorageStats as wc, GetConversationErrors as wi, VerifyAgentSignupError as wl, CreateFunctionResult as wn, ListSentEmailsErrors as wo, DownloadAttachmentsResponses as wr, SemanticSearchErrors as ws, testFunction as wt, RequestOptions$1 as x, GetThreadResponse as xa, StartCliSignupInput as xc, GetAccountResponses as xi, UpdateFunctionResponses as xl, CreateFunctionInput as xn, ListFunctionsResponses as xo, DownloadAttachmentsError as xr, SemanticSearchCoverage as xs, startCliLogin as xt, PrimitiveApiError as y, GetThreadError as ya, StartCliSignupError as yc, GetAccountErrors as yi, UpdateFunctionInput as yl, CreateFunctionError as yn, ListFunctionsErrors as yo, DomainVerifyResult as yr, SearchEmailsResponse as ys, setFunctionSecret as yt, getAccount as z, ListDeliveriesResponses as za, ThreadMessage as zc, GetFunctionRoutingErrors as zi, VerifyDomainResponses as zl, DeleteEmailErrors as zn, ReplayDeliveryResponses as zo, EmailDetailReply as zr, SendMailResult as zs, AddDomainInput as zt };
6766
+ export { getThread as $, InboxStatusFunctionSummary as $a, StorageStats as $c, GetEmailResponses as $i, VerifyAgentClaimError as $l, Cursor as $n, PollCliLoginError as $o, DownloadRawEmailError as $r, SemanticSearchScoreBreakdown as $s, AgentSignupResendResult as $t, createFunction as A, GetSentEmailData as Aa, StartAgentClaimError as Ac, FunctionTestRunDeliveryEndpoint as Ai, UpdateDomainInput as Al, CreateEndpointErrors as An, ListFunctionLogsError as Ao, DeliveryStatus as Ar, ResendCliSignupVerificationResponse as As, updateAccount as At, ResponseStyle as Au, downloadDomainZoneFile as B, GetThreadData as Ba, StartAgentSignupResponses as Bc, GetAccountError as Bi, UpdateFilterError as Bl, CreateFunctionData as Bn, ListFunctionsError as Bo, DomainDnsRecord as Br, SearchEmailsError as Bs, AccountUpdated as Bt, createPrimitiveApiClient as C, GetOrgRoutingTopologyResponse as Ca, SetFunctionSecretData as Cc, FunctionRouteBody as Ci, UpdateAccountErrors as Cl, CreateAgentClaimLinkError as Cn, ListEnvelope as Co, DeleteFunctionResponse as Cr, ResendAgentSignupVerificationInput as Cs, startAgentClaim as Ct, Client as Cu, createAgentClaimLink as D, GetSendPermissionsErrors as Da, SetFunctionSecretResponse as Dc, FunctionSecretWriteResult as Di, UpdateDomainData as Dl, CreateAgentClaimLinkResponses as Dn, ListFiltersResponse as Do, DeleteFunctionSecretErrors as Dr, ResendCliSignupVerificationError as Ds, testEndpoint as Dt, Options$1 as Du, createAgentAccount as E, GetSendPermissionsError as Ea, SetFunctionSecretInput as Ec, FunctionSecretListItem as Ei, UpdateAccountResponses as El, CreateAgentClaimLinkResponse as En, ListFiltersErrors as Eo, DeleteFunctionSecretError as Er, ResendCliSignupVerificationData as Es, startCliSignup as Et, CreateClientConfig as Eu, deleteFilter as F, GetStorageStatsData as Fa, StartAgentSignupData as Fc, FunctionTestRunState as Fi, UpdateEndpointErrors as Fl, CreateFilterError as Fn, ListFunctionSecretsError as Fo, DiscardEmailContentErrors as Fr, RotateWebhookSecretErrors as Fs, verifyAgentClaim as Ft, getFunction as G, GetWebhookSecretData as Ga, StartCliLoginResponse as Gc, GetConversationError as Gi, UpdateFunctionData as Gl, CreateFunctionResponses as Gn, ListSentEmailsError as Go, DownloadAttachmentsResponse as Gr, SemanticSearchData as Gs, AddDomainResponse as Gt, getAccount as H, GetThreadErrors as Ha, StartCliLoginError as Hc, GetAccountResponse as Hi, UpdateFilterInput as Hl, CreateFunctionErrors as Hn, ListFunctionsResponse as Ho, DownloadAttachmentsData as Hr, SearchEmailsResponse as Hs, AddDomainError as Ht, deleteFunction as I, GetStorageStatsError as Ia, StartAgentSignupError as Ic, FunctionTestRunTrace as Ii, UpdateEndpointInput as Il, CreateFilterErrors as In, ListFunctionSecretsErrors as Io, DiscardEmailContentResponse as Ir, RotateWebhookSecretResponse as Is, verifyAgentSignup as It, getInboxStatus as J, GetWebhookSecretResponse as Ja, StartCliSignupError as Jc, GetConversationResponses as Ji, UpdateFunctionInput as Jl, CreateFunctionSecretError as Jn, ListSentEmailsResponses as Jo, DownloadDomainZoneFileError as Jr, SemanticSearchField as Js, AgentAccountUpgradeHint as Jt, getFunctionRouting as K, GetWebhookSecretError as Ka, StartCliLoginResponses as Kc, GetConversationErrors as Ki, UpdateFunctionError as Kl, CreateFunctionResult as Kn, ListSentEmailsErrors as Ko, DownloadAttachmentsResponses as Kr, SemanticSearchError as Ks, AddDomainResponses as Kt, deleteFunctionSecret as L, GetStorageStatsErrors as La, StartAgentSignupErrors as Lc, GateDenial as Li, UpdateEndpointResponse as Ll, CreateFilterInput as Ln, ListFunctionSecretsResponse as Lo, DiscardEmailContentResponses as Lr, RotateWebhookSecretResponses as Ls, verifyCliSignup as Lt, deleteDomain as M, GetSentEmailErrors as Ma, StartAgentClaimInput as Mc, FunctionTestRunOutboundRequest as Mi, UpdateDomainResponses as Ml, CreateEndpointResponse as Mn, ListFunctionLogsResponse as Mo, DiscardContentResult as Mr, ResourceId as Ms, updateEndpoint as Mt, Auth as Mu, deleteEmail as N, GetSentEmailResponse as Na, StartAgentClaimResponse as Nc, FunctionTestRunReply as Ni, UpdateEndpointData as Nl, CreateEndpointResponses as Nn, ListFunctionLogsResponses as No, DiscardEmailContentData as Nr, RotateWebhookSecretData as Ns, updateFilter as Nt, createEndpoint as O, GetSendPermissionsResponse as Oa, SetFunctionSecretResponses as Oc, FunctionTestRun as Oi, UpdateDomainError as Ol, CreateEndpointData as On, ListFiltersResponses as Oo, DeleteFunctionSecretResponse as Or, ResendCliSignupVerificationErrors as Os, testFunction as Ot, RequestOptions$2 as Ou, deleteEndpoint as P, GetSentEmailResponses as Pa, StartAgentClaimResponses as Pc, FunctionTestRunSend as Pi, UpdateEndpointError as Pl, CreateFilterData as Pn, ListFunctionSecretsData as Po, DiscardEmailContentError as Pr, RotateWebhookSecretError as Ps, updateFunction as Pt, getStorageStats as Q, InboxStatusEndpointSummary as Qa, StartCliSignupResponses as Qc, GetEmailResponse as Qi, VerifyAgentClaimData as Ql, CreateFunctionSecretResponses as Qn, PollCliLoginData as Qo, DownloadRawEmailData as Qr, SemanticSearchResult as Qs, AgentOrgRef as Qt, discardEmailContent as R, GetStorageStatsResponse as Ra, StartAgentSignupInput as Rc, GateFix as Ri, UpdateEndpointResponses as Rl, CreateFilterResponse as Rn, ListFunctionSecretsResponses as Ro, DkimSignature as Rr, RoutingTopology as Rs, verifyDomain as Rt, RequestOptions$1 as S, GetOrgRoutingTopologyErrors as Sa, SetFunctionRouteResponses as Sc, FunctionLogRow as Si, UpdateAccountError as Sl, CreateAgentClaimLinkData as Sn, ListEndpointsResponses as So, DeleteFunctionErrors as Sr, ResendAgentSignupVerificationErrors as Ss, setFunctionSecret as St, createClient as Su, cliLogout as T, GetSendPermissionsData as Ta, SetFunctionSecretErrors as Tc, FunctionRouting as Ti, UpdateAccountResponse as Tl, CreateAgentClaimLinkInput as Tn, ListFiltersError as To, DeleteFunctionSecretData as Tr, ResendAgentSignupVerificationResponses as Ts, startCliLogin as Tt, Config as Tu, getConversation as U, GetThreadResponse as Ua, StartCliLoginErrors as Uc, GetAccountResponses as Ui, UpdateFilterResponse as Ul, CreateFunctionInput as Un, ListFunctionsResponses as Uo, DownloadAttachmentsError as Ur, SearchEmailsResponses as Us, AddDomainErrors as Ut, downloadRawEmail as V, GetThreadError as Va, StartCliLoginData as Vc, GetAccountErrors as Vi, UpdateFilterErrors as Vl, CreateFunctionError as Vn, ListFunctionsErrors as Vo, DomainVerifyResult as Vr, SearchEmailsErrors as Vs, AddDomainData as Vt, getEmail as W, GetThreadResponses as Wa, StartCliLoginInput as Wc, GetConversationData as Wi, UpdateFilterResponses as Wl, CreateFunctionResponse as Wn, ListSentEmailsData as Wo, DownloadAttachmentsErrors as Wr, SemanticSearchCoverage as Ws, AddDomainInput as Wt, getSendPermissions as X, InboxStatus as Xa, StartCliSignupInput as Xc, GetEmailError as Xi, UpdateFunctionResponses as Xl, CreateFunctionSecretInput as Xn, ParsedEmailData as Xo, DownloadDomainZoneFileResponse as Xr, SemanticSearchMeta as Xs, AgentClaimResult as Xt, getOrgRoutingTopology as Y, GetWebhookSecretResponses as Ya, StartCliSignupErrors as Yc, GetEmailData as Yi, UpdateFunctionResponse as Yl, CreateFunctionSecretErrors as Yn, PaginationMeta as Yo, DownloadDomainZoneFileErrors as Yr, SemanticSearchInput as Ys, AgentClaimLinkResult as Yt, getSentEmail as Z, InboxStatusDomain as Za, StartCliSignupResponse as Zc, GetEmailErrors as Zi, VerifiedDomain as Zl, CreateFunctionSecretResponse as Zn, PlanLimits as Zo, DownloadDomainZoneFileResponses as Zr, SemanticSearchResponses as Zs, AgentClaimStartResult as Zt, DEFAULT_API_BASE_URL as _, GetInboxStatusErrors as _a, SentEmailSummary as _c, ErrorResponse as _i, UnsetFunctionRouteErrors as _l, CreateAgentAccountError as _n, ListEmailsResponses as _o, DeleteFilterErrors as _r, ReplyToEmailErrors as _s, sdk_gen_d_exports as _t, VerifyDomainError as _u, ReplyInput as a, GetFunctionRoutingData as aa, SendEmailResponses as ac, EmailAuth as ai, TestEndpointResponses as al, CliLogoutError as an, ListDeliveriesErrors as ao, DeleteEmailData as ar, ReplayDeliveryError as as, listFilters as at, VerifyAgentSignupError as au, PrimitiveApiError as b, GetOrgRoutingTopologyData as ba, SetFunctionRouteErrors as bc, FunctionDetail as bi, UnverifiedDomain as bl, CreateAgentAccountResponse as bn, ListEndpointsErrors as bo, DeleteFunctionData as br, ResendAgentSignupVerificationData as bs, sendEmail as bt, VerifyDomainResponses as bu, SendAttachment as c, GetFunctionRoutingResponse as ca, SendMailResult as cc, EmailSearchFacetBucket as ci, TestFunctionErrors as cl, CliLogoutResponse as cn, ListDomainsData as co, DeleteEmailResponse as cr, ReplayDeliveryResponses as cs, listFunctions as ct, VerifyAgentSignupResponse as cu, SendThreadInput as d, GetFunctionTestRunTraceError as da, SendPermissionManagedZone as dc, EmailSearchMeta as di, TestInvocationResult as dl, CliSignupResendResult as dn, ListDomainsResponse as do, DeleteEndpointError as dr, ReplayEmailWebhooksErrors as ds, replayDelivery as dt, VerifyCliSignupError as du, GetFunctionData as ea, SemanticSearchSnippet as ec, DownloadRawEmailErrors as ei, SuccessEnvelope as el, AgentSignupStartResult as en, InboxStatusNextAction as eo, DeleteDomainData as er, PollCliLoginErrors as es, getWebhookSecret as et, VerifyAgentClaimErrors as eu, client as f, GetFunctionTestRunTraceErrors as fa, SendPermissionRule as fc, EmailSearchResult as fi, TestResult as fl, CliSignupStartResult as fn, ListDomainsResponses as fo, DeleteEndpointErrors as fr, ReplayEmailWebhooksResponse as fs, replayEmailWebhooks as ft, VerifyCliSignupErrors as fu, verifyWebhookSignature as g, GetInboxStatusError as ga, SentEmailStatus as gc, Endpoint as gi, UnsetFunctionRouteError as gl, CreateAgentAccountData as gn, ListEmailsResponse as go, DeleteFilterError as gr, ReplyToEmailError as gs, rotateWebhookSecret as gt, VerifyDomainData as gu, VerifyOptions as h, GetInboxStatusData as ha, SentEmailDetail as hc, EmailWebhookStatus as hi, UnsetFunctionRouteData as hl, ConversationMessage as hn, ListEmailsErrors as ho, DeleteFilterData as hr, ReplyToEmailData as hs, resendCliSignupVerification as ht, VerifyCliSignupResponses as hu, PrimitiveClientOptions as i, GetFunctionResponses as ia, SendEmailResponse as ic, EmailAttachment as ii, TestEndpointResponse as il, CliLogoutData as in, ListDeliveriesError as io, DeleteDomainResponses as ir, ReplayDeliveryData as is, listEndpoints as it, VerifyAgentSignupData as iu, createFunctionSecret as j, GetSentEmailError as ja, StartAgentClaimErrors as jc, FunctionTestRunInboundEmail as ji, UpdateDomainResponse as jl, CreateEndpointInput as jn, ListFunctionLogsErrors as jo, DeliverySummary as jr, ResendCliSignupVerificationResponses as js, updateDomain as jt, createConfig as ju, createFilter as k, GetSendPermissionsResponses as ka, StartAgentClaimData as kc, FunctionTestRunDelivery as ki, UpdateDomainErrors as kl, CreateEndpointError as kn, ListFunctionLogsData as ko, DeleteFunctionSecretResponses as kr, ResendCliSignupVerificationInput as ks, unsetFunctionRoute as kt, RequestResult as ku, SendInput as l, GetFunctionRoutingResponses as la, SendPermissionAddress as lc, EmailSearchFacets as li, TestFunctionResponse as ll, CliLogoutResponses as ln, ListDomainsError as lo, DeleteEmailResponses as lr, ReplayEmailWebhooksData as ls, listSentEmails as lt, VerifyAgentSignupResponses as lu, PRIMITIVE_SIGNATURE_HEADER as m, GetFunctionTestRunTraceResponses as ma, SendPermissionsMeta as mc, EmailSummary as mi, ThreadMessage as ml, Conversation as mn, ListEmailsError as mo, DeleteEndpointResponses as mr, ReplayResult as ms, resendAgentSignupVerification as mt, VerifyCliSignupResponse as mu, ForwardInput as n, GetFunctionErrors as na, SendEmailError as nc, DownloadRawEmailResponses as ni, TestEndpointError as nl, CliLoginPollResult as nn, Limit as no, DeleteDomainErrors as nr, PollCliLoginResponse as ns, listDomains as nt, VerifyAgentClaimResponse as nu, RequestOptions as o, GetFunctionRoutingError as oa, SendMailAttachment as oc, EmailDetail as oi, TestFunctionData as ol, CliLogoutErrors as on, ListDeliveriesResponse as oo, DeleteEmailError as or, ReplayDeliveryErrors as os, listFunctionLogs as ot, VerifyAgentSignupErrors as ou, createPrimitiveClient as p, GetFunctionTestRunTraceResponse as pa, SendPermissionYourDomain as pc, EmailStatus as pi, Thread as pl, CliSignupVerifyResult as pn, ListEmailsData as po, DeleteEndpointResponse as pr, ReplayEmailWebhooksResponses as ps, replyToEmail as pt, VerifyCliSignupInput as pu, getFunctionTestRunTrace as q, GetWebhookSecretErrors as qa, StartCliSignupData as qc, GetConversationResponse as qi, UpdateFunctionErrors as ql, CreateFunctionSecretData as qn, ListSentEmailsResponse as qo, DownloadDomainZoneFileData as qr, SemanticSearchErrors as qs, AgentAccountResult as qt, PrimitiveClient as r, GetFunctionResponse as ra, SendEmailErrors as rc, EmailAddress as ri, TestEndpointErrors as rl, CliLoginStartResult as rn, ListDeliveriesData as ro, DeleteDomainResponse as rr, PollCliLoginResponses as rs, listEmails as rt, VerifyAgentClaimResponses as ru, SemanticSearchResponse as s, GetFunctionRoutingErrors as sa, SendMailInput as sc, EmailDetailReply as si, TestFunctionError as sl, CliLogoutInput as sn, ListDeliveriesResponses as so, DeleteEmailErrors as sr, ReplayDeliveryResponse as ss, listFunctionSecrets as st, VerifyAgentSignupInput as su, AgentResource as t, GetFunctionError as ta, SendEmailData as tc, DownloadRawEmailResponse as ti, TestEndpointData as tl, AgentSignupVerifyResult as tn, InboxStatusRecentEmailSummary as to, DeleteDomainError as tr, PollCliLoginInput as ts, listDeliveries as tt, VerifyAgentClaimInput as tu, SendResult as u, GetFunctionTestRunTraceData as ua, SendPermissionAnyRecipient as uc, EmailSearchHighlights as ui, TestFunctionResponses as ul, CliLogoutResult as un, ListDomainsErrors as uo, DeleteEndpointData as ur, ReplayEmailWebhooksError as us, pollCliLogin as ut, VerifyCliSignupData as uu, PrimitiveApiClient as v, GetInboxStatusResponse as va, SetFunctionRouteData as vc, Filter as vi, UnsetFunctionRouteResponse as vl, CreateAgentAccountErrors as vn, ListEndpointsData as vo, DeleteFilterResponse as vr, ReplyToEmailResponse as vs, searchEmails as vt, VerifyDomainErrors as vu, addDomain as w, GetOrgRoutingTopologyResponses as wa, SetFunctionSecretError as wc, FunctionRouteResult as wi, UpdateAccountInput as wl, CreateAgentClaimLinkErrors as wn, ListFiltersData as wo, DeleteFunctionResponses as wr, ResendAgentSignupVerificationResponse as ws, startAgentSignup as wt, ClientOptions as wu, PrimitiveApiErrorDetails as x, GetOrgRoutingTopologyError as xa, SetFunctionRouteResponse as xc, FunctionListItem as xi, UpdateAccountData as xl, CreateAgentAccountResponses as xn, ListEndpointsResponse as xo, DeleteFunctionError as xr, ResendAgentSignupVerificationError as xs, setFunctionRoute as xt, WebhookSecret as xu, PrimitiveApiClientOptions as y, GetInboxStatusResponses as ya, SetFunctionRouteError as yc, FunctionDeployStatus as yi, UnsetFunctionRouteResponses as yl, CreateAgentAccountInput as yn, ListEndpointsError as yo, DeleteFilterResponses as yr, ReplyToEmailResponses as ys, semanticSearch as yt, VerifyDomainResponse as yu, downloadAttachments as z, GetStorageStatsResponses as za, StartAgentSignupResponse as zc, GetAccountData as zi, UpdateFilterData as zl, CreateFilterResponses as zn, ListFunctionsData as zo, Domain as zr, SearchEmailsData as zs, Account as zt };
package/dist/index.d.ts CHANGED
@@ -1,12 +1,192 @@
1
- import { c as SendInput, d as client, f as createPrimitiveClient, i as ReplyInput, l as SendResult, n as PrimitiveClient, r as PrimitiveClientOptions, s as SendAttachment, t as ForwardInput, u as SendThreadInput, y as PrimitiveApiError } from "./index-DdSffRr0.js";
1
+ import { Jt as AgentAccountUpgradeHint, Mc as StartAgentClaimInput, Tn as CreateAgentClaimLinkInput, Xt as AgentClaimResult, Yt as AgentClaimLinkResult, Zo as PlanLimits, Zt as AgentClaimStartResult, a as ReplyInput, b as PrimitiveApiError, c as SendAttachment, d as SendThreadInput, f as client, i as PrimitiveClientOptions, l as SendInput, n as ForwardInput, p as createPrimitiveClient, qt as AgentAccountResult, r as PrimitiveClient, tu as VerifyAgentClaimInput, u as SendResult, yn as CreateAgentAccountInput } from "./index-X7RsDaVi.js";
2
2
  import { A as UnknownEvent, C as ParsedDataFailed, D as RawContentDownloadOnly, E as RawContent, M as WebhookAttachment, N as WebhookEvent, O as RawContentInline, S as ParsedDataComplete, T as ParsedStatus, _ as ForwardResultInline, a as DmarcPolicy, b as KnownWebhookEvent, c as EmailAnalysis, d as EventType, f as ForwardAnalysis, g as ForwardResultAttachmentSkipped, h as ForwardResultAttachmentAnalyzed, i as DkimSignature, j as ValidateEmailAuthResult, k as SpfResult, l as EmailAuth, m as ForwardResult, n as AuthVerdict, o as DmarcResult, p as ForwardOriginalSender, r as DkimResult, s as EmailAddress, t as AuthConfidence, u as EmailReceivedEvent, v as ForwardVerdict, w as ParsedError, x as ParsedData, y as ForwardVerification } from "./types-yNU-Oiea.js";
3
3
  import { _ as buildForwardSubject, a as RawEmailDecodeErrorCode, b as normalizeReceivedEmail, c as WebhookPayloadError, d as WebhookValidationErrorCode, f as WebhookVerificationError, g as ReceivedEmailThread, h as ReceivedEmailAddress, i as RawEmailDecodeError, l as WebhookPayloadErrorCode, m as ReceivedEmail, n as PrimitiveWebhookError, o as VERIFICATION_ERRORS, p as WebhookVerificationErrorCode, r as RAW_EMAIL_ERRORS, s as WebhookErrorCode, t as PAYLOAD_ERRORS, u as WebhookValidationError, v as buildReplySubject, x as parseHeaderAddress, y as formatAddress } from "./errors-7E9sW9eX.js";
4
4
  import { A as VerifyOptions, C as signStandardWebhooksPayload, D as PRIMITIVE_CONFIRMED_HEADER, E as LEGACY_SIGNATURE_HEADER, F as VerifyDownloadTokenResult, I as generateDownloadToken, L as verifyDownloadToken, M as verifyWebhookSignature, N as GenerateDownloadTokenOptions, O as PRIMITIVE_SIGNATURE_HEADER, P as VerifyDownloadTokenOptions, R as safeValidateEmailReceivedEvent, S as StandardWebhooksVerifyOptions, T as LEGACY_CONFIRMED_HEADER, _ as emailReceivedEventJsonSchema, a as confirmedHeaders, b as STANDARD_WEBHOOK_TIMESTAMP_HEADER, c as handleWebhook, d as isRawIncluded, f as parseWebhookEvent, g as validateEmailAuth, h as WEBHOOK_VERSION, i as WebhookHeaders, j as signWebhookPayload, k as SignResult, l as isDownloadExpired, m as verifyRawEmailDownload, n as HandleWebhookOptions, o as decodeRawEmail, p as receive, r as ReceiveRequestOptions, s as getDownloadTimeRemaining, t as DecodeRawEmailOptions, u as isEmailReceivedEvent, v as STANDARD_WEBHOOK_ID_HEADER, w as verifyStandardWebhooksSignature, x as StandardWebhooksSignResult, y as STANDARD_WEBHOOK_SIGNATURE_HEADER, z as validateEmailReceivedEvent } from "./index-DR978rq5.js";
5
+ import { Address, Hex } from "viem";
5
6
 
7
+ //#region src/x402/sign.d.ts
8
+ interface NonceBinding {
9
+ /** The interaction id, including its `@domain`. Lowercased before hashing. */
10
+ interactionId: string;
11
+ /** The challenge step id (a UUID). Lowercased before hashing. */
12
+ challengeStepId: string;
13
+ /** The challenger's per-challenge random nonce: 64 lowercase hex chars. */
14
+ challengeNonce: string;
15
+ }
16
+ /**
17
+ * Derive the EIP-3009 nonce bound to a specific interaction step:
18
+ *
19
+ * keccak256( utf8(lower(interaction_id)) || 0x00
20
+ * || utf8(lower(challenge_step_id)) || 0x00
21
+ * || hexdecode(challenge_nonce) )
22
+ *
23
+ * The `0x00` separators pin the field boundaries (undelimited concatenation of
24
+ * variable-length strings is collision-ambiguous), and the challenge nonce is
25
+ * decoded to its 32 raw bytes before hashing. The platform recomputes this and
26
+ * rejects a mismatch.
27
+ */
28
+ declare function deriveEip3009Nonce(input: NonceBinding): Hex;
29
+ /**
30
+ * The EIP-3009 `TransferWithAuthorization` EIP-712 type. The field order and
31
+ * types are part of the on-chain contract and MUST NOT change.
32
+ */
33
+ declare const TRANSFER_WITH_AUTHORIZATION_TYPES: {
34
+ readonly TransferWithAuthorization: readonly [{
35
+ readonly name: "from";
36
+ readonly type: "address";
37
+ }, {
38
+ readonly name: "to";
39
+ readonly type: "address";
40
+ }, {
41
+ readonly name: "value";
42
+ readonly type: "uint256";
43
+ }, {
44
+ readonly name: "validAfter";
45
+ readonly type: "uint256";
46
+ }, {
47
+ readonly name: "validBefore";
48
+ readonly type: "uint256";
49
+ }, {
50
+ readonly name: "nonce";
51
+ readonly type: "bytes32";
52
+ }];
53
+ };
54
+ /**
55
+ * The token's EIP-712 domain. `name`/`version` MUST be the actual token's domain
56
+ * params (Base mainnet USDC reports `name: "USD Coin"`, Base Sepolia `"USDC"`;
57
+ * both `version: "2"`); they come from the challenge's payment requirements
58
+ * `extra`. A wrong name/version produces a signature the verifier rejects.
59
+ */
60
+ interface TokenDomain {
61
+ name: string;
62
+ version: string;
63
+ chainId: number;
64
+ verifyingContract: Address;
65
+ }
66
+ interface TransferAuthorization {
67
+ from: Address;
68
+ to: Address;
69
+ /** Token base units (USDC has 6 decimals), as a bigint. */
70
+ value: bigint;
71
+ validAfter: bigint;
72
+ validBefore: bigint;
73
+ nonce: Hex;
74
+ }
75
+ interface TransferWithAuthorizationTypedData {
76
+ domain: {
77
+ name: string;
78
+ version: string;
79
+ chainId: number;
80
+ verifyingContract: Address;
81
+ };
82
+ types: typeof TRANSFER_WITH_AUTHORIZATION_TYPES;
83
+ primaryType: "TransferWithAuthorization";
84
+ message: TransferAuthorization;
85
+ }
86
+ /**
87
+ * A customer-held signer. A viem `LocalAccount` satisfies this directly; any
88
+ * key source (hardware wallet, injected provider) can be adapted. The key never
89
+ * leaves the caller.
90
+ */
91
+ interface X402Signer {
92
+ address: Address;
93
+ signTypedData(typedData: TransferWithAuthorizationTypedData): Promise<Hex>;
94
+ }
95
+ /** The x402 wire payload (validated server-side against the x402 schema). */
96
+ interface X402PaymentPayload {
97
+ x402Version: 1;
98
+ scheme: "exact";
99
+ network: string;
100
+ payload: {
101
+ signature: Hex;
102
+ authorization: {
103
+ from: Address;
104
+ to: Address;
105
+ value: string;
106
+ validAfter: string;
107
+ validBefore: string;
108
+ nonce: Hex;
109
+ };
110
+ };
111
+ }
112
+ //#endregion
113
+ //#region src/x402/client.d.ts
114
+ interface X402PaymentRequirements {
115
+ scheme: string;
116
+ network: string;
117
+ maxAmountRequired: string;
118
+ payTo: string;
119
+ asset: string;
120
+ extra: {
121
+ name: string;
122
+ version: string;
123
+ };
124
+ }
125
+ /** A request for payment, as returned by `charge()` / the platform. */
126
+ interface X402Challenge {
127
+ id: string;
128
+ network: string;
129
+ amount: string;
130
+ pay_to: string;
131
+ nonce_binding: {
132
+ interaction_id: string;
133
+ challenge_step_id: string;
134
+ challenge_nonce: string;
135
+ };
136
+ payment_requirements: X402PaymentRequirements;
137
+ expires_at: string;
138
+ }
139
+ interface X402Receipt {
140
+ id: string;
141
+ status: string;
142
+ settle_tx: string | null;
143
+ }
144
+ interface X402ChargeInput {
145
+ /** Amount in token base units (USDC has 6 decimals, so "10000" = 0.01). */
146
+ amount: string;
147
+ /** Defaults to "base-sepolia". */
148
+ network?: string;
149
+ /** The org id allowed to pay this challenge (on-net binding). */
150
+ payerOrg?: string;
151
+ description?: string;
152
+ /** A URL identifying the thing being paid for. */
153
+ resource?: string;
154
+ /** Seconds until the challenge expires (default 1h). */
155
+ expiresIn?: number;
156
+ }
157
+ declare class X402Error extends Error {
158
+ readonly status: number;
159
+ readonly body: unknown;
160
+ constructor(message: string, status: number, body?: unknown);
161
+ }
162
+ interface X402ClientOptions {
163
+ /** API key. Defaults to `process.env.PRIMITIVE_API_KEY`. */
164
+ apiKey?: string;
165
+ /** API base URL. Defaults to the production host. */
166
+ baseUrl?: string;
167
+ /** Override the fetch implementation (e.g. for testing). */
168
+ fetch?: typeof fetch;
169
+ }
170
+ declare class X402Client {
171
+ #private;
172
+ constructor(options?: X402ClientOptions);
173
+ /** Request a payment (payee side). Returns the challenge to hand to the payer. */
174
+ charge(input: X402ChargeInput): Promise<X402Challenge>;
175
+ /**
176
+ * Pay a challenge (payer side). Derives the interaction-bound authorization,
177
+ * signs it locally with the caller's key, and submits it for settlement.
178
+ */
179
+ pay(challenge: X402Challenge, options: {
180
+ signer: X402Signer;
181
+ }): Promise<X402Receipt>;
182
+ }
183
+ declare function createX402Client(options?: X402ClientOptions): X402Client;
184
+ //#endregion
6
185
  //#region src/index.d.ts
7
186
  declare const primitive: {
8
187
  client: typeof client;
9
- receive: typeof receive;
188
+ receive: typeof receive; /** Construct an x402 payments client. See `X402Client`. */
189
+ x402: typeof createX402Client;
10
190
  };
11
191
  //#endregion
12
- export { AuthConfidence, AuthVerdict, DecodeRawEmailOptions, DkimResult, DkimSignature, DmarcPolicy, DmarcResult, EmailAddress, EmailAnalysis, EmailAuth, EmailReceivedEvent, EventType, ForwardAnalysis, type ForwardInput, ForwardOriginalSender, ForwardResult, ForwardResultAttachmentAnalyzed, ForwardResultAttachmentSkipped, ForwardResultInline, ForwardVerdict, ForwardVerification, GenerateDownloadTokenOptions, HandleWebhookOptions, KnownWebhookEvent, LEGACY_CONFIRMED_HEADER, LEGACY_SIGNATURE_HEADER, PAYLOAD_ERRORS, PRIMITIVE_CONFIRMED_HEADER, PRIMITIVE_SIGNATURE_HEADER, ParsedData, ParsedDataComplete, ParsedDataFailed, ParsedError, ParsedStatus, PrimitiveApiError, PrimitiveClient, type PrimitiveClientOptions, PrimitiveWebhookError, RAW_EMAIL_ERRORS, RawContent, RawContentDownloadOnly, RawContentInline, RawEmailDecodeError, RawEmailDecodeErrorCode, ReceiveRequestOptions, ReceivedEmail, ReceivedEmailAddress, ReceivedEmailThread, type ReplyInput, STANDARD_WEBHOOK_ID_HEADER, STANDARD_WEBHOOK_SIGNATURE_HEADER, STANDARD_WEBHOOK_TIMESTAMP_HEADER, type SendAttachment, type SendInput, type SendResult, type SendThreadInput, SignResult, SpfResult, StandardWebhooksSignResult, StandardWebhooksVerifyOptions, UnknownEvent, VERIFICATION_ERRORS, ValidateEmailAuthResult, VerifyDownloadTokenOptions, VerifyDownloadTokenResult, VerifyOptions, WEBHOOK_VERSION, WebhookAttachment, WebhookErrorCode, WebhookEvent, WebhookHeaders, WebhookPayloadError, WebhookPayloadErrorCode, WebhookValidationError, WebhookValidationErrorCode, WebhookVerificationError, WebhookVerificationErrorCode, buildForwardSubject, buildReplySubject, client, confirmedHeaders, createPrimitiveClient, decodeRawEmail, primitive as default, emailReceivedEventJsonSchema, formatAddress, generateDownloadToken, getDownloadTimeRemaining, handleWebhook, isDownloadExpired, isEmailReceivedEvent, isRawIncluded, normalizeReceivedEmail, parseHeaderAddress, parseWebhookEvent, receive, safeValidateEmailReceivedEvent, signStandardWebhooksPayload, signWebhookPayload, validateEmailAuth, validateEmailReceivedEvent, verifyDownloadToken, verifyRawEmailDownload, verifyStandardWebhooksSignature, verifyWebhookSignature };
192
+ export { type AgentAccountResult, type AgentAccountUpgradeHint, type AgentClaimLinkResult, type AgentClaimResult, type AgentClaimStartResult, AuthConfidence, AuthVerdict, type CreateAgentAccountInput, type CreateAgentClaimLinkInput, DecodeRawEmailOptions, DkimResult, DkimSignature, DmarcPolicy, DmarcResult, EmailAddress, EmailAnalysis, EmailAuth, EmailReceivedEvent, EventType, ForwardAnalysis, type ForwardInput, ForwardOriginalSender, ForwardResult, ForwardResultAttachmentAnalyzed, ForwardResultAttachmentSkipped, ForwardResultInline, ForwardVerdict, ForwardVerification, GenerateDownloadTokenOptions, HandleWebhookOptions, KnownWebhookEvent, LEGACY_CONFIRMED_HEADER, LEGACY_SIGNATURE_HEADER, type NonceBinding, PAYLOAD_ERRORS, PRIMITIVE_CONFIRMED_HEADER, PRIMITIVE_SIGNATURE_HEADER, ParsedData, ParsedDataComplete, ParsedDataFailed, ParsedError, ParsedStatus, type PlanLimits, PrimitiveApiError, PrimitiveClient, type PrimitiveClientOptions, PrimitiveWebhookError, RAW_EMAIL_ERRORS, RawContent, RawContentDownloadOnly, RawContentInline, RawEmailDecodeError, RawEmailDecodeErrorCode, ReceiveRequestOptions, ReceivedEmail, ReceivedEmailAddress, ReceivedEmailThread, type ReplyInput, STANDARD_WEBHOOK_ID_HEADER, STANDARD_WEBHOOK_SIGNATURE_HEADER, STANDARD_WEBHOOK_TIMESTAMP_HEADER, type SendAttachment, type SendInput, type SendResult, type SendThreadInput, SignResult, SpfResult, StandardWebhooksSignResult, StandardWebhooksVerifyOptions, type StartAgentClaimInput, type TokenDomain, type TransferAuthorization, UnknownEvent, VERIFICATION_ERRORS, ValidateEmailAuthResult, type VerifyAgentClaimInput, VerifyDownloadTokenOptions, VerifyDownloadTokenResult, VerifyOptions, WEBHOOK_VERSION, WebhookAttachment, WebhookErrorCode, WebhookEvent, WebhookHeaders, WebhookPayloadError, WebhookPayloadErrorCode, WebhookValidationError, WebhookValidationErrorCode, WebhookVerificationError, WebhookVerificationErrorCode, type X402Challenge, type X402ChargeInput, X402Client, type X402ClientOptions, X402Error, type X402PaymentPayload, type X402PaymentRequirements, type X402Receipt, type X402Signer, buildForwardSubject, buildReplySubject, client, confirmedHeaders, createPrimitiveClient, createX402Client, decodeRawEmail, primitive as default, deriveEip3009Nonce, emailReceivedEventJsonSchema, formatAddress, generateDownloadToken, getDownloadTimeRemaining, handleWebhook, isDownloadExpired, isEmailReceivedEvent, isRawIncluded, normalizeReceivedEmail, parseHeaderAddress, parseWebhookEvent, receive, safeValidateEmailReceivedEvent, signStandardWebhooksPayload, signWebhookPayload, validateEmailAuth, validateEmailReceivedEvent, verifyDownloadToken, verifyRawEmailDownload, verifyStandardWebhooksSignature, verifyWebhookSignature };