@ory/kratos-client
Version:
OpenAPI client for @ory/kratos-client
125 lines (83 loc) • 4.47 kB
Markdown
All URIs are relative to *http://localhost*
|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**getCourierMessage**](
|[**listCourierMessages**](
> Message getCourierMessage()
Gets a specific messages by the given ID.
### Example
```typescript
import {
CourierApi,
Configuration
} from '@ory/kratos-client';
const configuration = new Configuration();
const apiInstance = new CourierApi(configuration);
let id: string; //MessageID is the ID of the message. (default to undefined)
const { status, data } = await apiInstance.getCourierMessage(
id
);
```
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | MessageID is the ID of the message. | defaults to undefined|
**Message**
[](../README.md
- **Content-Type**: Not defined
- **Accept**: application/json
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | message | - |
|**400** | errorGeneric | - |
|**0** | errorGeneric | - |
[[Back to top]](
> Array<Message> listCourierMessages()
Lists all messages by given status and recipient.
### Example
```typescript
import {
CourierApi,
Configuration
} from '@ory/kratos-client';
const configuration = new Configuration();
const apiInstance = new CourierApi(configuration);
let pageSize: number; //Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) (default to 250)
let pageToken: string; //Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) (default to undefined)
let status: CourierMessageStatus; //Status filters out messages based on status. If no value is provided, it doesn\'t take effect on filter. (optional) (default to undefined)
let recipient: string; //Recipient filters out messages based on recipient. If no value is provided, it doesn\'t take effect on filter. (optional) (default to undefined)
const { status, data } = await apiInstance.listCourierMessages(
pageSize,
pageToken,
status,
recipient
);
```
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **pageSize** | [**number**] | Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | (optional) defaults to 250|
| **pageToken** | [**string**] | Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). | (optional) defaults to undefined|
| **status** | **CourierMessageStatus** | Status filters out messages based on status. If no value is provided, it doesn\&
| **recipient** | [**string**] | Recipient filters out messages based on recipient. If no value is provided, it doesn\&
**Array<Message>**
[](../README.md
- **Content-Type**: Not defined
- **Accept**: application/json
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Paginated Courier Message List Response | - |
|**400** | errorGeneric | - |
|**0** | errorGeneric | - |
[[Back to top]](