@primitivedotdev/sdk 1.27.0 → 1.30.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.
@@ -45,6 +45,10 @@ const openapiDocument = {
45
45
  "name": "Account",
46
46
  "description": "Manage your account settings, storage, and webhook secret"
47
47
  },
48
+ {
49
+ "name": "Credits",
50
+ "description": "Redeem credit codes and read the organization credit balance"
51
+ },
48
52
  {
49
53
  "name": "Domains",
50
54
  "description": "Claim, verify, and manage email domains"
@@ -649,6 +653,129 @@ const openapiDocument = {
649
653
  "429": { "$ref": "#/components/responses/RateLimited" }
650
654
  }
651
655
  } },
656
+ "/credits/redeem": { "post": {
657
+ "operationId": "redeemCreditCode",
658
+ "summary": "Redeem a credit code",
659
+ "description": "Redeem a credit code for the authenticated organization. The credit is\nadded to the organization prepaid credit and shows in\n`GET /credits/balance` under `prepaid_credit`.\n\nRedeeming requires an organization owner or admin. An API key redeems\nwith the authority of the user who created it, based on that user's\ncurrent role; a key without that authority gets the same\n`credit_code_invalid` refusal as an unknown code.\n\nThe `Idempotency-Key` header is required. Retrying with the same key\nand code returns the original grant with `replayed: true` and grants\nnothing new; the same key with a different code is refused with\n`idempotency_key_reused`. Every refusal carries a human-readable\n`error.message` that can be shown to the user as is.\n",
660
+ "tags": ["Credits"],
661
+ "parameters": [{
662
+ "name": "Idempotency-Key",
663
+ "in": "header",
664
+ "required": true,
665
+ "description": "Required client-supplied key: 1 to 200 printable ASCII\ncharacters, without spaces. Use a new key for each code you\nredeem and reuse it only to retry the same request.\n",
666
+ "schema": {
667
+ "type": "string",
668
+ "minLength": 1,
669
+ "maxLength": 200,
670
+ "pattern": "^[\\x21-\\x7E]{1,200}$"
671
+ }
672
+ }],
673
+ "requestBody": {
674
+ "required": true,
675
+ "content": { "application/json": {
676
+ "schema": { "$ref": "#/components/schemas/RedeemCreditCodeInput" },
677
+ "example": { "code": "LAUNCH50" }
678
+ } }
679
+ },
680
+ "responses": {
681
+ "200": {
682
+ "description": "The code was redeemed, or this request replayed an earlier\nredemption with the same Idempotency-Key.\n",
683
+ "content": { "application/json": { "schema": { "allOf": [{ "$ref": "#/components/schemas/SuccessEnvelope" }, {
684
+ "type": "object",
685
+ "properties": { "data": { "$ref": "#/components/schemas/CreditRedemption" } }
686
+ }] } } }
687
+ },
688
+ "400": {
689
+ "description": "`idempotency_key_required` means the Idempotency-Key header is\nmissing. `validation_error` means the header is empty, longer than\n200 characters or not printable non-space ASCII, or the body is\ninvalid.\n",
690
+ "content": { "application/json": {
691
+ "schema": { "$ref": "#/components/schemas/ErrorResponse" },
692
+ "example": {
693
+ "success": false,
694
+ "error": {
695
+ "code": "idempotency_key_required",
696
+ "message": "an Idempotency-Key header is required"
697
+ }
698
+ }
699
+ } }
700
+ },
701
+ "401": { "$ref": "#/components/responses/Unauthorized" },
702
+ "403": { "$ref": "#/components/responses/Forbidden" },
703
+ "409": {
704
+ "description": "The organization or user already redeemed this code, or already\nredeemed another code in the same exclusive group (a set of codes\nof which each organization or user may redeem only one).\n`error.code` is `credit_code_already_redeemed`.\n",
705
+ "content": { "application/json": {
706
+ "schema": { "$ref": "#/components/schemas/ErrorResponse" },
707
+ "example": {
708
+ "success": false,
709
+ "error": {
710
+ "code": "credit_code_already_redeemed",
711
+ "message": "Your organization has already redeemed this promotion."
712
+ }
713
+ }
714
+ } }
715
+ },
716
+ "422": {
717
+ "description": "The code cannot be redeemed. `credit_code_invalid` covers unknown,\nexpired and exhausted codes and callers without authority to\nredeem; `credit_code_not_eligible` means the organization does not\nmeet the promotion terms; `credit_code_balance_cap` means the\norganization already holds the most promotional credit it can;\n`idempotency_key_reused` means this Idempotency-Key already\nredeemed a different code.\n",
718
+ "content": { "application/json": {
719
+ "schema": { "$ref": "#/components/schemas/ErrorResponse" },
720
+ "example": {
721
+ "success": false,
722
+ "error": {
723
+ "code": "credit_code_invalid",
724
+ "message": "That code isn't valid or is no longer available."
725
+ }
726
+ }
727
+ } }
728
+ },
729
+ "429": {
730
+ "description": "Too many requests or redemption attempts. `error.code` is\n`rate_limited`. Wait for `Retry-After` when present. Like other\nrate-limited responses, it also carries the `ratelimit-limit`,\n`ratelimit-remaining`, `ratelimit-reset` and `ratelimit-policy`\nquota headers when the limiter reports them.\n",
731
+ "headers": { "Retry-After": {
732
+ "schema": { "type": "integer" },
733
+ "description": "Seconds to wait before retrying"
734
+ } },
735
+ "content": { "application/json": {
736
+ "schema": { "$ref": "#/components/schemas/ErrorResponse" },
737
+ "example": {
738
+ "success": false,
739
+ "error": {
740
+ "code": "rate_limited",
741
+ "message": "Rate limit exceeded. Try again shortly."
742
+ }
743
+ }
744
+ } }
745
+ },
746
+ "503": {
747
+ "description": "The code could not be redeemed right now. Retry later with the\nsame Idempotency-Key. `error.code` is `service_unavailable`.\n",
748
+ "content": { "application/json": {
749
+ "schema": { "$ref": "#/components/schemas/ErrorResponse" },
750
+ "example": {
751
+ "success": false,
752
+ "error": {
753
+ "code": "service_unavailable",
754
+ "message": "We couldn't redeem that code right now. Try again in a few minutes."
755
+ }
756
+ }
757
+ } }
758
+ }
759
+ }
760
+ } },
761
+ "/credits/balance": { "get": {
762
+ "operationId": "getCreditBalance",
763
+ "summary": "Get credit balance",
764
+ "description": "Read the organization credit position. `prepaid_credit` is the prepaid\nusage credit (paid top-ups, redeemed credit codes and granted credit)\nthat can still pay for usage. `budget` is the active agent spending\nbudget an operator funded for top-ups, or null when there is none.\nAmounts are strings of integer micros (1 USD = 1000000 micros).\n",
765
+ "tags": ["Credits"],
766
+ "responses": {
767
+ "200": {
768
+ "description": "The organization credit balance.",
769
+ "content": { "application/json": { "schema": { "allOf": [{ "$ref": "#/components/schemas/SuccessEnvelope" }, {
770
+ "type": "object",
771
+ "properties": { "data": { "$ref": "#/components/schemas/CreditBalance" } }
772
+ }] } } }
773
+ },
774
+ "401": { "$ref": "#/components/responses/Unauthorized" },
775
+ "403": { "$ref": "#/components/responses/Forbidden" },
776
+ "429": { "$ref": "#/components/responses/RateLimited" }
777
+ }
778
+ } },
652
779
  "/domains": {
653
780
  "get": {
654
781
  "operationId": "listDomains",
@@ -953,7 +1080,7 @@ const openapiDocument = {
953
1080
  "/emails/search": { "get": {
954
1081
  "operationId": "searchEmails",
955
1082
  "summary": "Search inbound emails",
956
- "description": "Searches inbound emails with structured filters and optional\nfull-text matching across parsed email fields. This endpoint is\noptimized for filtered inbox views and CLI polling workflows:\ncallers that only need new accepted mail can pass\n`sort=received_at_asc`, `snippet=false`, `include_facets=false`,\nand a `date_from` timestamp.\n\n`q`, `subject`, and `body` use the same English full-text index\nas the web inbox search. Structured filters such as `from`, `to`,\n`domain_id`, status, attachment presence, and spam score bounds\nare combined with the text query.\n",
1083
+ "description": "Searches inbound emails with structured filters and optional\nfull-text matching across parsed email fields. This endpoint is\noptimized for filtered inbox views and CLI polling workflows:\ncallers that only need new accepted mail can pass\n`sort=received_at_asc`, `snippet=false`, `include_facets=false`,\nand a `date_from` timestamp.\n\n`q`, `subject`, and `body` use the same English full-text index\nas the web inbox search. Structured filters such as `from`, `to`,\n`domain_id`, status, attachment presence, and spam score bounds\nare combined with the text query.\n\nConnected-agent credentials search only mail received by their own\naddress. This applies to results, totals, facets, and every page;\nsearch filters cannot widen the credential's scope. When\n`reply_to_sent_email_id` is supplied, its parent send must belong\nto the connected address in the same organization. An unavailable\nparent returns 404. Sender filters are not authentication proof;\ninspect the email detail's authentication evidence before trusting it.\n",
957
1084
  "tags": ["Emails"],
958
1085
  "parameters": [
959
1086
  {
@@ -1126,6 +1253,7 @@ const openapiDocument = {
1126
1253
  },
1127
1254
  "400": { "$ref": "#/components/responses/ValidationError" },
1128
1255
  "401": { "$ref": "#/components/responses/Unauthorized" },
1256
+ "404": { "$ref": "#/components/responses/NotFound" },
1129
1257
  "504": {
1130
1258
  "description": "Search query timed out",
1131
1259
  "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
@@ -1483,7 +1611,7 @@ const openapiDocument = {
1483
1611
  "post": {
1484
1612
  "operationId": "createEndpoint",
1485
1613
  "summary": "Create a webhook endpoint",
1486
- "description": "Creates a new webhook endpoint. If a deactivated endpoint\nwith the same URL and domain exists, it is reactivated\ninstead. Subject to plan limits on the number of active\nendpoints.\n\n**Signing is account-scoped, not per-endpoint.** This call\ndoes not return any signing material; every endpoint on the\naccount uses the same webhook secret, fetched via\n`GET /account/webhook-secret`. See the API-level \"Webhook\nsigning\" section for the full wire format (header name,\nsigned string, hash algo, secret format, tolerance) and a\nlanguage-agnostic verification recipe.\n\nAfter creating the endpoint, fire a test delivery against\nit via `POST /endpoints/{id}/test` to confirm your verifier\naccepts the signature.\n\n\nFor local receiving, use kind=pull and a stable name, without url, function_id or domain_id. Named creation resumes the same active destination; omitted filters preserve its selection, while conflicting supplied configuration returns 409. New unfiltered destinations receive all subsequently ready eligible event types. Pull destinations do not occupy HTTP routing slots. Signing-secret setup and a test HTTP delivery are not required for pull receiving.",
1614
+ "description": "Creates a new webhook endpoint. If a deactivated endpoint\nwith the same URL and domain exists, it is reactivated\ninstead. Subject to plan limits on the number of active\nendpoints.\n\n**Signing is account-scoped, not per-endpoint.** This call\ndoes not return any signing material; every endpoint on the\naccount uses the same webhook secret, fetched via\n`GET /account/webhook-secret`. See the API-level \"Webhook\nsigning\" section for the full wire format (header name,\nsigned string, hash algo, secret format, tolerance) and a\nlanguage-agnostic verification recipe.\n\nAfter creating the endpoint, fire a test delivery against\nit via `POST /endpoints/{id}/test` to confirm your verifier\naccepts the signature.\n\n\nFor local receiving, use kind=pull and a stable name, without url, function_id or domain_id. Named creation resumes the same active destination; omitted filters preserve its selection, while conflicting supplied configuration returns 409. New unfiltered destinations receive all subsequently ready eligible event types within their credential scope. Connected-agent credentials automatically create private subscriptions restricted to inbound email for their assigned address. Names are isolated per credential; revocation or replacement deletes its subscriptions. Address-scoped events contain parsed mail without raw MIME, signed download links, routing metadata, or sibling envelope recipients. Pull destinations do not occupy HTTP routing slots. Signing-secret setup and a test HTTP delivery are not required for pull receiving.",
1487
1615
  "tags": ["Endpoints"],
1488
1616
  "requestBody": {
1489
1617
  "required": true,
@@ -5337,7 +5465,15 @@ const openapiDocument = {
5337
5465
  "event_content_unavailable",
5338
5466
  "event_preparation_failed",
5339
5467
  "subscription_unavailable",
5340
- "stale_delivery"
5468
+ "stale_delivery",
5469
+ "idempotency_key_required",
5470
+ "idempotency_key_reused",
5471
+ "credit_code_invalid",
5472
+ "credit_code_already_redeemed",
5473
+ "credit_code_not_eligible",
5474
+ "credit_code_balance_cap",
5475
+ "rate_limited",
5476
+ "service_unavailable"
5341
5477
  ]
5342
5478
  },
5343
5479
  "message": { "type": "string" },
@@ -6303,6 +6439,148 @@ const openapiDocument = {
6303
6439
  } },
6304
6440
  "required": ["secret"]
6305
6441
  },
6442
+ "RedeemCreditCodeInput": {
6443
+ "type": "object",
6444
+ "additionalProperties": false,
6445
+ "required": ["code"],
6446
+ "properties": { "code": {
6447
+ "type": "string",
6448
+ "pattern": "^\\s*\\S(?:[\\s\\S]{0,254}\\S)?\\s*$",
6449
+ "description": "The credit code to redeem. Surrounding whitespace is ignored; the\nrest must be 1 to 256 characters.\n"
6450
+ } }
6451
+ },
6452
+ "CreditRedemption": {
6453
+ "type": "object",
6454
+ "additionalProperties": false,
6455
+ "required": [
6456
+ "redemption_id",
6457
+ "amount_micros",
6458
+ "currency",
6459
+ "granted_at",
6460
+ "expires_at",
6461
+ "label",
6462
+ "replayed",
6463
+ "message"
6464
+ ],
6465
+ "properties": {
6466
+ "redemption_id": {
6467
+ "type": "string",
6468
+ "description": "Identifier of the redemption."
6469
+ },
6470
+ "amount_micros": {
6471
+ "type": "string",
6472
+ "pattern": "^[0-9]+$",
6473
+ "description": "Credit granted, in micros of `currency` (1 USD = 1000000 micros)."
6474
+ },
6475
+ "currency": {
6476
+ "type": "string",
6477
+ "description": "Currency of the granted credit, for example `usd`."
6478
+ },
6479
+ "granted_at": {
6480
+ "type": "string",
6481
+ "format": "date-time",
6482
+ "description": "When the credit was granted."
6483
+ },
6484
+ "expires_at": {
6485
+ "type": ["string", "null"],
6486
+ "format": "date-time",
6487
+ "description": "When the granted credit expires, or null when it does not expire."
6488
+ },
6489
+ "label": {
6490
+ "type": ["string", "null"],
6491
+ "description": "Customer-facing label of the promotion, when it has one."
6492
+ },
6493
+ "replayed": {
6494
+ "type": "boolean",
6495
+ "description": "True when this Idempotency-Key already redeemed this code and the\noriginal grant is returned. No second grant is made.\n"
6496
+ },
6497
+ "message": {
6498
+ "type": "string",
6499
+ "description": "Human-readable summary of the grant, suitable to show as is."
6500
+ }
6501
+ }
6502
+ },
6503
+ "CreditBalance": {
6504
+ "type": "object",
6505
+ "required": ["budget"],
6506
+ "properties": {
6507
+ "budget": {
6508
+ "description": "The active agent spending budget an operator funded for top-ups,\nor null when there is none.\n",
6509
+ "type": ["object", "null"],
6510
+ "additionalProperties": false,
6511
+ "required": [
6512
+ "currency",
6513
+ "max_amount_micros",
6514
+ "spent_micros",
6515
+ "remaining_micros",
6516
+ "per_topup_cap_micros",
6517
+ "expires_at",
6518
+ "status"
6519
+ ],
6520
+ "properties": {
6521
+ "currency": {
6522
+ "type": "string",
6523
+ "description": "Currency of the budget, for example `usd`."
6524
+ },
6525
+ "max_amount_micros": {
6526
+ "type": "string",
6527
+ "pattern": "^[0-9]+$",
6528
+ "description": "Total allowance the operator funded, in micros."
6529
+ },
6530
+ "spent_micros": {
6531
+ "type": "string",
6532
+ "pattern": "^[0-9]+$",
6533
+ "description": "How much of the allowance has been drawn down, in micros."
6534
+ },
6535
+ "remaining_micros": {
6536
+ "type": "string",
6537
+ "pattern": "^[0-9]+$",
6538
+ "description": "`max_amount_micros - spent_micros`, floored at zero."
6539
+ },
6540
+ "per_topup_cap_micros": {
6541
+ "type": ["string", "null"],
6542
+ "pattern": "^[0-9]+$",
6543
+ "description": "Largest single top-up allowed, in micros, or null for no per-top-up cap."
6544
+ },
6545
+ "expires_at": {
6546
+ "type": ["string", "null"],
6547
+ "format": "date-time",
6548
+ "description": "When the allowance expires, or null for no expiry."
6549
+ },
6550
+ "status": {
6551
+ "type": "string",
6552
+ "description": "Budget status. An active budget reads `active`."
6553
+ }
6554
+ }
6555
+ },
6556
+ "prepaid_credit": {
6557
+ "description": "Prepaid usage credit (top-ups, redeemed credit codes and granted\ncredit) that can still pay for usage, or null when there is none.\nOmitted when an exact figure cannot be given right now; the budget\nis still returned.\n",
6558
+ "type": ["object", "null"],
6559
+ "additionalProperties": false,
6560
+ "required": [
6561
+ "currency",
6562
+ "remaining_micros",
6563
+ "next_expires_at"
6564
+ ],
6565
+ "properties": {
6566
+ "currency": {
6567
+ "type": "string",
6568
+ "description": "Currency of the credit, which is the organization billing currency."
6569
+ },
6570
+ "remaining_micros": {
6571
+ "type": "string",
6572
+ "pattern": "^[0-9]+$",
6573
+ "description": "What the credit can still pay for, in micros."
6574
+ },
6575
+ "next_expires_at": {
6576
+ "type": ["string", "null"],
6577
+ "format": "date-time",
6578
+ "description": "Earliest expiry among credits with a balance, or null when none of them expires."
6579
+ }
6580
+ }
6581
+ }
6582
+ }
6583
+ },
6306
6584
  "InboxStatus": {
6307
6585
  "type": "object",
6308
6586
  "additionalProperties": false,
@@ -8906,6 +9184,10 @@ const openapiDocument = {
8906
9184
  "Endpoint": {
8907
9185
  "type": "object",
8908
9186
  "properties": {
9187
+ "recipient": {
9188
+ "type": ["string", "null"],
9189
+ "description": "Server-enforced recipient for an address-scoped pull subscription; null for account-wide receiving."
9190
+ },
8909
9191
  "receiver_capabilities": {
8910
9192
  "type": "object",
8911
9193
  "properties": {
@@ -12741,6 +13023,181 @@ const operationManifest = [
12741
13023
  "tag": "CLI",
12742
13024
  "tagCommand": "cli"
12743
13025
  },
13026
+ {
13027
+ "binaryResponse": false,
13028
+ "bodyRequired": false,
13029
+ "command": "get-credit-balance",
13030
+ "description": "Read the organization credit position. `prepaid_credit` is the prepaid\nusage credit (paid top-ups, redeemed credit codes and granted credit)\nthat can still pay for usage. `budget` is the active agent spending\nbudget an operator funded for top-ups, or null when there is none.\nAmounts are strings of integer micros (1 USD = 1000000 micros).\n",
13031
+ "hasJsonBody": false,
13032
+ "method": "GET",
13033
+ "operationId": "getCreditBalance",
13034
+ "path": "/credits/balance",
13035
+ "pathParams": [],
13036
+ "queryParams": [],
13037
+ "requestSchema": null,
13038
+ "responseSchema": {
13039
+ "type": "object",
13040
+ "required": ["budget"],
13041
+ "properties": {
13042
+ "budget": {
13043
+ "description": "The active agent spending budget an operator funded for top-ups,\nor null when there is none.\n",
13044
+ "type": ["object", "null"],
13045
+ "additionalProperties": false,
13046
+ "required": [
13047
+ "currency",
13048
+ "max_amount_micros",
13049
+ "spent_micros",
13050
+ "remaining_micros",
13051
+ "per_topup_cap_micros",
13052
+ "expires_at",
13053
+ "status"
13054
+ ],
13055
+ "properties": {
13056
+ "currency": {
13057
+ "type": "string",
13058
+ "description": "Currency of the budget, for example `usd`."
13059
+ },
13060
+ "max_amount_micros": {
13061
+ "type": "string",
13062
+ "pattern": "^[0-9]+$",
13063
+ "description": "Total allowance the operator funded, in micros."
13064
+ },
13065
+ "spent_micros": {
13066
+ "type": "string",
13067
+ "pattern": "^[0-9]+$",
13068
+ "description": "How much of the allowance has been drawn down, in micros."
13069
+ },
13070
+ "remaining_micros": {
13071
+ "type": "string",
13072
+ "pattern": "^[0-9]+$",
13073
+ "description": "`max_amount_micros - spent_micros`, floored at zero."
13074
+ },
13075
+ "per_topup_cap_micros": {
13076
+ "type": ["string", "null"],
13077
+ "pattern": "^[0-9]+$",
13078
+ "description": "Largest single top-up allowed, in micros, or null for no per-top-up cap."
13079
+ },
13080
+ "expires_at": {
13081
+ "type": ["string", "null"],
13082
+ "format": "date-time",
13083
+ "description": "When the allowance expires, or null for no expiry."
13084
+ },
13085
+ "status": {
13086
+ "type": "string",
13087
+ "description": "Budget status. An active budget reads `active`."
13088
+ }
13089
+ }
13090
+ },
13091
+ "prepaid_credit": {
13092
+ "description": "Prepaid usage credit (top-ups, redeemed credit codes and granted\ncredit) that can still pay for usage, or null when there is none.\nOmitted when an exact figure cannot be given right now; the budget\nis still returned.\n",
13093
+ "type": ["object", "null"],
13094
+ "additionalProperties": false,
13095
+ "required": [
13096
+ "currency",
13097
+ "remaining_micros",
13098
+ "next_expires_at"
13099
+ ],
13100
+ "properties": {
13101
+ "currency": {
13102
+ "type": "string",
13103
+ "description": "Currency of the credit, which is the organization billing currency."
13104
+ },
13105
+ "remaining_micros": {
13106
+ "type": "string",
13107
+ "pattern": "^[0-9]+$",
13108
+ "description": "What the credit can still pay for, in micros."
13109
+ },
13110
+ "next_expires_at": {
13111
+ "type": ["string", "null"],
13112
+ "format": "date-time",
13113
+ "description": "Earliest expiry among credits with a balance, or null when none of them expires."
13114
+ }
13115
+ }
13116
+ }
13117
+ }
13118
+ },
13119
+ "sdkName": "getCreditBalance",
13120
+ "summary": "Get credit balance",
13121
+ "tag": "Credits",
13122
+ "tagCommand": "credits"
13123
+ },
13124
+ {
13125
+ "binaryResponse": false,
13126
+ "bodyRequired": true,
13127
+ "command": "redeem-credit-code",
13128
+ "description": "Redeem a credit code for the authenticated organization. The credit is\nadded to the organization prepaid credit and shows in\n`GET /credits/balance` under `prepaid_credit`.\n\nRedeeming requires an organization owner or admin. An API key redeems\nwith the authority of the user who created it, based on that user's\ncurrent role; a key without that authority gets the same\n`credit_code_invalid` refusal as an unknown code.\n\nThe `Idempotency-Key` header is required. Retrying with the same key\nand code returns the original grant with `replayed: true` and grants\nnothing new; the same key with a different code is refused with\n`idempotency_key_reused`. Every refusal carries a human-readable\n`error.message` that can be shown to the user as is.\n",
13129
+ "hasJsonBody": true,
13130
+ "method": "POST",
13131
+ "operationId": "redeemCreditCode",
13132
+ "path": "/credits/redeem",
13133
+ "pathParams": [],
13134
+ "queryParams": [],
13135
+ "requestSchema": {
13136
+ "type": "object",
13137
+ "additionalProperties": false,
13138
+ "required": ["code"],
13139
+ "properties": { "code": {
13140
+ "type": "string",
13141
+ "pattern": "^\\s*\\S(?:[\\s\\S]{0,254}\\S)?\\s*$",
13142
+ "description": "The credit code to redeem. Surrounding whitespace is ignored; the\nrest must be 1 to 256 characters.\n"
13143
+ } }
13144
+ },
13145
+ "responseSchema": {
13146
+ "type": "object",
13147
+ "additionalProperties": false,
13148
+ "required": [
13149
+ "redemption_id",
13150
+ "amount_micros",
13151
+ "currency",
13152
+ "granted_at",
13153
+ "expires_at",
13154
+ "label",
13155
+ "replayed",
13156
+ "message"
13157
+ ],
13158
+ "properties": {
13159
+ "redemption_id": {
13160
+ "type": "string",
13161
+ "description": "Identifier of the redemption."
13162
+ },
13163
+ "amount_micros": {
13164
+ "type": "string",
13165
+ "pattern": "^[0-9]+$",
13166
+ "description": "Credit granted, in micros of `currency` (1 USD = 1000000 micros)."
13167
+ },
13168
+ "currency": {
13169
+ "type": "string",
13170
+ "description": "Currency of the granted credit, for example `usd`."
13171
+ },
13172
+ "granted_at": {
13173
+ "type": "string",
13174
+ "format": "date-time",
13175
+ "description": "When the credit was granted."
13176
+ },
13177
+ "expires_at": {
13178
+ "type": ["string", "null"],
13179
+ "format": "date-time",
13180
+ "description": "When the granted credit expires, or null when it does not expire."
13181
+ },
13182
+ "label": {
13183
+ "type": ["string", "null"],
13184
+ "description": "Customer-facing label of the promotion, when it has one."
13185
+ },
13186
+ "replayed": {
13187
+ "type": "boolean",
13188
+ "description": "True when this Idempotency-Key already redeemed this code and the\noriginal grant is returned. No second grant is made.\n"
13189
+ },
13190
+ "message": {
13191
+ "type": "string",
13192
+ "description": "Human-readable summary of the grant, suitable to show as is."
13193
+ }
13194
+ }
13195
+ },
13196
+ "sdkName": "redeemCreditCode",
13197
+ "summary": "Redeem a credit code",
13198
+ "tag": "Credits",
13199
+ "tagCommand": "credits"
13200
+ },
12744
13201
  {
12745
13202
  "binaryResponse": false,
12746
13203
  "bodyRequired": true,
@@ -14814,7 +15271,7 @@ const operationManifest = [
14814
15271
  "binaryResponse": false,
14815
15272
  "bodyRequired": false,
14816
15273
  "command": "search-emails",
14817
- "description": "Searches inbound emails with structured filters and optional\nfull-text matching across parsed email fields. This endpoint is\noptimized for filtered inbox views and CLI polling workflows:\ncallers that only need new accepted mail can pass\n`sort=received_at_asc`, `snippet=false`, `include_facets=false`,\nand a `date_from` timestamp.\n\n`q`, `subject`, and `body` use the same English full-text index\nas the web inbox search. Structured filters such as `from`, `to`,\n`domain_id`, status, attachment presence, and spam score bounds\nare combined with the text query.\n",
15274
+ "description": "Searches inbound emails with structured filters and optional\nfull-text matching across parsed email fields. This endpoint is\noptimized for filtered inbox views and CLI polling workflows:\ncallers that only need new accepted mail can pass\n`sort=received_at_asc`, `snippet=false`, `include_facets=false`,\nand a `date_from` timestamp.\n\n`q`, `subject`, and `body` use the same English full-text index\nas the web inbox search. Structured filters such as `from`, `to`,\n`domain_id`, status, attachment presence, and spam score bounds\nare combined with the text query.\n\nConnected-agent credentials search only mail received by their own\naddress. This applies to results, totals, facets, and every page;\nsearch filters cannot widen the credential's scope. When\n`reply_to_sent_email_id` is supplied, its parent send must belong\nto the connected address in the same organization. An unavailable\nparent returns 404. Sender filters are not authentication proof;\ninspect the email detail's authentication evidence before trusting it.\n",
14818
15275
  "hasJsonBody": false,
14819
15276
  "method": "GET",
14820
15277
  "operationId": "searchEmails",
@@ -15334,7 +15791,7 @@ const operationManifest = [
15334
15791
  "binaryResponse": false,
15335
15792
  "bodyRequired": true,
15336
15793
  "command": "create-endpoint",
15337
- "description": "Creates a new webhook endpoint. If a deactivated endpoint\nwith the same URL and domain exists, it is reactivated\ninstead. Subject to plan limits on the number of active\nendpoints.\n\n**Signing is account-scoped, not per-endpoint.** This call\ndoes not return any signing material; every endpoint on the\naccount uses the same webhook secret, fetched via\n`GET /account/webhook-secret`. See the API-level \"Webhook\nsigning\" section for the full wire format (header name,\nsigned string, hash algo, secret format, tolerance) and a\nlanguage-agnostic verification recipe.\n\nAfter creating the endpoint, fire a test delivery against\nit via `POST /endpoints/{id}/test` to confirm your verifier\naccepts the signature.\n\n\nFor local receiving, use kind=pull and a stable name, without url, function_id or domain_id. Named creation resumes the same active destination; omitted filters preserve its selection, while conflicting supplied configuration returns 409. New unfiltered destinations receive all subsequently ready eligible event types. Pull destinations do not occupy HTTP routing slots. Signing-secret setup and a test HTTP delivery are not required for pull receiving.",
15794
+ "description": "Creates a new webhook endpoint. If a deactivated endpoint\nwith the same URL and domain exists, it is reactivated\ninstead. Subject to plan limits on the number of active\nendpoints.\n\n**Signing is account-scoped, not per-endpoint.** This call\ndoes not return any signing material; every endpoint on the\naccount uses the same webhook secret, fetched via\n`GET /account/webhook-secret`. See the API-level \"Webhook\nsigning\" section for the full wire format (header name,\nsigned string, hash algo, secret format, tolerance) and a\nlanguage-agnostic verification recipe.\n\nAfter creating the endpoint, fire a test delivery against\nit via `POST /endpoints/{id}/test` to confirm your verifier\naccepts the signature.\n\n\nFor local receiving, use kind=pull and a stable name, without url, function_id or domain_id. Named creation resumes the same active destination; omitted filters preserve its selection, while conflicting supplied configuration returns 409. New unfiltered destinations receive all subsequently ready eligible event types within their credential scope. Connected-agent credentials automatically create private subscriptions restricted to inbound email for their assigned address. Names are isolated per credential; revocation or replacement deletes its subscriptions. Address-scoped events contain parsed mail without raw MIME, signed download links, routing metadata, or sibling envelope recipients. Pull destinations do not occupy HTTP routing slots. Signing-secret setup and a test HTTP delivery are not required for pull receiving.",
15338
15795
  "hasJsonBody": true,
15339
15796
  "method": "POST",
15340
15797
  "operationId": "createEndpoint",
@@ -15402,6 +15859,10 @@ const operationManifest = [
15402
15859
  "responseSchema": {
15403
15860
  "type": "object",
15404
15861
  "properties": {
15862
+ "recipient": {
15863
+ "type": ["string", "null"],
15864
+ "description": "Server-enforced recipient for an address-scoped pull subscription; null for account-wide receiving."
15865
+ },
15405
15866
  "receiver_capabilities": {
15406
15867
  "type": "object",
15407
15868
  "properties": {
@@ -15578,6 +16039,10 @@ const operationManifest = [
15578
16039
  "items": {
15579
16040
  "type": "object",
15580
16041
  "properties": {
16042
+ "recipient": {
16043
+ "type": ["string", "null"],
16044
+ "description": "Server-enforced recipient for an address-scoped pull subscription; null for account-wide receiving."
16045
+ },
15581
16046
  "receiver_capabilities": {
15582
16047
  "type": "object",
15583
16048
  "properties": {
@@ -16044,6 +16509,10 @@ const operationManifest = [
16044
16509
  "responseSchema": {
16045
16510
  "type": "object",
16046
16511
  "properties": {
16512
+ "recipient": {
16513
+ "type": ["string", "null"],
16514
+ "description": "Server-enforced recipient for an address-scoped pull subscription; null for account-wide receiving."
16515
+ },
16047
16516
  "receiver_capabilities": {
16048
16517
  "type": "object",
16049
16518
  "properties": {
@@ -1,4 +1,4 @@
1
- import { I as WebhookAttachment, l as EmailAddress, w as ParsedDataComplete } from "../types-DcXtFARL.js";
1
+ import { I as WebhookAttachment, l as EmailAddress, w as ParsedDataComplete } from "../types-Rn4qu5Q7.js";
2
2
  import { a as parseFromHeader, i as ValidatedAddress, n as ParseFromHeaderResult, o as parseFromHeaderLoose, r as ParsedAddress, t as ParseFromHeaderFailureReason } from "../address-parser-B7L4E0zP.js";
3
3
 
4
4
  //#region src/parser/attachment-parser.d.ts