@primitivedotdev/sdk 0.18.0 → 0.20.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.
@@ -248,7 +248,7 @@ interface Config<T extends ClientOptions$1 = ClientOptions$1> extends Omit<Reque
248
248
  */
249
249
  throwOnError?: T['throwOnError'];
250
250
  }
251
- interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
251
+ interface RequestOptions$1<TData = unknown, TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
252
252
  responseStyle: TResponseStyle;
253
253
  throwOnError: ThrowOnError;
254
254
  }>, Pick<ServerSentEventsOptions<TData>, 'onRequest' | 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
@@ -266,7 +266,7 @@ interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle =
266
266
  security?: ReadonlyArray<Auth>;
267
267
  url: Url;
268
268
  }
269
- interface ResolvedRequestOptions<TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {
269
+ interface ResolvedRequestOptions<TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends RequestOptions$1<unknown, TResponseStyle, ThrowOnError, Url> {
270
270
  serializedBody?: string;
271
271
  }
272
272
  type RequestResult<TData = unknown, TError = unknown, ThrowOnError extends boolean = boolean, TResponseStyle extends ResponseStyle = 'fields'> = ThrowOnError extends true ? Promise<TResponseStyle extends 'data' ? TData extends Record<string, unknown> ? TData[keyof TData] : TData : {
@@ -288,9 +288,9 @@ interface ClientOptions$1 {
288
288
  responseStyle?: ResponseStyle;
289
289
  throwOnError?: boolean;
290
290
  }
291
- type MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
292
- type SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<never, TResponseStyle, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData, TError>>;
293
- type RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> & Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
291
+ type MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions$1<TData, TResponseStyle, ThrowOnError>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
292
+ type SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions$1<never, TResponseStyle, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData, TError>>;
293
+ type RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions$1<TData, TResponseStyle, ThrowOnError>, 'method'> & Pick<Required<RequestOptions$1<TData, TResponseStyle, ThrowOnError>>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
294
294
  type BuildUrlFn = <TData extends {
295
295
  body?: unknown;
296
296
  path?: Record<string, unknown>;
@@ -317,7 +317,7 @@ interface TDataShape {
317
317
  url: string;
318
318
  }
319
319
  type OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;
320
- type Options$1<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown, TResponseStyle extends ResponseStyle = 'fields'> = OmitKeys<RequestOptions<TResponse, TResponseStyle, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
320
+ type Options$1<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown, TResponseStyle extends ResponseStyle = 'fields'> = OmitKeys<RequestOptions$1<TResponse, TResponseStyle, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
321
321
  //#endregion
322
322
  //#region src/api/generated/types.gen.d.ts
323
323
  type ClientOptions = {
@@ -347,7 +347,7 @@ type PaginationMeta = {
347
347
  type ErrorResponse = {
348
348
  success: boolean;
349
349
  error: {
350
- code: 'unauthorized' | 'forbidden' | 'not_found' | 'validation_error' | 'rate_limit_exceeded' | 'internal_error' | 'conflict' | 'mx_conflict' | 'outbound_disabled' | 'cannot_send_from_domain' | 'recipient_not_allowed' | 'outbound_key_missing' | 'outbound_unreachable' | 'outbound_key_invalid' | 'outbound_capacity_exhausted' | 'outbound_response_malformed' | 'outbound_relay_failed' | 'discard_not_enabled' | 'inbound_not_repliable';
350
+ code: 'unauthorized' | 'forbidden' | 'not_found' | 'validation_error' | 'rate_limit_exceeded' | 'internal_error' | 'conflict' | 'mx_conflict' | 'outbound_disabled' | 'cannot_send_from_domain' | 'recipient_not_allowed' | 'outbound_key_missing' | 'outbound_unreachable' | 'outbound_key_invalid' | 'outbound_capacity_exhausted' | 'outbound_response_malformed' | 'outbound_relay_failed' | 'discard_not_enabled' | 'inbound_not_repliable' | 'authorization_pending' | 'slow_down' | 'access_denied' | 'expired_token' | 'invalid_device_code';
351
351
  message: string;
352
352
  /**
353
353
  * Optional structured data that callers can inspect to recover
@@ -430,6 +430,67 @@ type GateFix = {
430
430
  */
431
431
  subject: string;
432
432
  };
433
+ type StartCliLoginInput = {
434
+ /**
435
+ * Human-readable device name shown during browser approval
436
+ */
437
+ device_name?: string;
438
+ /**
439
+ * Optional client metadata stored with the login session; serialized JSON must be 2048 bytes or fewer
440
+ */
441
+ metadata?: {
442
+ [key: string]: unknown;
443
+ };
444
+ };
445
+ type CliLoginStartResult = {
446
+ /**
447
+ * Opaque code used by the CLI to poll for approval
448
+ */
449
+ device_code: string;
450
+ /**
451
+ * Short code the user confirms in the browser
452
+ */
453
+ user_code: string;
454
+ /**
455
+ * Browser URL where the user approves the login
456
+ */
457
+ verification_uri: string;
458
+ /**
459
+ * Browser URL with the user code prefilled
460
+ */
461
+ verification_uri_complete: string;
462
+ /**
463
+ * Seconds until the login session expires
464
+ */
465
+ expires_in: number;
466
+ /**
467
+ * Minimum seconds between poll requests
468
+ */
469
+ interval: number;
470
+ };
471
+ type PollCliLoginInput = {
472
+ device_code: string;
473
+ };
474
+ type CliLoginPollResult = {
475
+ /**
476
+ * Newly-created API key for CLI authentication
477
+ */
478
+ api_key: string;
479
+ key_id: string;
480
+ key_prefix: string;
481
+ org_id: string;
482
+ org_name: string | null;
483
+ };
484
+ type CliLogoutInput = {
485
+ /**
486
+ * Optional key id guard; when provided it must match the authenticated API key
487
+ */
488
+ key_id?: string;
489
+ };
490
+ type CliLogoutResult = {
491
+ revoked: boolean;
492
+ key_id: string;
493
+ };
433
494
  type Account = {
434
495
  id: string;
435
496
  email: string;
@@ -1439,6 +1500,221 @@ type DiscardContentResult = {
1439
1500
  */
1440
1501
  already_discarded: boolean;
1441
1502
  };
1503
+ /**
1504
+ * Lifecycle state of the latest deploy attempt:
1505
+ * * `pending` — deploy in flight; the runtime has not yet
1506
+ * confirmed the new bundle is live.
1507
+ * * `deployed` — the running edge handler is the latest code.
1508
+ * * `failed` — the most recent deploy attempt failed; the
1509
+ * previously-live code (if any) is still running. The
1510
+ * `deploy_error` field carries the error message.
1511
+ *
1512
+ */
1513
+ type FunctionDeployStatus = 'pending' | 'deployed' | 'failed';
1514
+ /**
1515
+ * One row from the function listing.
1516
+ */
1517
+ type FunctionListItem = {
1518
+ /**
1519
+ * Function id, also the script name in the edge runtime.
1520
+ */
1521
+ id: string;
1522
+ /**
1523
+ * Slug-style name set on creation. Stable; cannot be changed.
1524
+ */
1525
+ name: string;
1526
+ deploy_status: FunctionDeployStatus;
1527
+ /**
1528
+ * Timestamp of the most recent successful deploy. Null until the first deploy succeeds.
1529
+ */
1530
+ deployed_at?: string | null;
1531
+ /**
1532
+ * URL the platform's webhook delivery loop posts to in order
1533
+ * to invoke the function. Reference only; not directly
1534
+ * callable from outside.
1535
+ *
1536
+ */
1537
+ gateway_url: string;
1538
+ created_at: string;
1539
+ updated_at: string;
1540
+ };
1541
+ /**
1542
+ * Full function record returned by GET / PUT.
1543
+ */
1544
+ type FunctionDetail = {
1545
+ id: string;
1546
+ name: string;
1547
+ /**
1548
+ * The bundled handler source. UTF-8 string up to 1 MiB. The
1549
+ * same value most recently passed as `code` to POST or PUT.
1550
+ *
1551
+ */
1552
+ code: string;
1553
+ deploy_status: FunctionDeployStatus;
1554
+ /**
1555
+ * Error message from the most recent failed deploy, or null
1556
+ * after a successful deploy. Surface this to users to explain
1557
+ * a `failed` status without polling.
1558
+ *
1559
+ */
1560
+ deploy_error?: string | null;
1561
+ deployed_at?: string | null;
1562
+ gateway_url: string;
1563
+ created_at: string;
1564
+ updated_at: string;
1565
+ };
1566
+ type CreateFunctionInput = {
1567
+ /**
1568
+ * Slug-style name. Lowercase letters, digits, hyphens, and
1569
+ * underscores. 1 to 64 characters. Must be unique within the
1570
+ * org; a 409 is returned on collision.
1571
+ *
1572
+ */
1573
+ name: string;
1574
+ /**
1575
+ * Bundled handler as a single ESM module. Up to 1 MiB UTF-8.
1576
+ * Must export a default `{ async fetch(req, env, ctx) { ... } }`
1577
+ * object.
1578
+ *
1579
+ */
1580
+ code: string;
1581
+ /**
1582
+ * Optional source map for the bundle. Up to 5 MiB UTF-8.
1583
+ * Stored only on the runtime side (not in Primitive's
1584
+ * database) and used to symbolicate stack traces in the
1585
+ * function's logs.
1586
+ *
1587
+ */
1588
+ sourceMap?: string;
1589
+ };
1590
+ /**
1591
+ * Returned by POST /functions on a successful deploy.
1592
+ */
1593
+ type CreateFunctionResult = {
1594
+ id: string;
1595
+ name: string;
1596
+ deploy_status: FunctionDeployStatus;
1597
+ gateway_url: string;
1598
+ };
1599
+ type UpdateFunctionInput = {
1600
+ /**
1601
+ * New bundled handler. Same rules as CreateFunctionInput.code.
1602
+ */
1603
+ code: string;
1604
+ sourceMap?: string;
1605
+ };
1606
+ /**
1607
+ * Metadata returned by POST /functions/{id}/test. The send is
1608
+ * queued; the actual invocation lands on the function's
1609
+ * invocations list a few seconds later as the inbound mail
1610
+ * traverses the MX path.
1611
+ *
1612
+ */
1613
+ type TestInvocationResult = {
1614
+ /**
1615
+ * Verified inbound domain the test email was sent to.
1616
+ */
1617
+ inbound_domain: string;
1618
+ /**
1619
+ * Synthetic local-part plus inbound_domain. Visible in the org's inbox.
1620
+ */
1621
+ to: string;
1622
+ /**
1623
+ * Primitive-controlled outbound sender used for the test.
1624
+ */
1625
+ from: string;
1626
+ /**
1627
+ * Outbound message id from the underlying send. NOT the
1628
+ * inbound email's id; the inbound id is created when the
1629
+ * email arrives via MX and lands on the function's
1630
+ * invocations list.
1631
+ *
1632
+ */
1633
+ send_id: string;
1634
+ /**
1635
+ * Subject placed on the test email so it can be located in the inbox.
1636
+ */
1637
+ subject: string;
1638
+ /**
1639
+ * ISO timestamp suitable as a `since` lower bound when
1640
+ * polling /emails for the inbound's arrival. Captured
1641
+ * slightly before the send to absorb light clock skew.
1642
+ *
1643
+ */
1644
+ poll_since: string;
1645
+ /**
1646
+ * Function detail page where invocations show up live.
1647
+ */
1648
+ watch_url: string;
1649
+ };
1650
+ /**
1651
+ * One row from GET /functions/{id}/secrets. Discriminate on the
1652
+ * `managed` field:
1653
+ * * `managed = true` — system secret provisioned by Primitive.
1654
+ * `description` is set; `created_at` / `updated_at` are
1655
+ * null because the row is virtual (resolved at deploy time
1656
+ * from the managed registry, not stored in the secrets
1657
+ * table).
1658
+ * * `managed = false` — secret the user set via the API.
1659
+ * `created_at` / `updated_at` are set; `description` is
1660
+ * null.
1661
+ *
1662
+ */
1663
+ type FunctionSecretListItem = {
1664
+ key: string;
1665
+ /**
1666
+ * True for managed system secrets, false for user-set entries.
1667
+ */
1668
+ managed: boolean;
1669
+ /**
1670
+ * Set on managed entries only; null on user-set entries.
1671
+ */
1672
+ description?: string | null;
1673
+ /**
1674
+ * Set on user-set entries only; null on managed entries.
1675
+ */
1676
+ created_at?: string | null;
1677
+ /**
1678
+ * Set on user-set entries only; null on managed entries.
1679
+ */
1680
+ updated_at?: string | null;
1681
+ };
1682
+ /**
1683
+ * Body for POST /functions/{id}/secrets.
1684
+ */
1685
+ type CreateFunctionSecretInput = {
1686
+ /**
1687
+ * Uppercase letters, digits, and underscores. Must start with
1688
+ * a letter or underscore. System-managed keys (e.g.
1689
+ * PRIMITIVE_WEBHOOK_SECRET) are reserved.
1690
+ *
1691
+ */
1692
+ key: string;
1693
+ /**
1694
+ * Secret value, up to 4096 UTF-8 bytes. Encrypted at rest.
1695
+ * Never returned by any read endpoint.
1696
+ *
1697
+ */
1698
+ value: string;
1699
+ };
1700
+ /**
1701
+ * Body for PUT /functions/{id}/secrets/{key}. Key comes from the path.
1702
+ */
1703
+ type SetFunctionSecretInput = {
1704
+ value: string;
1705
+ };
1706
+ /**
1707
+ * Returned by POST and PUT secret routes.
1708
+ */
1709
+ type FunctionSecretWriteResult = {
1710
+ key: string;
1711
+ created_at: string;
1712
+ updated_at: string;
1713
+ /**
1714
+ * True if this call inserted a new row, false if it updated an existing one.
1715
+ */
1716
+ created: boolean;
1717
+ };
1442
1718
  /**
1443
1719
  * Resource UUID
1444
1720
  */
@@ -1453,6 +1729,92 @@ type Cursor = string;
1453
1729
  * Number of results per page
1454
1730
  */
1455
1731
  type Limit = number;
1732
+ type StartCliLoginData = {
1733
+ body?: StartCliLoginInput;
1734
+ path?: never;
1735
+ query?: never;
1736
+ url: '/cli/login/start';
1737
+ };
1738
+ type StartCliLoginErrors = {
1739
+ /**
1740
+ * Invalid request parameters
1741
+ */
1742
+ 400: ErrorResponse;
1743
+ /**
1744
+ * Rate limit exceeded
1745
+ */
1746
+ 429: ErrorResponse;
1747
+ };
1748
+ type StartCliLoginError = StartCliLoginErrors[keyof StartCliLoginErrors];
1749
+ type StartCliLoginResponses = {
1750
+ /**
1751
+ * CLI login session created
1752
+ */
1753
+ 201: SuccessEnvelope & {
1754
+ data?: CliLoginStartResult;
1755
+ };
1756
+ };
1757
+ type StartCliLoginResponse = StartCliLoginResponses[keyof StartCliLoginResponses];
1758
+ type PollCliLoginData = {
1759
+ body: PollCliLoginInput;
1760
+ path?: never;
1761
+ query?: never;
1762
+ url: '/cli/login/poll';
1763
+ };
1764
+ type PollCliLoginErrors = {
1765
+ /**
1766
+ * Invalid request, pending authorization, slow polling, expired token, or invalid device code
1767
+ */
1768
+ 400: ErrorResponse;
1769
+ /**
1770
+ * CLI login was denied in the browser
1771
+ */
1772
+ 403: ErrorResponse;
1773
+ };
1774
+ type PollCliLoginError = PollCliLoginErrors[keyof PollCliLoginErrors];
1775
+ type PollCliLoginResponses = {
1776
+ /**
1777
+ * CLI login approved and API key created
1778
+ */
1779
+ 200: SuccessEnvelope & {
1780
+ data?: CliLoginPollResult;
1781
+ };
1782
+ };
1783
+ type PollCliLoginResponse = PollCliLoginResponses[keyof PollCliLoginResponses];
1784
+ type CliLogoutData = {
1785
+ body?: CliLogoutInput;
1786
+ path?: never;
1787
+ query?: never;
1788
+ url: '/cli/logout';
1789
+ };
1790
+ type CliLogoutErrors = {
1791
+ /**
1792
+ * Invalid request parameters
1793
+ */
1794
+ 400: ErrorResponse;
1795
+ /**
1796
+ * Invalid or missing API key
1797
+ */
1798
+ 401: ErrorResponse;
1799
+ /**
1800
+ * Authenticated caller lacks permission for the operation
1801
+ */
1802
+ 403: ErrorResponse;
1803
+ /**
1804
+ * Resource not found
1805
+ */
1806
+ 404: ErrorResponse;
1807
+ };
1808
+ type CliLogoutError = CliLogoutErrors[keyof CliLogoutErrors];
1809
+ type CliLogoutResponses = {
1810
+ /**
1811
+ * CLI API key revoked
1812
+ */
1813
+ 200: SuccessEnvelope & {
1814
+ data?: CliLogoutResult;
1815
+ };
1816
+ };
1817
+ type CliLogoutResponse = CliLogoutResponses[keyof CliLogoutResponses];
1456
1818
  type GetAccountData = {
1457
1819
  body?: never;
1458
1820
  path?: never;
@@ -2680,72 +3042,464 @@ type GetSentEmailResponses = {
2680
3042
  };
2681
3043
  };
2682
3044
  type GetSentEmailResponse = GetSentEmailResponses[keyof GetSentEmailResponses];
2683
- declare namespace sdk_gen_d_exports {
2684
- export { Options, addDomain, createEndpoint, createFilter, deleteDomain, deleteEmail, deleteEndpoint, deleteFilter, discardEmailContent, downloadAttachments, downloadRawEmail, getAccount, getEmail, getSendPermissions, getSentEmail, getStorageStats, getWebhookSecret, listDeliveries, listDomains, listEmails, listEndpoints, listFilters, listSentEmails, replayDelivery, replayEmailWebhooks, replyToEmail, rotateWebhookSecret, sendEmail, testEndpoint, updateAccount, updateDomain, updateEndpoint, updateFilter, verifyDomain };
2685
- }
2686
- type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options$1<TData, ThrowOnError, TResponse> & {
3045
+ type ListFunctionsData = {
3046
+ body?: never;
3047
+ path?: never;
3048
+ query?: never;
3049
+ url: '/functions';
3050
+ };
3051
+ type ListFunctionsErrors = {
2687
3052
  /**
2688
- * You can provide a client instance returned by `createClient()` instead of
2689
- * individual options. This might be also useful if you want to implement a
2690
- * custom client.
3053
+ * Invalid or missing API key
2691
3054
  */
2692
- client?: Client;
3055
+ 401: ErrorResponse;
3056
+ };
3057
+ type ListFunctionsError = ListFunctionsErrors[keyof ListFunctionsErrors];
3058
+ type ListFunctionsResponses = {
2693
3059
  /**
2694
- * You can pass arbitrary values through the `meta` object. This can be
2695
- * used to access values that aren't defined as part of the SDK function.
3060
+ * List of functions
2696
3061
  */
2697
- meta?: Record<string, unknown>;
3062
+ 200: SuccessEnvelope & {
3063
+ data?: Array<FunctionListItem>;
3064
+ };
2698
3065
  };
2699
- /**
2700
- * Get account info
2701
- */
2702
- declare const getAccount: <ThrowOnError extends boolean = false>(options?: Options<GetAccountData, ThrowOnError>) => RequestResult<GetAccountResponses, GetAccountErrors, ThrowOnError, "fields">;
2703
- /**
2704
- * Update account settings
2705
- */
2706
- declare const updateAccount: <ThrowOnError extends boolean = false>(options: Options<UpdateAccountData, ThrowOnError>) => RequestResult<UpdateAccountResponses, UpdateAccountErrors, ThrowOnError, "fields">;
2707
- /**
2708
- * Get storage usage
2709
- */
2710
- declare const getStorageStats: <ThrowOnError extends boolean = false>(options?: Options<GetStorageStatsData, ThrowOnError>) => RequestResult<GetStorageStatsResponses, GetStorageStatsErrors, ThrowOnError, "fields">;
2711
- /**
2712
- * Get webhook signing secret
2713
- *
2714
- * Returns the webhook signing secret for your account. If no
2715
- * secret exists yet, one is generated automatically on first
2716
- * access.
2717
- *
2718
- * Signing is account-scoped, not per-endpoint. Every webhook
2719
- * delivery from any of your registered endpoints is signed
2720
- * with this single secret. Rotate via
2721
- * `POST /account/webhook-secret/rotate`.
2722
- *
2723
- * **Secret format**: the returned string looks base64-shaped
2724
- * (e.g. `XNHBBW8VqoBjRfNs1tkZj11jTk...`) but is NOT base64.
2725
- * Use it AS-IS as a UTF-8 string when computing HMAC over a
2726
- * delivery body. Base64-decoding before HMAC will silently
2727
- * produce mismatched signatures.
2728
- *
2729
- * See the API-level "Webhook signing" section for the full
2730
- * wire format (header name, signed string shape, hash algo,
2731
- * tolerance) including a language-agnostic verification
2732
- * recipe.
2733
- *
2734
- */
2735
- declare const getWebhookSecret: <ThrowOnError extends boolean = false>(options?: Options<GetWebhookSecretData, ThrowOnError>) => RequestResult<GetWebhookSecretResponses, GetWebhookSecretErrors, ThrowOnError, "fields">;
2736
- /**
2737
- * Rotate webhook signing secret
2738
- *
2739
- * Generates a new webhook signing secret, replacing the current one.
2740
- * Rate limited to once per 60 minutes.
2741
- *
2742
- */
2743
- declare const rotateWebhookSecret: <ThrowOnError extends boolean = false>(options?: Options<RotateWebhookSecretData, ThrowOnError>) => RequestResult<RotateWebhookSecretResponses, RotateWebhookSecretErrors, ThrowOnError, "fields">;
2744
- /**
2745
- * List all domains
2746
- *
2747
- * Returns all verified and unverified domains for your organization,
2748
- * sorted by creation date (newest first). Each domain includes a
3066
+ type ListFunctionsResponse = ListFunctionsResponses[keyof ListFunctionsResponses];
3067
+ type CreateFunctionData = {
3068
+ body: CreateFunctionInput;
3069
+ path?: never;
3070
+ query?: never;
3071
+ url: '/functions';
3072
+ };
3073
+ type CreateFunctionErrors = {
3074
+ /**
3075
+ * Invalid request parameters
3076
+ */
3077
+ 400: ErrorResponse;
3078
+ /**
3079
+ * Invalid or missing API key
3080
+ */
3081
+ 401: ErrorResponse;
3082
+ /**
3083
+ * A function with this name already exists in the org
3084
+ */
3085
+ 409: ErrorResponse;
3086
+ /**
3087
+ * Primitive could not complete the downstream SMTP request
3088
+ */
3089
+ 502: ErrorResponse;
3090
+ };
3091
+ type CreateFunctionError = CreateFunctionErrors[keyof CreateFunctionErrors];
3092
+ type CreateFunctionResponses = {
3093
+ /**
3094
+ * Function created and deployed
3095
+ */
3096
+ 201: SuccessEnvelope & {
3097
+ data?: CreateFunctionResult;
3098
+ };
3099
+ };
3100
+ type CreateFunctionResponse = CreateFunctionResponses[keyof CreateFunctionResponses];
3101
+ type DeleteFunctionData = {
3102
+ body?: never;
3103
+ path: {
3104
+ /**
3105
+ * Resource UUID
3106
+ */
3107
+ id: string;
3108
+ };
3109
+ query?: never;
3110
+ url: '/functions/{id}';
3111
+ };
3112
+ type DeleteFunctionErrors = {
3113
+ /**
3114
+ * Invalid or missing API key
3115
+ */
3116
+ 401: ErrorResponse;
3117
+ /**
3118
+ * Resource not found
3119
+ */
3120
+ 404: ErrorResponse;
3121
+ /**
3122
+ * Primitive could not complete the downstream SMTP request
3123
+ */
3124
+ 502: ErrorResponse;
3125
+ };
3126
+ type DeleteFunctionError = DeleteFunctionErrors[keyof DeleteFunctionErrors];
3127
+ type DeleteFunctionResponses = {
3128
+ /**
3129
+ * Resource deleted
3130
+ */
3131
+ 200: SuccessEnvelope & {
3132
+ data?: {
3133
+ deleted: boolean;
3134
+ };
3135
+ };
3136
+ };
3137
+ type DeleteFunctionResponse = DeleteFunctionResponses[keyof DeleteFunctionResponses];
3138
+ type GetFunctionData = {
3139
+ body?: never;
3140
+ path: {
3141
+ /**
3142
+ * Resource UUID
3143
+ */
3144
+ id: string;
3145
+ };
3146
+ query?: never;
3147
+ url: '/functions/{id}';
3148
+ };
3149
+ type GetFunctionErrors = {
3150
+ /**
3151
+ * Invalid or missing API key
3152
+ */
3153
+ 401: ErrorResponse;
3154
+ /**
3155
+ * Resource not found
3156
+ */
3157
+ 404: ErrorResponse;
3158
+ };
3159
+ type GetFunctionError = GetFunctionErrors[keyof GetFunctionErrors];
3160
+ type GetFunctionResponses = {
3161
+ /**
3162
+ * Function record
3163
+ */
3164
+ 200: SuccessEnvelope & {
3165
+ data?: FunctionDetail;
3166
+ };
3167
+ };
3168
+ type GetFunctionResponse = GetFunctionResponses[keyof GetFunctionResponses];
3169
+ type UpdateFunctionData = {
3170
+ body: UpdateFunctionInput;
3171
+ path: {
3172
+ /**
3173
+ * Resource UUID
3174
+ */
3175
+ id: string;
3176
+ };
3177
+ query?: never;
3178
+ url: '/functions/{id}';
3179
+ };
3180
+ type UpdateFunctionErrors = {
3181
+ /**
3182
+ * Invalid request parameters
3183
+ */
3184
+ 400: ErrorResponse;
3185
+ /**
3186
+ * Invalid or missing API key
3187
+ */
3188
+ 401: ErrorResponse;
3189
+ /**
3190
+ * Resource not found
3191
+ */
3192
+ 404: ErrorResponse;
3193
+ /**
3194
+ * Primitive could not complete the downstream SMTP request
3195
+ */
3196
+ 502: ErrorResponse;
3197
+ };
3198
+ type UpdateFunctionError = UpdateFunctionErrors[keyof UpdateFunctionErrors];
3199
+ type UpdateFunctionResponses = {
3200
+ /**
3201
+ * Updated function
3202
+ */
3203
+ 200: SuccessEnvelope & {
3204
+ data?: FunctionDetail;
3205
+ };
3206
+ };
3207
+ type UpdateFunctionResponse = UpdateFunctionResponses[keyof UpdateFunctionResponses];
3208
+ type TestFunctionData = {
3209
+ body?: never;
3210
+ path: {
3211
+ /**
3212
+ * Resource UUID
3213
+ */
3214
+ id: string;
3215
+ };
3216
+ query?: never;
3217
+ url: '/functions/{id}/test';
3218
+ };
3219
+ type TestFunctionErrors = {
3220
+ /**
3221
+ * Invalid request parameters
3222
+ */
3223
+ 400: ErrorResponse;
3224
+ /**
3225
+ * Invalid or missing API key
3226
+ */
3227
+ 401: ErrorResponse;
3228
+ /**
3229
+ * Resource not found
3230
+ */
3231
+ 404: ErrorResponse;
3232
+ /**
3233
+ * Function not in a state that can be invoked, or no inbound domain configured
3234
+ */
3235
+ 422: ErrorResponse;
3236
+ /**
3237
+ * Primitive could not complete the downstream SMTP request
3238
+ */
3239
+ 502: ErrorResponse;
3240
+ /**
3241
+ * Sending agent misconfigured
3242
+ */
3243
+ 503: ErrorResponse;
3244
+ };
3245
+ type TestFunctionError = TestFunctionErrors[keyof TestFunctionErrors];
3246
+ type TestFunctionResponses = {
3247
+ /**
3248
+ * Test send queued
3249
+ */
3250
+ 200: SuccessEnvelope & {
3251
+ data?: TestInvocationResult;
3252
+ };
3253
+ };
3254
+ type TestFunctionResponse = TestFunctionResponses[keyof TestFunctionResponses];
3255
+ type ListFunctionSecretsData = {
3256
+ body?: never;
3257
+ path: {
3258
+ /**
3259
+ * Resource UUID
3260
+ */
3261
+ id: string;
3262
+ };
3263
+ query?: never;
3264
+ url: '/functions/{id}/secrets';
3265
+ };
3266
+ type ListFunctionSecretsErrors = {
3267
+ /**
3268
+ * Invalid or missing API key
3269
+ */
3270
+ 401: ErrorResponse;
3271
+ /**
3272
+ * Resource not found
3273
+ */
3274
+ 404: ErrorResponse;
3275
+ };
3276
+ type ListFunctionSecretsError = ListFunctionSecretsErrors[keyof ListFunctionSecretsErrors];
3277
+ type ListFunctionSecretsResponses = {
3278
+ /**
3279
+ * List of secrets (metadata only, no values)
3280
+ */
3281
+ 200: SuccessEnvelope & {
3282
+ data?: {
3283
+ items: Array<FunctionSecretListItem>;
3284
+ };
3285
+ };
3286
+ };
3287
+ type ListFunctionSecretsResponse = ListFunctionSecretsResponses[keyof ListFunctionSecretsResponses];
3288
+ type CreateFunctionSecretData = {
3289
+ body: CreateFunctionSecretInput;
3290
+ path: {
3291
+ /**
3292
+ * Resource UUID
3293
+ */
3294
+ id: string;
3295
+ };
3296
+ query?: never;
3297
+ url: '/functions/{id}/secrets';
3298
+ };
3299
+ type CreateFunctionSecretErrors = {
3300
+ /**
3301
+ * Invalid request parameters
3302
+ */
3303
+ 400: ErrorResponse;
3304
+ /**
3305
+ * Invalid or missing API key
3306
+ */
3307
+ 401: ErrorResponse;
3308
+ /**
3309
+ * Resource not found
3310
+ */
3311
+ 404: ErrorResponse;
3312
+ };
3313
+ type CreateFunctionSecretError = CreateFunctionSecretErrors[keyof CreateFunctionSecretErrors];
3314
+ type CreateFunctionSecretResponses = {
3315
+ /**
3316
+ * Secret updated
3317
+ */
3318
+ 200: SuccessEnvelope & {
3319
+ data?: FunctionSecretWriteResult;
3320
+ };
3321
+ /**
3322
+ * Secret created
3323
+ */
3324
+ 201: SuccessEnvelope & {
3325
+ data?: FunctionSecretWriteResult;
3326
+ };
3327
+ };
3328
+ type CreateFunctionSecretResponse = CreateFunctionSecretResponses[keyof CreateFunctionSecretResponses];
3329
+ type DeleteFunctionSecretData = {
3330
+ body?: never;
3331
+ path: {
3332
+ /**
3333
+ * Resource UUID
3334
+ */
3335
+ id: string;
3336
+ /**
3337
+ * Secret key. Must match `^[A-Z_][A-Z0-9_]*$`.
3338
+ */
3339
+ key: string;
3340
+ };
3341
+ query?: never;
3342
+ url: '/functions/{id}/secrets/{key}';
3343
+ };
3344
+ type DeleteFunctionSecretErrors = {
3345
+ /**
3346
+ * Invalid request parameters
3347
+ */
3348
+ 400: ErrorResponse;
3349
+ /**
3350
+ * Invalid or missing API key
3351
+ */
3352
+ 401: ErrorResponse;
3353
+ /**
3354
+ * Resource not found
3355
+ */
3356
+ 404: ErrorResponse;
3357
+ };
3358
+ type DeleteFunctionSecretError = DeleteFunctionSecretErrors[keyof DeleteFunctionSecretErrors];
3359
+ type DeleteFunctionSecretResponses = {
3360
+ /**
3361
+ * Secret deleted
3362
+ */
3363
+ 204: void;
3364
+ };
3365
+ type DeleteFunctionSecretResponse = DeleteFunctionSecretResponses[keyof DeleteFunctionSecretResponses];
3366
+ type SetFunctionSecretData = {
3367
+ body: SetFunctionSecretInput;
3368
+ path: {
3369
+ /**
3370
+ * Resource UUID
3371
+ */
3372
+ id: string;
3373
+ /**
3374
+ * Secret key. Must match `^[A-Z_][A-Z0-9_]*$`.
3375
+ */
3376
+ key: string;
3377
+ };
3378
+ query?: never;
3379
+ url: '/functions/{id}/secrets/{key}';
3380
+ };
3381
+ type SetFunctionSecretErrors = {
3382
+ /**
3383
+ * Invalid request parameters
3384
+ */
3385
+ 400: ErrorResponse;
3386
+ /**
3387
+ * Invalid or missing API key
3388
+ */
3389
+ 401: ErrorResponse;
3390
+ /**
3391
+ * Resource not found
3392
+ */
3393
+ 404: ErrorResponse;
3394
+ };
3395
+ type SetFunctionSecretError = SetFunctionSecretErrors[keyof SetFunctionSecretErrors];
3396
+ type SetFunctionSecretResponses = {
3397
+ /**
3398
+ * Secret updated
3399
+ */
3400
+ 200: SuccessEnvelope & {
3401
+ data?: FunctionSecretWriteResult;
3402
+ };
3403
+ /**
3404
+ * Secret created
3405
+ */
3406
+ 201: SuccessEnvelope & {
3407
+ data?: FunctionSecretWriteResult;
3408
+ };
3409
+ };
3410
+ type SetFunctionSecretResponse = SetFunctionSecretResponses[keyof SetFunctionSecretResponses];
3411
+ declare namespace sdk_gen_d_exports {
3412
+ export { Options, addDomain, cliLogout, createEndpoint, createFilter, createFunction, createFunctionSecret, deleteDomain, deleteEmail, deleteEndpoint, deleteFilter, deleteFunction, deleteFunctionSecret, discardEmailContent, downloadAttachments, downloadRawEmail, getAccount, getEmail, getFunction, getSendPermissions, getSentEmail, getStorageStats, getWebhookSecret, listDeliveries, listDomains, listEmails, listEndpoints, listFilters, listFunctionSecrets, listFunctions, listSentEmails, pollCliLogin, replayDelivery, replayEmailWebhooks, replyToEmail, rotateWebhookSecret, sendEmail, setFunctionSecret, startCliLogin, testEndpoint, testFunction, updateAccount, updateDomain, updateEndpoint, updateFilter, updateFunction, verifyDomain };
3413
+ }
3414
+ type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options$1<TData, ThrowOnError, TResponse> & {
3415
+ /**
3416
+ * You can provide a client instance returned by `createClient()` instead of
3417
+ * individual options. This might be also useful if you want to implement a
3418
+ * custom client.
3419
+ */
3420
+ client?: Client;
3421
+ /**
3422
+ * You can pass arbitrary values through the `meta` object. This can be
3423
+ * used to access values that aren't defined as part of the SDK function.
3424
+ */
3425
+ meta?: Record<string, unknown>;
3426
+ };
3427
+ /**
3428
+ * Start CLI browser login
3429
+ *
3430
+ * Starts a browser-assisted CLI login session. The response includes a
3431
+ * device code for polling and a user code that the user approves in the
3432
+ * browser. This endpoint does not require an API key.
3433
+ *
3434
+ */
3435
+ declare const startCliLogin: <ThrowOnError extends boolean = false>(options?: Options<StartCliLoginData, ThrowOnError>) => RequestResult<StartCliLoginResponses, StartCliLoginErrors, ThrowOnError, "fields">;
3436
+ /**
3437
+ * Poll CLI browser login
3438
+ *
3439
+ * Polls a CLI login session until the browser approval either succeeds,
3440
+ * is denied, expires, or is polled too quickly. The API key is generated
3441
+ * only after approval and is returned exactly once.
3442
+ *
3443
+ */
3444
+ declare const pollCliLogin: <ThrowOnError extends boolean = false>(options: Options<PollCliLoginData, ThrowOnError>) => RequestResult<PollCliLoginResponses, PollCliLoginErrors, ThrowOnError, "fields">;
3445
+ /**
3446
+ * Revoke the current CLI API key
3447
+ *
3448
+ * Revokes the API key used to authenticate the request. CLI clients use
3449
+ * this endpoint during `primitive logout` before removing local credentials.
3450
+ *
3451
+ */
3452
+ declare const cliLogout: <ThrowOnError extends boolean = false>(options?: Options<CliLogoutData, ThrowOnError>) => RequestResult<CliLogoutResponses, CliLogoutErrors, ThrowOnError, "fields">;
3453
+ /**
3454
+ * Get account info
3455
+ */
3456
+ declare const getAccount: <ThrowOnError extends boolean = false>(options?: Options<GetAccountData, ThrowOnError>) => RequestResult<GetAccountResponses, GetAccountErrors, ThrowOnError, "fields">;
3457
+ /**
3458
+ * Update account settings
3459
+ */
3460
+ declare const updateAccount: <ThrowOnError extends boolean = false>(options: Options<UpdateAccountData, ThrowOnError>) => RequestResult<UpdateAccountResponses, UpdateAccountErrors, ThrowOnError, "fields">;
3461
+ /**
3462
+ * Get storage usage
3463
+ */
3464
+ declare const getStorageStats: <ThrowOnError extends boolean = false>(options?: Options<GetStorageStatsData, ThrowOnError>) => RequestResult<GetStorageStatsResponses, GetStorageStatsErrors, ThrowOnError, "fields">;
3465
+ /**
3466
+ * Get webhook signing secret
3467
+ *
3468
+ * Returns the webhook signing secret for your account. If no
3469
+ * secret exists yet, one is generated automatically on first
3470
+ * access.
3471
+ *
3472
+ * Signing is account-scoped, not per-endpoint. Every webhook
3473
+ * delivery from any of your registered endpoints is signed
3474
+ * with this single secret. Rotate via
3475
+ * `POST /account/webhook-secret/rotate`.
3476
+ *
3477
+ * **Secret format**: the returned string looks base64-shaped
3478
+ * (e.g. `XNHBBW8VqoBjRfNs1tkZj11jTk...`) but is NOT base64.
3479
+ * Use it AS-IS as a UTF-8 string when computing HMAC over a
3480
+ * delivery body. Base64-decoding before HMAC will silently
3481
+ * produce mismatched signatures.
3482
+ *
3483
+ * See the API-level "Webhook signing" section for the full
3484
+ * wire format (header name, signed string shape, hash algo,
3485
+ * tolerance) including a language-agnostic verification
3486
+ * recipe.
3487
+ *
3488
+ */
3489
+ declare const getWebhookSecret: <ThrowOnError extends boolean = false>(options?: Options<GetWebhookSecretData, ThrowOnError>) => RequestResult<GetWebhookSecretResponses, GetWebhookSecretErrors, ThrowOnError, "fields">;
3490
+ /**
3491
+ * Rotate webhook signing secret
3492
+ *
3493
+ * Generates a new webhook signing secret, replacing the current one.
3494
+ * Rate limited to once per 60 minutes.
3495
+ *
3496
+ */
3497
+ declare const rotateWebhookSecret: <ThrowOnError extends boolean = false>(options?: Options<RotateWebhookSecretData, ThrowOnError>) => RequestResult<RotateWebhookSecretResponses, RotateWebhookSecretErrors, ThrowOnError, "fields">;
3498
+ /**
3499
+ * List all domains
3500
+ *
3501
+ * Returns all verified and unverified domains for your organization,
3502
+ * sorted by creation date (newest first). Each domain includes a
2749
3503
  * `verified` boolean to distinguish between the two states.
2750
3504
  *
2751
3505
  */
@@ -2894,7 +3648,7 @@ declare const replayEmailWebhooks: <ThrowOnError extends boolean = false>(option
2894
3648
  * dashboard at Settings > Webhooks). When the toggle is off, this
2895
3649
  * endpoint returns `403` with code `discard_not_enabled` and a
2896
3650
  * message pointing the human at the dashboard. There is intentionally
2897
- * no API to flip this toggle opting in to a destructive,
3651
+ * no API to flip this toggle. Opting in to a destructive,
2898
3652
  * non-reversible operation must be a deliberate human click in the
2899
3653
  * UI.
2900
3654
  *
@@ -3079,6 +3833,155 @@ declare const listSentEmails: <ThrowOnError extends boolean = false>(options?: O
3079
3833
  *
3080
3834
  */
3081
3835
  declare const getSentEmail: <ThrowOnError extends boolean = false>(options: Options<GetSentEmailData, ThrowOnError>) => RequestResult<GetSentEmailResponses, GetSentEmailErrors, ThrowOnError, "fields">;
3836
+ /**
3837
+ * List functions
3838
+ *
3839
+ * Returns every active (non-deleted) function in the org, newest
3840
+ * first. Each entry carries the deploy status and the gateway URL
3841
+ * that the platform's webhook delivery loop posts to. To inspect
3842
+ * the source code or deploy errors, use `GET /functions/{id}`.
3843
+ *
3844
+ */
3845
+ declare const listFunctions: <ThrowOnError extends boolean = false>(options?: Options<ListFunctionsData, ThrowOnError>) => RequestResult<ListFunctionsResponses, ListFunctionsErrors, ThrowOnError, "fields">;
3846
+ /**
3847
+ * Deploy a function
3848
+ *
3849
+ * Creates and deploys a new function. The handler must be a single
3850
+ * ESM module that exports a default async function receiving the
3851
+ * `email.received` event (see the Webhook payload section for the
3852
+ * full schema). Code is bundled before being uploaded; ship a
3853
+ * single self-contained file rather than relying on external
3854
+ * imports.
3855
+ *
3856
+ * **Code limits.** `code` is capped at 1 MiB UTF-8. `sourceMap`
3857
+ * (optional) is capped at 5 MiB UTF-8 and is stored only on the
3858
+ * edge runtime side; it is not persisted in Primitive's database.
3859
+ *
3860
+ * **Auto-wiring.** On successful deploy, Primitive automatically
3861
+ * creates a webhook endpoint that delivers inbound mail to the
3862
+ * function. There is nothing to configure on the Endpoints API
3863
+ * for this to work; the gateway URL returned here is for
3864
+ * reference only and is not directly callable from outside.
3865
+ *
3866
+ * **Secrets.** New functions ship with the managed secrets
3867
+ * (`PRIMITIVE_WEBHOOK_SECRET`, `PRIMITIVE_API_KEY`) already
3868
+ * bound. Add user-set secrets via
3869
+ * `POST /functions/{id}/secrets`; secret writes only land in the
3870
+ * running handler on the next redeploy.
3871
+ *
3872
+ */
3873
+ declare const createFunction: <ThrowOnError extends boolean = false>(options: Options<CreateFunctionData, ThrowOnError>) => RequestResult<CreateFunctionResponses, CreateFunctionErrors, ThrowOnError, "fields">;
3874
+ /**
3875
+ * Delete a function
3876
+ *
3877
+ * Soft-deletes the function row, removes the script from the edge
3878
+ * runtime, and deactivates the auto-wired webhook endpoint so no
3879
+ * further inbound mail is delivered. Past deploy history,
3880
+ * invocations, and logs are retained.
3881
+ *
3882
+ * Returns 502 if the runtime delete fails partway; the function
3883
+ * row stays in place and the call is safe to retry until it
3884
+ * succeeds.
3885
+ *
3886
+ */
3887
+ declare const deleteFunction: <ThrowOnError extends boolean = false>(options: Options<DeleteFunctionData, ThrowOnError>) => RequestResult<DeleteFunctionResponses, DeleteFunctionErrors, ThrowOnError, "fields">;
3888
+ /**
3889
+ * Get a function
3890
+ *
3891
+ * Returns the full record for a function, including its current
3892
+ * source code and the deploy status / error from the most recent
3893
+ * deploy attempt.
3894
+ *
3895
+ */
3896
+ declare const getFunction: <ThrowOnError extends boolean = false>(options: Options<GetFunctionData, ThrowOnError>) => RequestResult<GetFunctionResponses, GetFunctionErrors, ThrowOnError, "fields">;
3897
+ /**
3898
+ * Update and redeploy a function
3899
+ *
3900
+ * Replaces the function's source code with the body's `code` and
3901
+ * triggers a redeploy. Same size limits as `POST /functions`.
3902
+ * Use this verb to push secret writes into the running handler:
3903
+ * passing the same `code` re-runs the deploy and refreshes the
3904
+ * binding set with the latest values from the secrets table.
3905
+ *
3906
+ * On a 502 deploy failure, the previously-deployed code stays
3907
+ * live; the runtime never serves a half-built bundle. The
3908
+ * `deploy_error` field on the returned record carries the error
3909
+ * that came back from the runtime so you can surface it to users
3910
+ * without polling.
3911
+ *
3912
+ */
3913
+ declare const updateFunction: <ThrowOnError extends boolean = false>(options: Options<UpdateFunctionData, ThrowOnError>) => RequestResult<UpdateFunctionResponses, UpdateFunctionErrors, ThrowOnError, "fields">;
3914
+ /**
3915
+ * Send a test invocation
3916
+ *
3917
+ * Sends a real test email from a Primitive-controlled sender to a
3918
+ * synthetic local-part on one of the org's verified inbound
3919
+ * domains. The function fires through the normal MX delivery
3920
+ * path, so reply / send-mail calls from inside the handler
3921
+ * against the inbound's `email.id` work the same as in
3922
+ * production. Returns immediately after the send is queued; the
3923
+ * invocation appears on the function's invocations list within a
3924
+ * few seconds.
3925
+ *
3926
+ * Requires that the function is currently `deployed`. Returns 422
3927
+ * if the function is in `pending` or `failed` state, or if the
3928
+ * org has no verified inbound domain to receive the test mail.
3929
+ *
3930
+ */
3931
+ declare const testFunction: <ThrowOnError extends boolean = false>(options: Options<TestFunctionData, ThrowOnError>) => RequestResult<TestFunctionResponses, TestFunctionErrors, ThrowOnError, "fields">;
3932
+ /**
3933
+ * List a function's secrets
3934
+ *
3935
+ * Returns metadata for every secret bound to the function, with
3936
+ * managed entries (provisioned by Primitive) listed first and
3937
+ * user-set entries listed alphabetically after. **Values are
3938
+ * never returned.** Secret writes are write-only.
3939
+ *
3940
+ * Managed entries (e.g. `PRIMITIVE_WEBHOOK_SECRET`,
3941
+ * `PRIMITIVE_API_KEY`) carry a `description` instead of
3942
+ * `created_at` / `updated_at`. They cannot be created, updated,
3943
+ * or deleted via this API.
3944
+ *
3945
+ */
3946
+ declare const listFunctionSecrets: <ThrowOnError extends boolean = false>(options: Options<ListFunctionSecretsData, ThrowOnError>) => RequestResult<ListFunctionSecretsResponses, ListFunctionSecretsErrors, ThrowOnError, "fields">;
3947
+ /**
3948
+ * Create or update a secret
3949
+ *
3950
+ * Idempotent insert-or-update keyed on `(function_id, key)`.
3951
+ * Returns 201 the first time the key is set, 200 on subsequent
3952
+ * updates. Values are encrypted at rest and only become visible
3953
+ * to the running handler on the next deploy (`PUT /functions/{id}`
3954
+ * with the existing code is sufficient to refresh bindings).
3955
+ *
3956
+ * Keys must match `^[A-Z_][A-Z0-9_]*$` (uppercase letters,
3957
+ * digits, underscores; first character is a letter or
3958
+ * underscore). Values are at most 4096 UTF-8 bytes. System-
3959
+ * managed keys are reserved and rejected.
3960
+ *
3961
+ */
3962
+ declare const createFunctionSecret: <ThrowOnError extends boolean = false>(options: Options<CreateFunctionSecretData, ThrowOnError>) => RequestResult<CreateFunctionSecretResponses, CreateFunctionSecretErrors, ThrowOnError, "fields">;
3963
+ /**
3964
+ * Delete a secret
3965
+ *
3966
+ * Removes the secret. The binding stays live in the running
3967
+ * handler until the next deploy refreshes the binding set
3968
+ * (`PUT /functions/{id}` with the existing code is sufficient).
3969
+ * Returns 404 if the key did not exist. Managed system keys
3970
+ * cannot be deleted.
3971
+ *
3972
+ */
3973
+ declare const deleteFunctionSecret: <ThrowOnError extends boolean = false>(options: Options<DeleteFunctionSecretData, ThrowOnError>) => RequestResult<DeleteFunctionSecretResponses, DeleteFunctionSecretErrors, ThrowOnError, "fields">;
3974
+ /**
3975
+ * Set a secret by key
3976
+ *
3977
+ * Path-keyed companion to `POST /functions/{id}/secrets`.
3978
+ * Idempotent: returns 201 the first time the key is set, 200 on
3979
+ * subsequent updates. Same validation rules and same write-only
3980
+ * guarantees as the POST verb; the new value lands in the running
3981
+ * handler on the next deploy.
3982
+ *
3983
+ */
3984
+ declare const setFunctionSecret: <ThrowOnError extends boolean = false>(options: Options<SetFunctionSecretData, ThrowOnError>) => RequestResult<SetFunctionSecretResponses, SetFunctionSecretErrors, ThrowOnError, "fields">;
3082
3985
  //#endregion
3083
3986
  //#region src/api/index.d.ts
3084
3987
  declare const DEFAULT_BASE_URL = "https://www.primitive.dev/api/v1";
@@ -3100,6 +4003,15 @@ interface SendInput {
3100
4003
  thread?: SendThreadInput;
3101
4004
  wait?: boolean;
3102
4005
  waitTimeoutMs?: number;
4006
+ }
4007
+ interface RequestOptions {
4008
+ /** Cancel the in-flight request when this signal fires. Surfaces as AbortError. */
4009
+ signal?: AbortSignal;
4010
+ /** Per-call timeout in milliseconds. Composed with `signal` via AbortSignal.any so either fires AbortError. */
4011
+ timeout?: number;
4012
+ /** Per-call headers merged on top of client-level headers. Last write wins. */
4013
+ headers?: Record<string, string>;
4014
+ /** Idempotency key for safe retries. Sent as the Idempotency-Key request header. */
3103
4015
  idempotencyKey?: string;
3104
4016
  }
3105
4017
  /**
@@ -3183,7 +4095,7 @@ declare class PrimitiveApiClient {
3183
4095
  }
3184
4096
  type PrimitiveClientOptions = PrimitiveApiClientOptions;
3185
4097
  declare class PrimitiveClient extends PrimitiveApiClient {
3186
- send(input: SendInput): Promise<SendResult>;
4098
+ send(input: SendInput, options?: RequestOptions): Promise<SendResult>;
3187
4099
  /**
3188
4100
  * Reply to an inbound email.
3189
4101
  *
@@ -3198,12 +4110,12 @@ declare class PrimitiveClient extends PrimitiveApiClient {
3198
4110
  * subject match to thread, so a custom subject silently breaks the
3199
4111
  * thread for half the recipient population.
3200
4112
  */
3201
- reply(email: ReceivedEmail, input: ReplyInput): Promise<SendResult>;
3202
- forward(email: ReceivedEmail, input: ForwardInput): Promise<SendResult>;
4113
+ reply(email: ReceivedEmail, input: ReplyInput, options?: RequestOptions): Promise<SendResult>;
4114
+ forward(email: ReceivedEmail, input: ForwardInput, options?: RequestOptions): Promise<SendResult>;
3203
4115
  }
3204
4116
  declare function createPrimitiveApiClient(options?: PrimitiveApiClientOptions): PrimitiveApiClient;
3205
4117
  declare function createPrimitiveClient(options?: PrimitiveClientOptions): PrimitiveClient;
3206
4118
  declare function client(options?: PrimitiveClientOptions): PrimitiveClient;
3207
4119
  declare const operations: typeof sdk_gen_d_exports;
3208
4120
  //#endregion
3209
- export { AddDomainData as $, RequestOptions as $i, ListDomainsErrors as $n, SendPermissionAddress as $r, DownloadAttachmentsResponses as $t, getSendPermissions as A, UpdateEndpointError as Ai, GetSentEmailData as An, ReplayEmailWebhooksError as Ar, DeleteEndpointError as At, replayDelivery as B, UpdateFilterResponses as Bi, GetWebhookSecretData as Bn, ResourceId as Br, DeliverySummary as Bt, deleteEndpoint as C, UpdateDomainData as Ci, GetEmailResponse as Cn, PaginationMeta as Cr, DeleteDomainResponses as Ct, downloadRawEmail as D, UpdateDomainResponse as Di, GetSendPermissionsErrors as Dn, ReplayDeliveryResponse as Dr, DeleteEmailResponse as Dt, downloadAttachments as E, UpdateDomainInput as Ei, GetSendPermissionsError as En, ReplayDeliveryErrors as Er, DeleteEmailErrors as Et, listDomains as F, UpdateFilterData as Fi, GetStorageStatsData as Fn, ReplyToEmailData as Fr, DeleteFilterError as Ft, testEndpoint as G, VerifyDomainResponse as Gi, Limit as Gn, RotateWebhookSecretResponses as Gr, DiscardEmailContentResponse as Gt, replyToEmail as H, VerifyDomainData as Hi, GetWebhookSecretErrors as Hn, RotateWebhookSecretError as Hr, DiscardEmailContentData as Ht, listEmails as I, UpdateFilterError as Ii, GetStorageStatsError as In, ReplyToEmailError as Ir, DeleteFilterErrors as It, updateEndpoint as J, Client as Ji, ListDeliveriesErrors as Jn, SendEmailErrors as Jr, DomainVerifyResult as Jt, updateAccount as K, VerifyDomainResponses as Ki, ListDeliveriesData as Kn, SendEmailData as Kr, DiscardEmailContentResponses as Kt, listEndpoints as L, UpdateFilterErrors as Li, GetStorageStatsErrors as Ln, ReplyToEmailErrors as Lr, DeleteFilterResponse as Lt, getStorageStats as M, UpdateEndpointInput as Mi, GetSentEmailErrors as Mn, ReplayEmailWebhooksResponse as Mr, DeleteEndpointResponse as Mt, getWebhookSecret as N, UpdateEndpointResponse as Ni, GetSentEmailResponse as Nn, ReplayEmailWebhooksResponses as Nr, DeleteEndpointResponses as Nt, getAccount as O, UpdateDomainResponses as Oi, GetSendPermissionsResponse as On, ReplayDeliveryResponses as Or, DeleteEmailResponses as Ot, listDeliveries as P, UpdateEndpointResponses as Pi, GetSentEmailResponses as Pn, ReplayResult as Pr, DeleteFilterData as Pt, AccountUpdated as Q, Options$1 as Qi, ListDomainsError as Qn, SendMailResult as Qr, DownloadAttachmentsResponse as Qt, listFilters as R, UpdateFilterInput as Ri, GetStorageStatsResponse as Rn, ReplyToEmailResponse as Rr, DeleteFilterResponses as Rt, deleteEmail as S, UpdateAccountResponses as Si, GetEmailErrors as Sn, ListSentEmailsResponses as Sr, DeleteDomainResponse as St, discardEmailContent as T, UpdateDomainErrors as Ti, GetSendPermissionsData as Tn, ReplayDeliveryError as Tr, DeleteEmailError as Tt, rotateWebhookSecret as U, VerifyDomainError as Ui, GetWebhookSecretResponse as Un, RotateWebhookSecretErrors as Ur, DiscardEmailContentError as Ut, replayEmailWebhooks as V, VerifiedDomain as Vi, GetWebhookSecretError as Vn, RotateWebhookSecretData as Vr, DiscardContentResult as Vt, sendEmail as W, VerifyDomainErrors as Wi, GetWebhookSecretResponses as Wn, RotateWebhookSecretResponse as Wr, DiscardEmailContentErrors as Wt, verifyDomain as X, Config as Xi, ListDeliveriesResponses as Xn, SendEmailResponses as Xr, DownloadAttachmentsError as Xt, updateFilter as Y, ClientOptions$1 as Yi, ListDeliveriesResponse as Yn, SendEmailResponse as Yr, DownloadAttachmentsData as Yt, Account as Z, CreateClientConfig as Zi, ListDomainsData as Zn, SendMailInput as Zr, DownloadAttachmentsErrors as Zt, Options as _, UpdateAccountData as _i, GetAccountErrors as _n, ListFiltersResponses as _r, CreateFilterResponses as _t, PrimitiveApiError as a, SentEmailDetail as ai, EmailDetail as an, ListEmailsResponse as ar, ClientOptions as at, createFilter as b, UpdateAccountInput as bi, GetEmailData as bn, ListSentEmailsErrors as br, DeleteDomainError as bt, PrimitiveClientOptions as c, StorageStats as ci, EmailSummary as cn, ListEndpointsError as cr, CreateEndpointErrors as ct, SendResult as d, TestEndpointError as di, ErrorResponse as dn, ListEndpointsResponses as dr, CreateEndpointResponses as dt, RequestResult as ea, SendPermissionAnyRecipient as ei, DownloadRawEmailData as en, ListDomainsResponse as er, AddDomainError as et, SendThreadInput as f, TestEndpointErrors as fi, Filter as fn, ListEnvelope as fr, CreateFilterData as ft, operations as g, UnverifiedDomain as gi, GetAccountError as gn, ListFiltersResponse as gr, CreateFilterResponse as gt, createPrimitiveClient as h, TestResult as hi, GetAccountData as hn, ListFiltersErrors as hr, CreateFilterInput as ht, PrimitiveApiClientOptions as i, SendPermissionsMeta as ii, DownloadRawEmailResponses as in, ListEmailsErrors as ir, AddDomainResponses as it, getSentEmail as j, UpdateEndpointErrors as ji, GetSentEmailError as jn, ReplayEmailWebhooksErrors as jr, DeleteEndpointErrors as jt, getEmail as k, UpdateEndpointData as ki, GetSendPermissionsResponses as kn, ReplayEmailWebhooksData as kr, DeleteEndpointData as kt, ReplyInput as l, SuccessEnvelope as li, EmailWebhookStatus as ln, ListEndpointsErrors as lr, CreateEndpointInput as lt, createPrimitiveApiClient as m, TestEndpointResponses as mi, GateFix as mn, ListFiltersError as mr, CreateFilterErrors as mt, ForwardInput as n, Auth as na, SendPermissionRule as ni, DownloadRawEmailErrors as nn, ListEmailsData as nr, AddDomainInput as nt, PrimitiveApiErrorDetails as o, SentEmailStatus as oi, EmailDetailReply as on, ListEmailsResponses as or, CreateEndpointData as ot, client as p, TestEndpointResponse as pi, GateDenial as pn, ListFiltersData as pr, CreateFilterError as pt, updateDomain as q, WebhookSecret as qi, ListDeliveriesError as qn, SendEmailError as qr, Domain as qt, PrimitiveApiClient as r, SendPermissionYourDomain as ri, DownloadRawEmailResponse as rn, ListEmailsError as rr, AddDomainResponse as rt, PrimitiveClient as s, SentEmailSummary as si, EmailStatus as sn, ListEndpointsData as sr, CreateEndpointError as st, DEFAULT_BASE_URL as t, ResponseStyle as ta, SendPermissionManagedZone as ti, DownloadRawEmailError as tn, ListDomainsResponses as tr, AddDomainErrors as tt, SendInput as u, TestEndpointData as ui, Endpoint as un, ListEndpointsResponse as ur, CreateEndpointResponse as ut, addDomain as v, UpdateAccountError as vi, GetAccountResponse as vn, ListSentEmailsData as vr, Cursor as vt, deleteFilter as w, UpdateDomainError as wi, GetEmailResponses as wn, ReplayDeliveryData as wr, DeleteEmailData as wt, deleteDomain as x, UpdateAccountResponse as xi, GetEmailError as xn, ListSentEmailsResponse as xr, DeleteDomainErrors as xt, createEndpoint as y, UpdateAccountErrors as yi, GetAccountResponses as yn, ListSentEmailsError as yr, DeleteDomainData as yt, listSentEmails as z, UpdateFilterResponse as zi, GetStorageStatsResponses as zn, ReplyToEmailResponses as zr, DeliveryStatus as zt };
4121
+ export { rotateWebhookSecret as $, UpdateAccountData as $a, ReplyToEmailData as $i, EmailStatus as $n, ListDomainsData as $r, CreateFunctionSecretResponses as $t, deleteFunctionSecret as A, SetFunctionSecretResponse as Aa, ListSentEmailsData as Ai, DeleteFunctionSecretResponses as An, VerifyDomainData as Ao, GetSendPermissionsResponse as Ar, CreateEndpointError as At, getWebhookSecret as B, TestEndpointData as Ba, PollCliLoginResponse as Bi, DomainVerifyResult as Bn, Options$1 as Bo, GetStorageStatsResponse as Br, CreateFilterResponses as Bt, createFunction as C, SentEmailDetail as Ca, ListFunctionSecretsResponse as Ci, DeleteFunctionErrors as Cn, UpdateFunctionData as Co, GetFunctionError as Cr, CliLogoutErrors as Ct, deleteEndpoint as D, SetFunctionSecretError as Da, ListFunctionsErrors as Di, DeleteFunctionSecretError as Dn, UpdateFunctionResponse as Do, GetSendPermissionsData as Dr, CliLogoutResult as Dt, deleteEmail as E, SetFunctionSecretData as Ea, ListFunctionsError as Ei, DeleteFunctionSecretData as En, UpdateFunctionInput as Eo, GetFunctionResponses as Er, CliLogoutResponses as Et, getEmail as F, StartCliLoginInput as Fa, PaginationMeta as Fi, DiscardEmailContentError as Fn, WebhookSecret as Fo, GetSentEmailResponse as Fr, CreateFilterData as Ft, listFilters as G, TestFunctionData as Ga, ReplayDeliveryResponse as Gi, DownloadAttachmentsResponses as Gn, GetWebhookSecretResponse as Gr, CreateFunctionResponse as Gt, listDomains as H, TestEndpointErrors as Ha, ReplayDeliveryData as Hi, DownloadAttachmentsError as Hn, RequestResult as Ho, GetWebhookSecretData as Hr, CreateFunctionError as Ht, getFunction as I, StartCliLoginResponse as Ia, PollCliLoginData as Ii, DiscardEmailContentErrors as In, Client as Io, GetSentEmailResponses as Ir, CreateFilterError as It, listSentEmails as J, TestFunctionResponse as Ja, ReplayEmailWebhooksError as Ji, DownloadRawEmailErrors as Jn, ListDeliveriesData as Jr, CreateFunctionSecretData as Jt, listFunctionSecrets as K, TestFunctionError as Ka, ReplayDeliveryResponses as Ki, DownloadRawEmailData as Kn, GetWebhookSecretResponses as Kr, CreateFunctionResponses as Kt, getSendPermissions as L, StartCliLoginResponses as La, PollCliLoginError as Li, DiscardEmailContentResponse as Ln, ClientOptions$1 as Lo, GetStorageStatsData as Lr, CreateFilterErrors as Lt, downloadAttachments as M, StartCliLoginData as Ma, ListSentEmailsErrors as Mi, DeliverySummary as Mn, VerifyDomainErrors as Mo, GetSentEmailData as Mr, CreateEndpointInput as Mt, downloadRawEmail as N, StartCliLoginError as Na, ListSentEmailsResponse as Ni, DiscardContentResult as Nn, VerifyDomainResponse as No, GetSentEmailError as Nr, CreateEndpointResponse as Nt, deleteFilter as O, SetFunctionSecretErrors as Oa, ListFunctionsResponse as Oi, DeleteFunctionSecretErrors as On, UpdateFunctionResponses as Oo, GetSendPermissionsError as Or, ClientOptions as Ot, getAccount as P, StartCliLoginErrors as Pa, ListSentEmailsResponses as Pi, DiscardEmailContentData as Pn, VerifyDomainResponses as Po, GetSentEmailErrors as Pr, CreateEndpointResponses as Pt, replyToEmail as Q, UnverifiedDomain as Qa, ReplayResult as Qi, EmailDetailReply as Qn, ListDeliveriesResponses as Qr, CreateFunctionSecretResponse as Qt, getSentEmail as R, StorageStats as Ra, PollCliLoginErrors as Ri, DiscardEmailContentResponses as Rn, Config as Ro, GetStorageStatsError as Rr, CreateFilterInput as Rt, createFilter as S, SendPermissionsMeta as Sa, ListFunctionSecretsErrors as Si, DeleteFunctionError as Sn, UpdateFilterResponses as So, GetFunctionData as Sr, CliLogoutError as St, deleteDomain as T, SentEmailSummary as Ta, ListFunctionsData as Ti, DeleteFunctionResponses as Tn, UpdateFunctionErrors as To, GetFunctionResponse as Tr, CliLogoutResponse as Tt, listEmails as U, TestEndpointResponse as Ua, ReplayDeliveryError as Ui, DownloadAttachmentsErrors as Un, ResponseStyle as Uo, GetWebhookSecretError as Ur, CreateFunctionErrors as Ut, listDeliveries as V, TestEndpointError as Va, PollCliLoginResponses as Vi, DownloadAttachmentsData as Vn, RequestOptions$1 as Vo, GetStorageStatsResponses as Vr, CreateFunctionData as Vt, listEndpoints as W, TestEndpointResponses as Wa, ReplayDeliveryErrors as Wi, DownloadAttachmentsResponse as Wn, Auth as Wo, GetWebhookSecretErrors as Wr, CreateFunctionInput as Wt, replayDelivery as X, TestInvocationResult as Xa, ReplayEmailWebhooksResponse as Xi, DownloadRawEmailResponses as Xn, ListDeliveriesErrors as Xr, CreateFunctionSecretErrors as Xt, pollCliLogin as Y, TestFunctionResponses as Ya, ReplayEmailWebhooksErrors as Yi, DownloadRawEmailResponse as Yn, ListDeliveriesError as Yr, CreateFunctionSecretError as Yt, replayEmailWebhooks as Z, TestResult as Za, ReplayEmailWebhooksResponses as Zi, EmailDetail as Zn, ListDeliveriesResponse as Zr, CreateFunctionSecretInput as Zt, operations as _, SendPermissionAddress as _a, ListFiltersErrors as _i, DeleteFilterError as _n, UpdateFilterData as _o, GetEmailData as _r, AddDomainResponse as _t, PrimitiveApiError as a, RotateWebhookSecretData as aa, ListEmailsError as ai, DeleteDomainResponses as an, UpdateDomainData as ao, FunctionDeployStatus as ar, updateAccount as at, cliLogout as b, SendPermissionRule as ba, ListFunctionSecretsData as bi, DeleteFilterResponses as bn, UpdateFilterInput as bo, GetEmailResponse as br, CliLoginStartResult as bt, PrimitiveClientOptions as c, RotateWebhookSecretResponse as ca, ListEmailsResponses as ci, DeleteEmailErrors as cn, UpdateDomainInput as co, FunctionSecretListItem as cr, updateFilter as ct, SendInput as d, SendEmailError as da, ListEndpointsErrors as di, DeleteEndpointData as dn, UpdateEndpointData as do, GateFix as dr, Account as dt, ReplyToEmailError as ea, ListDomainsError as ei, Cursor as en, UpdateAccountError as eo, EmailSummary as er, sendEmail as et, SendResult as f, SendEmailErrors as fa, ListEndpointsResponse as fi, DeleteEndpointError as fn, UpdateEndpointError as fo, GetAccountData as fr, AccountUpdated as ft, createPrimitiveClient as g, SendMailResult as ga, ListFiltersError as gi, DeleteFilterData as gn, UpdateEndpointResponses as go, GetAccountResponses as gr, AddDomainInput as gt, createPrimitiveApiClient as h, SendMailInput as ha, ListFiltersData as hi, DeleteEndpointResponses as hn, UpdateEndpointResponse as ho, GetAccountResponse as hr, AddDomainErrors as ht, PrimitiveApiClientOptions as i, ResourceId as ia, ListEmailsData as ii, DeleteDomainResponse as in, UpdateAccountResponses as io, Filter as ir, testFunction as it, discardEmailContent as j, SetFunctionSecretResponses as ja, ListSentEmailsError as ji, DeliveryStatus as jn, VerifyDomainError as jo, GetSendPermissionsResponses as jr, CreateEndpointErrors as jt, deleteFunction as k, SetFunctionSecretInput as ka, ListFunctionsResponses as ki, DeleteFunctionSecretResponse as kn, VerifiedDomain as ko, GetSendPermissionsErrors as kr, CreateEndpointData as kt, ReplyInput as l, RotateWebhookSecretResponses as la, ListEndpointsData as li, DeleteEmailResponse as ln, UpdateDomainResponse as lo, FunctionSecretWriteResult as lr, updateFunction as lt, client as m, SendEmailResponses as ma, ListEnvelope as mi, DeleteEndpointResponse as mn, UpdateEndpointInput as mo, GetAccountErrors as mr, AddDomainError as mt, ForwardInput as n, ReplyToEmailResponse as na, ListDomainsResponse as ni, DeleteDomainError as nn, UpdateAccountInput as no, Endpoint as nr, startCliLogin as nt, PrimitiveApiErrorDetails as o, RotateWebhookSecretError as oa, ListEmailsErrors as oi, DeleteEmailData as on, UpdateDomainError as oo, FunctionDetail as or, updateDomain as ot, SendThreadInput as p, SendEmailResponse as pa, ListEndpointsResponses as pi, DeleteEndpointErrors as pn, UpdateEndpointErrors as po, GetAccountError as pr, AddDomainData as pt, listFunctions as q, TestFunctionErrors as qa, ReplayEmailWebhooksData as qi, DownloadRawEmailError as qn, Limit as qr, CreateFunctionResult as qt, PrimitiveApiClient as r, ReplyToEmailResponses as ra, ListDomainsResponses as ri, DeleteDomainErrors as rn, UpdateAccountResponse as ro, ErrorResponse as rr, testEndpoint as rt, PrimitiveClient as s, RotateWebhookSecretErrors as sa, ListEmailsResponse as si, DeleteEmailError as sn, UpdateDomainErrors as so, FunctionListItem as sr, updateEndpoint as st, DEFAULT_BASE_URL as t, ReplyToEmailErrors as ta, ListDomainsErrors as ti, DeleteDomainData as tn, UpdateAccountErrors as to, EmailWebhookStatus as tr, setFunctionSecret as tt, RequestOptions as u, SendEmailData as ua, ListEndpointsError as ui, DeleteEmailResponses as un, UpdateDomainResponses as uo, GateDenial as ur, verifyDomain as ut, Options as v, SendPermissionAnyRecipient as va, ListFiltersResponse as vi, DeleteFilterErrors as vn, UpdateFilterError as vo, GetEmailError as vr, AddDomainResponses as vt, createFunctionSecret as w, SentEmailStatus as wa, ListFunctionSecretsResponses as wi, DeleteFunctionResponse as wn, UpdateFunctionError as wo, GetFunctionErrors as wr, CliLogoutInput as wt, createEndpoint as x, SendPermissionYourDomain as xa, ListFunctionSecretsError as xi, DeleteFunctionData as xn, UpdateFilterResponse as xo, GetEmailResponses as xr, CliLogoutData as xt, addDomain as y, SendPermissionManagedZone as ya, ListFiltersResponses as yi, DeleteFilterResponse as yn, UpdateFilterErrors as yo, GetEmailErrors as yr, CliLoginPollResult as yt, getStorageStats as z, SuccessEnvelope as za, PollCliLoginInput as zi, Domain as zn, CreateClientConfig as zo, GetStorageStatsErrors as zr, CreateFilterResponse as zt };