@primitivedotdev/sdk 1.7.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +83 -0
- package/dist/api/index.d.ts +4 -4
- package/dist/api/index.js +3 -3
- package/dist/{api-ClLMDF81.js → api-26ENR8Ph.js} +30 -1
- package/dist/contract/index.d.ts +2 -2
- package/dist/contract/index.js +1 -1
- package/dist/{errors-DyuAXctD.d.ts → errors-bXUNXAlf.d.ts} +1 -1
- package/dist/{index-iZWfb98V.d.ts → index-BDnY9HH-.d.ts} +30 -48
- package/dist/{index-BnbrY8kp.d.ts → index-C3ahy3ls.d.ts} +161 -3
- package/dist/index.d.ts +5 -5
- package/dist/index.js +3 -3
- package/dist/openapi/index.js +1 -1
- package/dist/{operations.generated-DQIrhCT5.js → operations.generated-Bu20uPOw.js} +304 -0
- package/dist/parser/index.d.ts +1 -1
- package/dist/{types-QT2ss9ho.d.ts → types-BjnIxPED.d.ts} +97 -2
- package/dist/webhook/index.d.ts +4 -4
- package/dist/webhook/index.js +2 -2
- package/dist/{webhook-CwjCyFv-.js → webhook-CiIPtegj.js} +155 -26
- package/dist/x402/index.d.ts +136 -1
- package/dist/x402/index.js +178 -2
- package/package.json +1 -1
|
@@ -2379,6 +2379,40 @@ const openapiDocument = {
|
|
|
2379
2379
|
}
|
|
2380
2380
|
}
|
|
2381
2381
|
},
|
|
2382
|
+
"/x402/email-challenges": { "post": {
|
|
2383
|
+
"operationId": "createEmailChallenge",
|
|
2384
|
+
"summary": "Create an email-native payment challenge",
|
|
2385
|
+
"description": "Issue an x402 payment challenge over a real email thread (the payee\nside). Unlike `createChallenge` (which mints a synthetic challenge id),\nthis sends the challenge as an email from `from` to `to` and binds the\npayment to that DKIM-authenticated thread. The `pay_to` address and the\ntoken asset are resolved server-side from your registered default payout\naddress for the network, never from the request. The response carries\nthe thread's `interaction_id` plus the `challenge` (the\n`payment_requirements`, the `nonce_binding`, and `expires_at`) the payer\nneeds to sign; the payer replies with a signed `payment` interaction\nstep. Amounts are in token base units (USDC has 6 decimals, so `\"10000\"`\nis 0.01 USDC).\n",
|
|
2386
|
+
"tags": ["Payments"],
|
|
2387
|
+
"security": [{ "BearerAuth": [] }],
|
|
2388
|
+
"parameters": [{ "$ref": "#/components/parameters/IdempotencyKey" }],
|
|
2389
|
+
"requestBody": {
|
|
2390
|
+
"required": true,
|
|
2391
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateEmailChallengeInput" } } }
|
|
2392
|
+
},
|
|
2393
|
+
"responses": {
|
|
2394
|
+
"200": {
|
|
2395
|
+
"description": "Idempotent replay: a request with a previously-used idempotency key\nreturns the original issued challenge without sending a second email.\n",
|
|
2396
|
+
"content": { "application/json": { "schema": { "allOf": [{ "$ref": "#/components/schemas/SuccessEnvelope" }, {
|
|
2397
|
+
"type": "object",
|
|
2398
|
+
"properties": { "data": { "$ref": "#/components/schemas/X402EmailChallenge" } }
|
|
2399
|
+
}] } } }
|
|
2400
|
+
},
|
|
2401
|
+
"201": {
|
|
2402
|
+
"description": "Email challenge issued",
|
|
2403
|
+
"content": { "application/json": { "schema": { "allOf": [{ "$ref": "#/components/schemas/SuccessEnvelope" }, {
|
|
2404
|
+
"type": "object",
|
|
2405
|
+
"properties": { "data": { "$ref": "#/components/schemas/X402EmailChallenge" } }
|
|
2406
|
+
}] } } }
|
|
2407
|
+
},
|
|
2408
|
+
"400": { "$ref": "#/components/responses/ValidationError" },
|
|
2409
|
+
"401": { "$ref": "#/components/responses/Unauthorized" },
|
|
2410
|
+
"403": { "$ref": "#/components/responses/Forbidden" },
|
|
2411
|
+
"409": { "$ref": "#/components/responses/Conflict" },
|
|
2412
|
+
"422": { "$ref": "#/components/responses/UnprocessableEntity" },
|
|
2413
|
+
"429": { "$ref": "#/components/responses/RateLimited" }
|
|
2414
|
+
}
|
|
2415
|
+
} },
|
|
2382
2416
|
"/x402/challenges": { "post": {
|
|
2383
2417
|
"operationId": "createChallenge",
|
|
2384
2418
|
"summary": "Create a payment challenge",
|
|
@@ -2548,6 +2582,16 @@ const openapiDocument = {
|
|
|
2548
2582
|
},
|
|
2549
2583
|
"description": "Resource UUID"
|
|
2550
2584
|
},
|
|
2585
|
+
"IdempotencyKey": {
|
|
2586
|
+
"name": "idempotency-key",
|
|
2587
|
+
"in": "header",
|
|
2588
|
+
"required": false,
|
|
2589
|
+
"schema": {
|
|
2590
|
+
"type": "string",
|
|
2591
|
+
"maxLength": 255
|
|
2592
|
+
},
|
|
2593
|
+
"description": "Optional idempotency key. Retrying a request with the same key returns\nthe original result instead of repeating the side effect (for\n`createEmailChallenge`, re-sending the email).\n"
|
|
2594
|
+
},
|
|
2551
2595
|
"Cursor": {
|
|
2552
2596
|
"name": "cursor",
|
|
2553
2597
|
"in": "query",
|
|
@@ -2988,6 +3032,94 @@ const openapiDocument = {
|
|
|
2988
3032
|
"expires_at"
|
|
2989
3033
|
]
|
|
2990
3034
|
},
|
|
3035
|
+
"CreateEmailChallengeInput": {
|
|
3036
|
+
"type": "object",
|
|
3037
|
+
"additionalProperties": false,
|
|
3038
|
+
"description": "Issue a payment challenge over an email thread. `from` is your sending\naddress (the funds receiver; ownership is enforced at send, exactly as\nfor outbound mail) and `to` is the payer's address. The `pay_to` payout\nwallet and the token asset are resolved server-side, never taken from\nthe request.\n",
|
|
3039
|
+
"properties": {
|
|
3040
|
+
"from": {
|
|
3041
|
+
"type": "string",
|
|
3042
|
+
"format": "email",
|
|
3043
|
+
"description": "Your sending address (the payee / funds receiver). Must be an\naddress your org is allowed to send from.\n"
|
|
3044
|
+
},
|
|
3045
|
+
"to": {
|
|
3046
|
+
"type": "string",
|
|
3047
|
+
"format": "email",
|
|
3048
|
+
"description": "The payer's email address the challenge is sent to."
|
|
3049
|
+
},
|
|
3050
|
+
"amount": {
|
|
3051
|
+
"type": "string",
|
|
3052
|
+
"pattern": "^[1-9][0-9]{0,38}$",
|
|
3053
|
+
"description": "Amount to collect, in token base units. USDC has 6 decimals, so\n`\"10000\"` is 0.01 USDC.\n"
|
|
3054
|
+
},
|
|
3055
|
+
"network": {
|
|
3056
|
+
"type": "string",
|
|
3057
|
+
"enum": ["base", "base-sepolia"]
|
|
3058
|
+
},
|
|
3059
|
+
"expires_in": {
|
|
3060
|
+
"type": "integer",
|
|
3061
|
+
"minimum": 60,
|
|
3062
|
+
"maximum": 86400,
|
|
3063
|
+
"description": "Seconds until the challenge expires. Defaults to 3600."
|
|
3064
|
+
},
|
|
3065
|
+
"resource": {
|
|
3066
|
+
"type": "string",
|
|
3067
|
+
"format": "uri",
|
|
3068
|
+
"maxLength": 2048,
|
|
3069
|
+
"description": "Optional URL identifying what is being paid for."
|
|
3070
|
+
},
|
|
3071
|
+
"description": {
|
|
3072
|
+
"type": "string",
|
|
3073
|
+
"maxLength": 512,
|
|
3074
|
+
"description": "Optional human-readable description of the payment."
|
|
3075
|
+
}
|
|
3076
|
+
},
|
|
3077
|
+
"required": [
|
|
3078
|
+
"from",
|
|
3079
|
+
"to",
|
|
3080
|
+
"amount",
|
|
3081
|
+
"network"
|
|
3082
|
+
]
|
|
3083
|
+
},
|
|
3084
|
+
"X402EmailChallengeDetails": {
|
|
3085
|
+
"type": "object",
|
|
3086
|
+
"description": "The challenge the payer needs to sign and pay, carried inside an\nemail-native challenge response.\n",
|
|
3087
|
+
"properties": {
|
|
3088
|
+
"payment_requirements": { "$ref": "#/components/schemas/X402PaymentRequirements" },
|
|
3089
|
+
"nonce_binding": { "$ref": "#/components/schemas/X402NonceBinding" },
|
|
3090
|
+
"expires_at": {
|
|
3091
|
+
"type": "string",
|
|
3092
|
+
"format": "date-time",
|
|
3093
|
+
"description": "ISO-8601 expiry of the challenge."
|
|
3094
|
+
}
|
|
3095
|
+
},
|
|
3096
|
+
"required": [
|
|
3097
|
+
"payment_requirements",
|
|
3098
|
+
"nonce_binding",
|
|
3099
|
+
"expires_at"
|
|
3100
|
+
]
|
|
3101
|
+
},
|
|
3102
|
+
"X402EmailChallenge": {
|
|
3103
|
+
"type": "object",
|
|
3104
|
+
"description": "The result of issuing an email-native payment challenge. `interaction_id`\nis the real email thread id (`uuid@domain`) the payment is bound to;\n`challenge_id` is the underlying challenge record. Hand the `challenge`\nto the payer, who replies with a signed `payment` interaction step (the\nSDK `payEmailChallenge` helper builds it).\n",
|
|
3105
|
+
"properties": {
|
|
3106
|
+
"interaction_id": {
|
|
3107
|
+
"type": "string",
|
|
3108
|
+
"description": "The email thread id (`uuid@domain`) the payment is bound to."
|
|
3109
|
+
},
|
|
3110
|
+
"challenge_id": {
|
|
3111
|
+
"type": "string",
|
|
3112
|
+
"format": "uuid",
|
|
3113
|
+
"description": "The underlying challenge record id."
|
|
3114
|
+
},
|
|
3115
|
+
"challenge": { "$ref": "#/components/schemas/X402EmailChallengeDetails" }
|
|
3116
|
+
},
|
|
3117
|
+
"required": [
|
|
3118
|
+
"interaction_id",
|
|
3119
|
+
"challenge_id",
|
|
3120
|
+
"challenge"
|
|
3121
|
+
]
|
|
3122
|
+
},
|
|
2991
3123
|
"X402PaymentPayload": {
|
|
2992
3124
|
"type": "object",
|
|
2993
3125
|
"description": "A signed x402 v1 `PaymentPayload`. The SDK `pay()` helper builds this;\ncallers rarely construct it by hand. Field names are x402-native.\n",
|
|
@@ -12836,6 +12968,178 @@ const operationManifest = [
|
|
|
12836
12968
|
"tag": "Payments",
|
|
12837
12969
|
"tagCommand": "payments"
|
|
12838
12970
|
},
|
|
12971
|
+
{
|
|
12972
|
+
"binaryResponse": false,
|
|
12973
|
+
"bodyRequired": true,
|
|
12974
|
+
"command": "create-email-challenge",
|
|
12975
|
+
"description": "Issue an x402 payment challenge over a real email thread (the payee\nside). Unlike `createChallenge` (which mints a synthetic challenge id),\nthis sends the challenge as an email from `from` to `to` and binds the\npayment to that DKIM-authenticated thread. The `pay_to` address and the\ntoken asset are resolved server-side from your registered default payout\naddress for the network, never from the request. The response carries\nthe thread's `interaction_id` plus the `challenge` (the\n`payment_requirements`, the `nonce_binding`, and `expires_at`) the payer\nneeds to sign; the payer replies with a signed `payment` interaction\nstep. Amounts are in token base units (USDC has 6 decimals, so `\"10000\"`\nis 0.01 USDC).\n",
|
|
12976
|
+
"hasJsonBody": true,
|
|
12977
|
+
"method": "POST",
|
|
12978
|
+
"operationId": "createEmailChallenge",
|
|
12979
|
+
"path": "/x402/email-challenges",
|
|
12980
|
+
"pathParams": [],
|
|
12981
|
+
"queryParams": [],
|
|
12982
|
+
"requestSchema": {
|
|
12983
|
+
"type": "object",
|
|
12984
|
+
"additionalProperties": false,
|
|
12985
|
+
"description": "Issue a payment challenge over an email thread. `from` is your sending\naddress (the funds receiver; ownership is enforced at send, exactly as\nfor outbound mail) and `to` is the payer's address. The `pay_to` payout\nwallet and the token asset are resolved server-side, never taken from\nthe request.\n",
|
|
12986
|
+
"properties": {
|
|
12987
|
+
"from": {
|
|
12988
|
+
"type": "string",
|
|
12989
|
+
"format": "email",
|
|
12990
|
+
"description": "Your sending address (the payee / funds receiver). Must be an\naddress your org is allowed to send from.\n"
|
|
12991
|
+
},
|
|
12992
|
+
"to": {
|
|
12993
|
+
"type": "string",
|
|
12994
|
+
"format": "email",
|
|
12995
|
+
"description": "The payer's email address the challenge is sent to."
|
|
12996
|
+
},
|
|
12997
|
+
"amount": {
|
|
12998
|
+
"type": "string",
|
|
12999
|
+
"pattern": "^[1-9][0-9]{0,38}$",
|
|
13000
|
+
"description": "Amount to collect, in token base units. USDC has 6 decimals, so\n`\"10000\"` is 0.01 USDC.\n"
|
|
13001
|
+
},
|
|
13002
|
+
"network": {
|
|
13003
|
+
"type": "string",
|
|
13004
|
+
"enum": ["base", "base-sepolia"]
|
|
13005
|
+
},
|
|
13006
|
+
"expires_in": {
|
|
13007
|
+
"type": "integer",
|
|
13008
|
+
"minimum": 60,
|
|
13009
|
+
"maximum": 86400,
|
|
13010
|
+
"description": "Seconds until the challenge expires. Defaults to 3600."
|
|
13011
|
+
},
|
|
13012
|
+
"resource": {
|
|
13013
|
+
"type": "string",
|
|
13014
|
+
"format": "uri",
|
|
13015
|
+
"maxLength": 2048,
|
|
13016
|
+
"description": "Optional URL identifying what is being paid for."
|
|
13017
|
+
},
|
|
13018
|
+
"description": {
|
|
13019
|
+
"type": "string",
|
|
13020
|
+
"maxLength": 512,
|
|
13021
|
+
"description": "Optional human-readable description of the payment."
|
|
13022
|
+
}
|
|
13023
|
+
},
|
|
13024
|
+
"required": [
|
|
13025
|
+
"from",
|
|
13026
|
+
"to",
|
|
13027
|
+
"amount",
|
|
13028
|
+
"network"
|
|
13029
|
+
]
|
|
13030
|
+
},
|
|
13031
|
+
"responseSchema": {
|
|
13032
|
+
"type": "object",
|
|
13033
|
+
"description": "The result of issuing an email-native payment challenge. `interaction_id`\nis the real email thread id (`uuid@domain`) the payment is bound to;\n`challenge_id` is the underlying challenge record. Hand the `challenge`\nto the payer, who replies with a signed `payment` interaction step (the\nSDK `payEmailChallenge` helper builds it).\n",
|
|
13034
|
+
"properties": {
|
|
13035
|
+
"interaction_id": {
|
|
13036
|
+
"type": "string",
|
|
13037
|
+
"description": "The email thread id (`uuid@domain`) the payment is bound to."
|
|
13038
|
+
},
|
|
13039
|
+
"challenge_id": {
|
|
13040
|
+
"type": "string",
|
|
13041
|
+
"format": "uuid",
|
|
13042
|
+
"description": "The underlying challenge record id."
|
|
13043
|
+
},
|
|
13044
|
+
"challenge": {
|
|
13045
|
+
"type": "object",
|
|
13046
|
+
"description": "The challenge the payer needs to sign and pay, carried inside an\nemail-native challenge response.\n",
|
|
13047
|
+
"properties": {
|
|
13048
|
+
"payment_requirements": {
|
|
13049
|
+
"type": "object",
|
|
13050
|
+
"description": "The x402 `PaymentRequirements` the payer signs over. Field names are\nx402's native camelCase, preserved byte-for-byte.\n",
|
|
13051
|
+
"properties": {
|
|
13052
|
+
"scheme": {
|
|
13053
|
+
"type": "string",
|
|
13054
|
+
"description": "The x402 settlement scheme. Always `exact` for v1.",
|
|
13055
|
+
"example": "exact"
|
|
13056
|
+
},
|
|
13057
|
+
"network": {
|
|
13058
|
+
"type": "string",
|
|
13059
|
+
"enum": ["base", "base-sepolia"]
|
|
13060
|
+
},
|
|
13061
|
+
"maxAmountRequired": {
|
|
13062
|
+
"type": "string",
|
|
13063
|
+
"description": "Amount in token base units."
|
|
13064
|
+
},
|
|
13065
|
+
"payTo": {
|
|
13066
|
+
"type": "string",
|
|
13067
|
+
"description": "The payee's resolved payout address (checksummed)."
|
|
13068
|
+
},
|
|
13069
|
+
"asset": {
|
|
13070
|
+
"type": "string",
|
|
13071
|
+
"description": "The token contract address (checksummed). USDC."
|
|
13072
|
+
},
|
|
13073
|
+
"resource": { "type": "string" },
|
|
13074
|
+
"description": { "type": "string" },
|
|
13075
|
+
"maxTimeoutSeconds": { "type": "integer" },
|
|
13076
|
+
"extra": {
|
|
13077
|
+
"type": "object",
|
|
13078
|
+
"description": "The token's load-bearing EIP-712 domain params. `name` differs by\nchain (Base mainnet USDC is `USD Coin`, Base Sepolia is `USDC`); a\nwrong value produces a signature the verifier rejects.\n",
|
|
13079
|
+
"properties": {
|
|
13080
|
+
"name": { "type": "string" },
|
|
13081
|
+
"version": { "type": "string" }
|
|
13082
|
+
},
|
|
13083
|
+
"required": ["name", "version"]
|
|
13084
|
+
}
|
|
13085
|
+
},
|
|
13086
|
+
"required": [
|
|
13087
|
+
"scheme",
|
|
13088
|
+
"network",
|
|
13089
|
+
"maxAmountRequired",
|
|
13090
|
+
"payTo",
|
|
13091
|
+
"asset",
|
|
13092
|
+
"extra"
|
|
13093
|
+
]
|
|
13094
|
+
},
|
|
13095
|
+
"nonce_binding": {
|
|
13096
|
+
"type": "object",
|
|
13097
|
+
"description": "The interaction binding the payer hashes into the EIP-3009 nonce\n(`deriveEip3009Nonce`). Pinning the nonce to this binding is what lets an\nx402 payment ride asynchronous transports safely: a replayed challenge\ncan't redirect funds and a signed payment can't settle twice.\n",
|
|
13098
|
+
"properties": {
|
|
13099
|
+
"interaction_id": {
|
|
13100
|
+
"type": "string",
|
|
13101
|
+
"description": "Interaction id, including its `@domain` part."
|
|
13102
|
+
},
|
|
13103
|
+
"challenge_step_id": {
|
|
13104
|
+
"type": "string",
|
|
13105
|
+
"format": "uuid"
|
|
13106
|
+
},
|
|
13107
|
+
"challenge_nonce": {
|
|
13108
|
+
"type": "string",
|
|
13109
|
+
"pattern": "^[0-9a-f]{64}$",
|
|
13110
|
+
"description": "32 random bytes as 64 lowercase hex chars."
|
|
13111
|
+
}
|
|
13112
|
+
},
|
|
13113
|
+
"required": [
|
|
13114
|
+
"interaction_id",
|
|
13115
|
+
"challenge_step_id",
|
|
13116
|
+
"challenge_nonce"
|
|
13117
|
+
]
|
|
13118
|
+
},
|
|
13119
|
+
"expires_at": {
|
|
13120
|
+
"type": "string",
|
|
13121
|
+
"format": "date-time",
|
|
13122
|
+
"description": "ISO-8601 expiry of the challenge."
|
|
13123
|
+
}
|
|
13124
|
+
},
|
|
13125
|
+
"required": [
|
|
13126
|
+
"payment_requirements",
|
|
13127
|
+
"nonce_binding",
|
|
13128
|
+
"expires_at"
|
|
13129
|
+
]
|
|
13130
|
+
}
|
|
13131
|
+
},
|
|
13132
|
+
"required": [
|
|
13133
|
+
"interaction_id",
|
|
13134
|
+
"challenge_id",
|
|
13135
|
+
"challenge"
|
|
13136
|
+
]
|
|
13137
|
+
},
|
|
13138
|
+
"sdkName": "createEmailChallenge",
|
|
13139
|
+
"summary": "Create an email-native payment challenge",
|
|
13140
|
+
"tag": "Payments",
|
|
13141
|
+
"tagCommand": "payments"
|
|
13142
|
+
},
|
|
12839
13143
|
{
|
|
12840
13144
|
"binaryResponse": false,
|
|
12841
13145
|
"bodyRequired": false,
|
package/dist/parser/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as WebhookAttachment, l as EmailAddress, w as ParsedDataComplete } from "../types-
|
|
1
|
+
import { F as WebhookAttachment, l as EmailAddress, w as ParsedDataComplete } from "../types-BjnIxPED.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-CA6G7R-h.js";
|
|
3
3
|
|
|
4
4
|
//#region src/parser/attachment-parser.d.ts
|
|
@@ -897,6 +897,95 @@ interface DkimSignature$1 {
|
|
|
897
897
|
algo: (string | null);
|
|
898
898
|
}
|
|
899
899
|
//#endregion
|
|
900
|
+
//#region src/webhook/events.d.ts
|
|
901
|
+
/**
|
|
902
|
+
* The five first-party email events (subject = an email).
|
|
903
|
+
*/
|
|
904
|
+
declare const EMAIL_EVENT_TYPES: readonly ["email.received", "email.bounced", "email.tls_report", "email.dmarc_report", "email.dmarc_failure"];
|
|
905
|
+
/**
|
|
906
|
+
* The two x402 settlement-notification events (subject = a payment). Emitted for
|
|
907
|
+
* both the synthetic API pay flow and the email-native settle path.
|
|
908
|
+
*/
|
|
909
|
+
declare const PAYMENT_EVENT_TYPES: readonly ["payment.settled", "payment.failed"];
|
|
910
|
+
/**
|
|
911
|
+
* The interaction step events (subject = an interaction). One event per accepted
|
|
912
|
+
* protocol step, named `interaction.<protocolShort>.<suffix>`.
|
|
913
|
+
*
|
|
914
|
+
* The x402 slice covers the payment lifecycle a payee/payer cares about; the ack
|
|
915
|
+
* slice covers the acknowledgement protocols.
|
|
916
|
+
*/
|
|
917
|
+
declare const INTERACTION_EVENT_TYPES: readonly ["interaction.ack.acked", "interaction.ack.canceled", "interaction.ack.expired", "interaction.ack.received", "interaction.ack.requested", "interaction.x402.challenge", "interaction.x402.declined", "interaction.x402.expired", "interaction.x402.payment", "interaction.x402.rejected", "interaction.x402.settled", "interaction.x402.verify_timeout"];
|
|
918
|
+
/**
|
|
919
|
+
* The full enumerated catalog of every current webhook event type: the five
|
|
920
|
+
* email.*, the two payment.*, and every interaction.<protocol>.<suffix>.
|
|
921
|
+
*/
|
|
922
|
+
declare const WEBHOOK_EVENT_TYPES: readonly ["email.received", "email.bounced", "email.tls_report", "email.dmarc_report", "email.dmarc_failure", "payment.settled", "payment.failed", "interaction.ack.acked", "interaction.ack.canceled", "interaction.ack.expired", "interaction.ack.received", "interaction.ack.requested", "interaction.x402.challenge", "interaction.x402.declined", "interaction.x402.expired", "interaction.x402.payment", "interaction.x402.rejected", "interaction.x402.settled", "interaction.x402.verify_timeout"];
|
|
923
|
+
/**
|
|
924
|
+
* Any current catalog value: every `email.*`, `payment.*`, and
|
|
925
|
+
* `interaction.x402.*` / `interaction.ack.*` event the platform emits, surfaced
|
|
926
|
+
* in the `X-Webhook-Event` header. Use this to type a switch over the header.
|
|
927
|
+
*/
|
|
928
|
+
type WebhookEventType = (typeof WEBHOOK_EVENT_TYPES)[number];
|
|
929
|
+
/** True if `eventType` is a known current catalog value. */
|
|
930
|
+
declare function isKnownWebhookEventType(eventType: string | null | undefined): eventType is WebhookEventType;
|
|
931
|
+
/**
|
|
932
|
+
* Common shape of a `payment.*` webhook body. The stored payload carries the
|
|
933
|
+
* event name in `type` (not `event`); the parser overlays a canonical `event`
|
|
934
|
+
* from the header so consumers can branch on a single field.
|
|
935
|
+
*/
|
|
936
|
+
interface PaymentEvent {
|
|
937
|
+
/** Canonical event name, mirrored from the `X-Webhook-Event` header. */
|
|
938
|
+
event: "payment.settled" | "payment.failed";
|
|
939
|
+
/** The event name as carried in the raw stored body. */
|
|
940
|
+
type?: string;
|
|
941
|
+
id?: string;
|
|
942
|
+
created_at?: string;
|
|
943
|
+
/** The settlement payload as stored; shape is payment-flow specific. */
|
|
944
|
+
payment?: Record<string, unknown>;
|
|
945
|
+
[key: string]: unknown;
|
|
946
|
+
}
|
|
947
|
+
/** A `payment.settled` webhook event. */
|
|
948
|
+
interface PaymentSettledEvent extends PaymentEvent {
|
|
949
|
+
event: "payment.settled";
|
|
950
|
+
}
|
|
951
|
+
/** A `payment.failed` webhook event. */
|
|
952
|
+
interface PaymentFailedEvent extends PaymentEvent {
|
|
953
|
+
event: "payment.failed";
|
|
954
|
+
}
|
|
955
|
+
/** A single interaction.x402.* event suffix. */
|
|
956
|
+
type InteractionX402Suffix = "challenge" | "payment" | "settled" | "rejected" | "declined" | "expired" | "verify_timeout";
|
|
957
|
+
/**
|
|
958
|
+
* Common shape of an `interaction.*` webhook body. The stored payload is just
|
|
959
|
+
* `{ interaction: { ... } }` with no event/type field; the parser overlays a
|
|
960
|
+
* canonical `event` from the header.
|
|
961
|
+
*/
|
|
962
|
+
interface InteractionEvent {
|
|
963
|
+
/** Canonical event name, mirrored from the `X-Webhook-Event` header. */
|
|
964
|
+
event: WebhookEventType;
|
|
965
|
+
/** The interaction state as stored; shape is protocol/step specific. */
|
|
966
|
+
interaction?: Record<string, unknown>;
|
|
967
|
+
id?: string;
|
|
968
|
+
[key: string]: unknown;
|
|
969
|
+
}
|
|
970
|
+
/** An `interaction.x402.*` event (the x402-over-email lifecycle). */
|
|
971
|
+
interface InteractionX402Event extends InteractionEvent {
|
|
972
|
+
event: `interaction.x402.${InteractionX402Suffix}`;
|
|
973
|
+
}
|
|
974
|
+
/**
|
|
975
|
+
* Type guard for the `email.received` event. Confirms the discriminator AND
|
|
976
|
+
* that the body validates against the canonical schema, so a payload that names
|
|
977
|
+
* itself `email.received` but is malformed does not narrow.
|
|
978
|
+
*/
|
|
979
|
+
declare function isEmailReceivedEvent(event: unknown): event is EmailReceivedEvent;
|
|
980
|
+
/** Type guard for any `payment.*` event. */
|
|
981
|
+
declare function isPaymentEvent(event: unknown): event is PaymentEvent;
|
|
982
|
+
/** Type guard for the `payment.settled` event. */
|
|
983
|
+
declare function isPaymentSettledEvent(event: unknown): event is PaymentSettledEvent;
|
|
984
|
+
/** Type guard for the `payment.failed` event. */
|
|
985
|
+
declare function isPaymentFailedEvent(event: unknown): event is PaymentFailedEvent;
|
|
986
|
+
/** Type guard for any `interaction.x402.*` event. */
|
|
987
|
+
declare function isInteractionX402Event(event: unknown): event is InteractionX402Event;
|
|
988
|
+
//#endregion
|
|
900
989
|
//#region src/types.d.ts
|
|
901
990
|
type EmailReceivedEvent = EmailReceivedEvent$1;
|
|
902
991
|
type EventType = EmailReceivedEvent["event"];
|
|
@@ -1013,7 +1102,13 @@ interface UnknownEvent {
|
|
|
1013
1102
|
version?: string;
|
|
1014
1103
|
[key: string]: unknown;
|
|
1015
1104
|
}
|
|
1016
|
-
|
|
1105
|
+
/**
|
|
1106
|
+
* The webhook events the SDK returns as fully typed values. The email.received
|
|
1107
|
+
* body is schema-validated; the payment.* and interaction.x402.* shapes are
|
|
1108
|
+
* keyed off the `X-Webhook-Event` header and surfaced with a canonical `event`
|
|
1109
|
+
* field so consumers can branch on a single discriminator.
|
|
1110
|
+
*/
|
|
1111
|
+
type KnownWebhookEvent = EmailReceivedEvent | PaymentSettledEvent | PaymentFailedEvent | InteractionX402Event;
|
|
1017
1112
|
type WebhookEvent = KnownWebhookEvent | UnknownEvent;
|
|
1018
1113
|
//#endregion
|
|
1019
|
-
export { RawContentInline as A, ParsedData as C, ParsedStatus as D, ParsedError as E, WebhookAttachment as F, WebhookEvent as I, TlsReportAnalysis as M, UnknownEvent as N, RawContent as O, ValidateEmailAuthResult as P, KnownWebhookEvent as S, ParsedDataFailed as T, ForwardResultAttachmentAnalyzed as _, DkimSignature as a, ForwardVerdict as b, DmarcResult as c, EmailAuth as d, EmailReceivedEvent as f, ForwardResult as g, ForwardOriginalSender as h, DkimResult as i, SpfResult as j, RawContentDownloadOnly as k, EmailAddress as l, ForwardAnalysis as m, AuthVerdict as n, DmarcPolicy as o, EventType as p, BounceAnalysis as r, DmarcReportAnalysis as s, AuthConfidence as t, EmailAnalysis as u, ForwardResultAttachmentSkipped as v, ParsedDataComplete as w, ForwardVerification as x, ForwardResultInline as y };
|
|
1114
|
+
export { isPaymentSettledEvent as $, RawContentInline as A, InteractionX402Event as B, ParsedData as C, ParsedStatus as D, ParsedError as E, WebhookAttachment as F, PaymentSettledEvent as G, PAYMENT_EVENT_TYPES as H, WebhookEvent as I, isEmailReceivedEvent as J, WEBHOOK_EVENT_TYPES as K, EMAIL_EVENT_TYPES as L, TlsReportAnalysis as M, UnknownEvent as N, RawContent as O, ValidateEmailAuthResult as P, isPaymentFailedEvent as Q, INTERACTION_EVENT_TYPES as R, KnownWebhookEvent as S, ParsedDataFailed as T, PaymentEvent as U, InteractionX402Suffix as V, PaymentFailedEvent as W, isKnownWebhookEventType as X, isInteractionX402Event as Y, isPaymentEvent as Z, ForwardResultAttachmentAnalyzed as _, DkimSignature as a, ForwardVerdict as b, DmarcResult as c, EmailAuth as d, EmailReceivedEvent as f, ForwardResult as g, ForwardOriginalSender as h, DkimResult as i, SpfResult as j, RawContentDownloadOnly as k, EmailAddress as l, ForwardAnalysis as m, AuthVerdict as n, DmarcPolicy as o, EventType as p, WebhookEventType as q, BounceAnalysis as r, DmarcReportAnalysis as s, AuthConfidence as t, EmailAnalysis as u, ForwardResultAttachmentSkipped as v, ParsedDataComplete as w, ForwardVerification as x, ForwardResultInline as y, InteractionEvent as z };
|
package/dist/webhook/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as RawContentInline, C as ParsedData, D as ParsedStatus, E as ParsedError, F as WebhookAttachment, I as WebhookEvent, M as TlsReportAnalysis, N as UnknownEvent, O as RawContent, P as ValidateEmailAuthResult, S as KnownWebhookEvent, T as ParsedDataFailed, _ as ForwardResultAttachmentAnalyzed, a as DkimSignature, b as ForwardVerdict, c as DmarcResult, d as EmailAuth, f as EmailReceivedEvent, g as ForwardResult, h as ForwardOriginalSender, i as DkimResult, j as SpfResult, k as RawContentDownloadOnly, l as EmailAddress, m as ForwardAnalysis, n as AuthVerdict, o as DmarcPolicy, p as EventType, r as BounceAnalysis, s as DmarcReportAnalysis, t as AuthConfidence, u as EmailAnalysis, v as ForwardResultAttachmentSkipped, w as ParsedDataComplete, x as ForwardVerification, y as ForwardResultInline } from "../types-
|
|
2
|
-
import { _ as buildForwardSubject, a as RawEmailDecodeErrorCode, b as normalizeReceivedEmail, c as WebhookPayloadError, d as WebhookValidationErrorCode, f as WebhookVerificationError, g as ReceivedEmailThread, h as ReceivedEmailAddress, i as RawEmailDecodeError, l as WebhookPayloadErrorCode, m as ReceivedEmail, n as PrimitiveWebhookError, o as VERIFICATION_ERRORS, p as WebhookVerificationErrorCode, r as RAW_EMAIL_ERRORS, s as WebhookErrorCode, t as PAYLOAD_ERRORS, u as WebhookValidationError, v as buildReplySubject, x as parseHeaderAddress, y as formatAddress } from "../errors-
|
|
3
|
-
import { A as
|
|
4
|
-
export { AuthConfidence, AuthVerdict, BounceAnalysis, DecodeRawEmailOptions, DkimResult, DkimSignature, DmarcPolicy, DmarcReportAnalysis, DmarcResult, EmailAddress, EmailAnalysis, EmailAuth, EmailReceivedEvent, EventType, ForwardAnalysis, ForwardOriginalSender, ForwardResult, ForwardResultAttachmentAnalyzed, ForwardResultAttachmentSkipped, ForwardResultInline, ForwardVerdict, ForwardVerification, GenerateDownloadTokenOptions, HandleWebhookOptions, KnownWebhookEvent, LEGACY_CONFIRMED_HEADER, LEGACY_SIGNATURE_HEADER, PAYLOAD_ERRORS, PRIMITIVE_CONFIRMED_HEADER, PRIMITIVE_SIGNATURE_HEADER, ParsedData, ParsedDataComplete, ParsedDataFailed, ParsedError, ParsedStatus, PrimitiveWebhookError, RAW_EMAIL_ERRORS, RawContent, RawContentDownloadOnly, RawContentInline, RawEmailDecodeError, RawEmailDecodeErrorCode, ReceiveRequestOptions, ReceivedEmail, ReceivedEmailAddress, ReceivedEmailThread, STANDARD_WEBHOOK_ID_HEADER, STANDARD_WEBHOOK_SIGNATURE_HEADER, STANDARD_WEBHOOK_TIMESTAMP_HEADER, SignResult, SpfResult, StandardWebhooksSignResult, StandardWebhooksVerifyOptions, TlsReportAnalysis, UnknownEvent, VERIFICATION_ERRORS, ValidateEmailAuthResult, VerifyDownloadTokenOptions, VerifyDownloadTokenResult, VerifyOptions, WEBHOOK_VERSION, WebhookAttachment, WebhookErrorCode, WebhookEvent, WebhookHeaders, WebhookPayloadError, WebhookPayloadErrorCode, WebhookValidationError, WebhookValidationErrorCode, WebhookVerificationError, WebhookVerificationErrorCode, buildForwardSubject, buildReplySubject, confirmedHeaders, decodeRawEmail, emailReceivedEventJsonSchema, formatAddress, generateDownloadToken, getDownloadTimeRemaining, handleWebhook, isDownloadExpired, isEmailReceivedEvent, isRawIncluded, normalizeReceivedEmail, parseHeaderAddress, parseWebhookEvent, receive, safeValidateEmailReceivedEvent, signStandardWebhooksPayload, signWebhookPayload, validateEmailAuth, validateEmailReceivedEvent, verifyDownloadToken, verifyRawEmailDownload, verifyStandardWebhooksSignature, verifyWebhookSignature };
|
|
1
|
+
import { $ as isPaymentSettledEvent, A as RawContentInline, B as InteractionX402Event, C as ParsedData, D as ParsedStatus, E as ParsedError, F as WebhookAttachment, G as PaymentSettledEvent, H as PAYMENT_EVENT_TYPES, I as WebhookEvent, J as isEmailReceivedEvent, K as WEBHOOK_EVENT_TYPES, L as EMAIL_EVENT_TYPES, M as TlsReportAnalysis, N as UnknownEvent, O as RawContent, P as ValidateEmailAuthResult, Q as isPaymentFailedEvent, R as INTERACTION_EVENT_TYPES, S as KnownWebhookEvent, T as ParsedDataFailed, U as PaymentEvent, V as InteractionX402Suffix, W as PaymentFailedEvent, X as isKnownWebhookEventType, Y as isInteractionX402Event, Z as isPaymentEvent, _ as ForwardResultAttachmentAnalyzed, a as DkimSignature, b as ForwardVerdict, c as DmarcResult, d as EmailAuth, f as EmailReceivedEvent, g as ForwardResult, h as ForwardOriginalSender, i as DkimResult, j as SpfResult, k as RawContentDownloadOnly, l as EmailAddress, m as ForwardAnalysis, n as AuthVerdict, o as DmarcPolicy, p as EventType, q as WebhookEventType, r as BounceAnalysis, s as DmarcReportAnalysis, t as AuthConfidence, u as EmailAnalysis, v as ForwardResultAttachmentSkipped, w as ParsedDataComplete, x as ForwardVerification, y as ForwardResultInline, z as InteractionEvent } from "../types-BjnIxPED.js";
|
|
2
|
+
import { _ as buildForwardSubject, a as RawEmailDecodeErrorCode, b as normalizeReceivedEmail, c as WebhookPayloadError, d as WebhookValidationErrorCode, f as WebhookVerificationError, g as ReceivedEmailThread, h as ReceivedEmailAddress, i as RawEmailDecodeError, l as WebhookPayloadErrorCode, m as ReceivedEmail, n as PrimitiveWebhookError, o as VERIFICATION_ERRORS, p as WebhookVerificationErrorCode, r as RAW_EMAIL_ERRORS, s as WebhookErrorCode, t as PAYLOAD_ERRORS, u as WebhookValidationError, v as buildReplySubject, x as parseHeaderAddress, y as formatAddress } from "../errors-bXUNXAlf.js";
|
|
3
|
+
import { A as PRIMITIVE_SIGNATURE_HEADER, B as safeValidateEmailReceivedEvent, C as StandardWebhooksSignResult, D as LEGACY_CONFIRMED_HEADER, E as verifyStandardWebhooksSignature, F as GenerateDownloadTokenOptions, I as VerifyDownloadTokenOptions, L as VerifyDownloadTokenResult, M as VerifyOptions, N as signWebhookPayload, O as LEGACY_SIGNATURE_HEADER, P as verifyWebhookSignature, R as generateDownloadToken, S as STANDARD_WEBHOOK_TIMESTAMP_HEADER, T as signStandardWebhooksPayload, V as validateEmailReceivedEvent, _ as WEBHOOK_VERSION, a as WebhookHeaders, b as STANDARD_WEBHOOK_ID_HEADER, c as getDownloadTimeRemaining, d as handleWebhookEvent, f as isDownloadExpired, g as verifyRawEmailDownload, h as receive, i as WEBHOOK_EVENT_HEADER, j as SignResult, k as PRIMITIVE_CONFIRMED_HEADER, l as getEventHeader, m as parseWebhookEvent, n as HandleWebhookOptions, o as confirmedHeaders, p as isRawIncluded, r as ReceiveRequestOptions, s as decodeRawEmail, t as DecodeRawEmailOptions, u as handleWebhook, v as validateEmailAuth, w as StandardWebhooksVerifyOptions, x as STANDARD_WEBHOOK_SIGNATURE_HEADER, y as emailReceivedEventJsonSchema, z as verifyDownloadToken } from "../index-BDnY9HH-.js";
|
|
4
|
+
export { AuthConfidence, AuthVerdict, BounceAnalysis, DecodeRawEmailOptions, DkimResult, DkimSignature, DmarcPolicy, DmarcReportAnalysis, DmarcResult, EMAIL_EVENT_TYPES, EmailAddress, EmailAnalysis, EmailAuth, EmailReceivedEvent, EventType, ForwardAnalysis, ForwardOriginalSender, ForwardResult, ForwardResultAttachmentAnalyzed, ForwardResultAttachmentSkipped, ForwardResultInline, ForwardVerdict, ForwardVerification, GenerateDownloadTokenOptions, HandleWebhookOptions, INTERACTION_EVENT_TYPES, InteractionEvent, InteractionX402Event, InteractionX402Suffix, KnownWebhookEvent, LEGACY_CONFIRMED_HEADER, LEGACY_SIGNATURE_HEADER, PAYLOAD_ERRORS, PAYMENT_EVENT_TYPES, PRIMITIVE_CONFIRMED_HEADER, PRIMITIVE_SIGNATURE_HEADER, ParsedData, ParsedDataComplete, ParsedDataFailed, ParsedError, ParsedStatus, PaymentEvent, PaymentFailedEvent, PaymentSettledEvent, PrimitiveWebhookError, RAW_EMAIL_ERRORS, RawContent, RawContentDownloadOnly, RawContentInline, RawEmailDecodeError, RawEmailDecodeErrorCode, ReceiveRequestOptions, ReceivedEmail, ReceivedEmailAddress, ReceivedEmailThread, STANDARD_WEBHOOK_ID_HEADER, STANDARD_WEBHOOK_SIGNATURE_HEADER, STANDARD_WEBHOOK_TIMESTAMP_HEADER, SignResult, SpfResult, StandardWebhooksSignResult, StandardWebhooksVerifyOptions, TlsReportAnalysis, UnknownEvent, VERIFICATION_ERRORS, ValidateEmailAuthResult, VerifyDownloadTokenOptions, VerifyDownloadTokenResult, VerifyOptions, WEBHOOK_EVENT_HEADER, WEBHOOK_EVENT_TYPES, WEBHOOK_VERSION, WebhookAttachment, WebhookErrorCode, WebhookEvent, WebhookEventType, WebhookHeaders, WebhookPayloadError, WebhookPayloadErrorCode, WebhookValidationError, WebhookValidationErrorCode, WebhookVerificationError, WebhookVerificationErrorCode, buildForwardSubject, buildReplySubject, confirmedHeaders, decodeRawEmail, emailReceivedEventJsonSchema, formatAddress, generateDownloadToken, getDownloadTimeRemaining, getEventHeader, handleWebhook, handleWebhookEvent, isDownloadExpired, isEmailReceivedEvent, isInteractionX402Event, isKnownWebhookEventType, isPaymentEvent, isPaymentFailedEvent, isPaymentSettledEvent, isRawIncluded, normalizeReceivedEmail, parseHeaderAddress, parseWebhookEvent, receive, safeValidateEmailReceivedEvent, signStandardWebhooksPayload, signWebhookPayload, validateEmailAuth, validateEmailReceivedEvent, verifyDownloadToken, verifyRawEmailDownload, verifyStandardWebhooksSignature, verifyWebhookSignature };
|
package/dist/webhook/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { a as VERIFICATION_ERRORS, c as WebhookVerificationError, d as formatAddress, f as normalizeReceivedEmail, i as RawEmailDecodeError, l as buildForwardSubject, n as PrimitiveWebhookError, o as WebhookPayloadError, p as parseHeaderAddress, r as RAW_EMAIL_ERRORS, s as WebhookValidationError, t as PAYLOAD_ERRORS, u as buildReplySubject } from "../errors-BPJGp9I6.js";
|
|
2
|
-
import { A as
|
|
3
|
-
export { AuthConfidence, AuthVerdict, DkimResult, DmarcPolicy, DmarcResult, EventType, ForwardVerdict, LEGACY_CONFIRMED_HEADER, LEGACY_SIGNATURE_HEADER, PAYLOAD_ERRORS, PRIMITIVE_CONFIRMED_HEADER, PRIMITIVE_SIGNATURE_HEADER, ParsedStatus, PrimitiveWebhookError, RAW_EMAIL_ERRORS, RawEmailDecodeError, STANDARD_WEBHOOK_ID_HEADER, STANDARD_WEBHOOK_SIGNATURE_HEADER, STANDARD_WEBHOOK_TIMESTAMP_HEADER, SpfResult, VERIFICATION_ERRORS, WEBHOOK_VERSION, WebhookPayloadError, WebhookValidationError, WebhookVerificationError, buildForwardSubject, buildReplySubject, confirmedHeaders, decodeRawEmail, emailReceivedEventJsonSchema, formatAddress, generateDownloadToken, getDownloadTimeRemaining, handleWebhook, isDownloadExpired, isEmailReceivedEvent, isRawIncluded, normalizeReceivedEmail, parseHeaderAddress, parseWebhookEvent, receive, safeValidateEmailReceivedEvent, signStandardWebhooksPayload, signWebhookPayload, validateEmailAuth, validateEmailReceivedEvent, verifyDownloadToken, verifyRawEmailDownload, verifyStandardWebhooksSignature, verifyWebhookSignature };
|
|
2
|
+
import { A as LEGACY_CONFIRMED_HEADER, B as isEmailReceivedEvent, C as SpfResult, D as STANDARD_WEBHOOK_TIMESTAMP_HEADER, E as STANDARD_WEBHOOK_SIGNATURE_HEADER, F as verifyWebhookSignature, G as isPaymentSettledEvent, H as isKnownWebhookEventType, I as EMAIL_EVENT_TYPES, J as safeValidateEmailReceivedEvent, K as generateDownloadToken, L as INTERACTION_EVENT_TYPES, M as PRIMITIVE_CONFIRMED_HEADER, N as PRIMITIVE_SIGNATURE_HEADER, O as signStandardWebhooksPayload, P as signWebhookPayload, R as PAYMENT_EVENT_TYPES, S as ParsedStatus, T as STANDARD_WEBHOOK_ID_HEADER, U as isPaymentEvent, V as isInteractionX402Event, W as isPaymentFailedEvent, Y as validateEmailReceivedEvent, _ as DkimResult, a as getEventHeader, b as EventType, c as isDownloadExpired, d as receive, f as verifyRawEmailDownload, g as AuthVerdict, h as AuthConfidence, i as getDownloadTimeRemaining, j as LEGACY_SIGNATURE_HEADER, k as verifyStandardWebhooksSignature, l as isRawIncluded, m as validateEmailAuth, n as confirmedHeaders, o as handleWebhook, p as WEBHOOK_VERSION, q as verifyDownloadToken, r as decodeRawEmail, s as handleWebhookEvent, t as WEBHOOK_EVENT_HEADER, u as parseWebhookEvent, v as DmarcPolicy, w as emailReceivedEventJsonSchema, x as ForwardVerdict, y as DmarcResult, z as WEBHOOK_EVENT_TYPES } from "../webhook-CiIPtegj.js";
|
|
3
|
+
export { AuthConfidence, AuthVerdict, DkimResult, DmarcPolicy, DmarcResult, EMAIL_EVENT_TYPES, EventType, ForwardVerdict, INTERACTION_EVENT_TYPES, LEGACY_CONFIRMED_HEADER, LEGACY_SIGNATURE_HEADER, PAYLOAD_ERRORS, PAYMENT_EVENT_TYPES, PRIMITIVE_CONFIRMED_HEADER, PRIMITIVE_SIGNATURE_HEADER, ParsedStatus, PrimitiveWebhookError, RAW_EMAIL_ERRORS, RawEmailDecodeError, STANDARD_WEBHOOK_ID_HEADER, STANDARD_WEBHOOK_SIGNATURE_HEADER, STANDARD_WEBHOOK_TIMESTAMP_HEADER, SpfResult, VERIFICATION_ERRORS, WEBHOOK_EVENT_HEADER, WEBHOOK_EVENT_TYPES, WEBHOOK_VERSION, WebhookPayloadError, WebhookValidationError, WebhookVerificationError, buildForwardSubject, buildReplySubject, confirmedHeaders, decodeRawEmail, emailReceivedEventJsonSchema, formatAddress, generateDownloadToken, getDownloadTimeRemaining, getEventHeader, handleWebhook, handleWebhookEvent, isDownloadExpired, isEmailReceivedEvent, isInteractionX402Event, isKnownWebhookEventType, isPaymentEvent, isPaymentFailedEvent, isPaymentSettledEvent, isRawIncluded, normalizeReceivedEmail, parseHeaderAddress, parseWebhookEvent, receive, safeValidateEmailReceivedEvent, signStandardWebhooksPayload, signWebhookPayload, validateEmailAuth, validateEmailReceivedEvent, verifyDownloadToken, verifyRawEmailDownload, verifyStandardWebhooksSignature, verifyWebhookSignature };
|