c
AP2Error

Base class for all AP2-related errors

I
AP2PaymentRequest

APPLICATION-SPECIFIC DATA: A structure representing a complete AP2 payment request.

I
AP2PaymentResponse

APPLICATION-SPECIFIC DATA: A structure representing an AP2 payment response.

c
BaseMandateSerializationStrategy

Abstract base class for serialization strategies

c
BaseValidationRule

Abstract base class for validation rules

v
CART_MANDATE_DATA_KEY

Data key for Cart Mandate objects

I
CartContents

The detailed contents of a cart, signed by the merchant to create a CartMandate.

I
CartMandate

A cart whose contents have been digitally signed by the merchant.

c
CartMandateClass

Class for CartMandate with specific functionality Uses JWT for merchant_authorization as per AP2 specification

c
CartMandateSerializationStrategy

Serialization strategy for CartMandate

f
combineValidationResults

Combine multiple validation results into one

f
createCartMandate

Creates a new CartMandate from cart contents with validation and optional JWT signing

I
CreateCartMandateParams

Input parameters for creating a CartMandate

f
createFutureISO8601

Creates an ISO 8601 date string for a future date

f
createIntentMandate

Creates a new IntentMandate with validation

f
createMandateClass
No documentation available
f
createMandateFromData

Factory function to create mandate classes from existing mandate data

f
createValidationResult

Create a ValidationResult object

c
CryptographicError

Error thrown when cryptographic operations fail

c
CurrencyValidationRule

Rule for validating currency codes

c
DateParseError

Error thrown when ISO 8601 date parsing fails

c
DateValidationRule

Rule for validating date fields

v
defaultChecksumValidator
No documentation available
v
defaultJTIValidator
No documentation available
v
defaultMandateSerializationRegistry

Default singleton instance

v
defaultMandateTypeDetector

Default singleton instance

v
defaultMandateValidationRegistry

Default singleton instance

I
DeserializationFieldValidator

Interface for field validators used during deserialization

I
Deserializer

Generic deserializer interface

I
ExtendedPaymentDetailsInit

EXTENSION: Payment details that use our extended item type. This correctly extends the global PaymentDetailsInit type.

I
ExtendedPaymentItem

EXTENSION: An item for purchase with an added refund_period. This correctly extends the global PaymentItem type.

I
FieldValidator

Interface for field validators used during validation

f
getMandateType

Get the mandate type using the detector registry

I
IJTIStorage

Interface for JTI storage backend Allows for different storage implementations (memory, Redis, etc.)

I
IJTIValidator

Interface for JTI validation operations

I
IJWTKeyManager

Interface for JWT key management Follows Single Responsibility Principle (SRP)

I
IJWTService

Combined interface for full JWT operations Follows Interface Segregation Principle (ISP) by composing smaller interfaces

I
IJWTSigner

Interface for JWT signing operations Follows Single Responsibility Principle (SRP)

I
IJWTVerifier

Interface for JWT verification operations Follows Single Responsibility Principle (SRP)

v
INTENT_MANDATE_DATA_KEY

Data key for Intent Mandate objects

c
IntentMandateClass

Class for IntentMandate with specific functionality

c
IntentMandateSerializationStrategy

Serialization strategy for IntentMandate

f
isCartMandate

Type guard to check if a mandate is a CartMandate

f
isExpired

Checks if a mandate has expired based on its expiry date

f
isIntentMandate

Type guard to check if a mandate is an IntentMandate

f
isValidISO8601

Validates if a string is a valid ISO 8601 date

c
JOSEJWTKeyManager

JOSE-based JWT Key Manager Implementation Follows Single Responsibility Principle (SRP)

c
JOSEJWTService

Complete JOSE-based JWT Service Implementation Follows Dependency Inversion Principle (DIP) by depending on abstractions

c
JOSEJWTSigner

JOSE-based JWT Signer Implementation Follows Single Responsibility Principle (SRP)

c
JOSEJWTVerifier

JOSE-based JWT Verifier Implementation with Comprehensive Validation Follows Single Responsibility Principle (SRP) with enhanced security

I
c
JTIValidator

JTI Validator implementation Prevents JWT replay attacks by tracking used JWT IDs

T
JWTAlgorithm

Supported JWT algorithms for AP2 protocol

I
v
jwtService
No documentation available
c
JWTServiceError

Base error class for all JWT service-related errors. Allows consumers to catch any error originating from this service.

c
JWTSigningError

Thrown when the JWT signing process fails.

c
JWTVerificationError

Thrown for catastrophic failures during the verification process. Note: Standard validation failures (e.g., bad signature) are returned in the result object, not thrown.

c
KeyManagementError

Thrown when there is an issue with cryptographic key generation, validation, or formatting.

T
Mandate

Union type representing any type of mandate in the AP2 protocol.

T
MandateDataKey

Union type of all mandate data keys

c
MandateExpiredError

Error thrown when mandate has expired

I
MandateSerializationStrategy

Interface for mandate serialization strategies

T
MandateStatus

Possible states for a mandate

E
MandateType

Enumeration of supported mandate types

I
MandateTypeDetectionResult

Result of mandate type detection

I
MandateTypeDetector

Interface for mandate type detection strategies

c
MandateValidationError

Error thrown when mandate validation fails

I
c
MemoryJTIStorage

In-memory JTI storage implementation Suitable for single-instance deployments or testing

I
MerchantAuthorizationPayload

JWT Payload for merchant authorization as per AP2 specification

c
NonEmptyArrayRule

Rule for validating non-empty arrays

c
NumericRangeRule

Rule for validating numeric ranges

f
parseISO8601

Parses an ISO 8601 date string and returns a Date object

v
PAYMENT_MANDATE_DATA_KEY

Data key for Payment Mandate objects

I
PaymentCurrencyAmount

Represents a monetary amount with currency

I
PaymentDetailsInit

Contains the total and line items for a payment request

I
PaymentItem

Represents a line item in a payment request

I
PaymentMandate

Contains the user's instructions & authorization for payment

c
PaymentMandateContentsClass

PaymentMandateContents Class Follows Single Responsibility Principle (SRP) for managing payment mandate contents

T
PaymentMandateStatus

Possible states for a payment mandate

I
PaymentMethodData

Specifies payment method and associated data

I
PaymentOptions

Configuration options for payment request information collection

c
PaymentRequestValidationError

Error thrown when payment request validation fails

I
PaymentShippingOption

Represents a shipping option with cost and selection state

c
PositiveAmountRule

Rule for validating positive amounts

c
RequiredBooleanRule

Rule for validating boolean fields exist

c
RequiredFieldRule

Rule for validating required fields exist

c
RequiredStringRule

Rule for validating required string fields

c
SerializationError

Error thrown when serialization/deserialization fails

I
Serializer

Generic serializer interface

I
SerializerDeserializer

Combined serializer/deserializer interface

c
SignatureVerificationError

Error thrown when signature verification fails

v
TIME_CONSTANTS

Convenience constants for common time periods in seconds

I
ValidationResult

Result of a validation operation

I
ValidationRule

Interface for validation rules

I
Validator

Generic validator interface