Interface: PatreonMockOptions
Defined in: schemas/v2/mock/mock.ts:60
Options for mocking the Patreon API.
Properties
| Property | Type | Description |
|---|---|---|
cache? | CacheStoreOptions | Options for the cache. Use a cache to persist your mocking data and act as a mock database. Use cacheBinding to set the binding for persistent storage of the cache. |
cacheBinding? | CacheStoreBinding<false, CacheItem<"address" | "benefit" | "campaign" | "client" | "deliverable" | "goal" | "live-access-rule" | "live" | "media" | "member" | "post" | "pledge-event" | "tier" | "user" | "webhook">> | The binding for the cache with options from cache. |
data? | PatreonMockDataOptions | PatreonMockData | Options to return random data. If no cache item is found, the mock service can return a randomly generated payload as response. |
responseOptions? | PatreonMockHandlerOptions & { unknownCacheResponse?: string; } | Options for replying from the mock service. |
validation? | { headers?: string[] | Record<string, string>; query?: boolean; } | Options to validate your requests to the mocking service. |
validation.headers? | string[] | Record<string, string> | The required headers that must be present. If given as an object, the values must also match. Default [] |
validation.query? | boolean | Whether to validate the query to check for correct relationships and attributes requested. Default false |
webhooks? | PatreonMockWebhooksOptions | Mock the Patreon webhooks implementation. |