# SmartFilingApi

All URIs are relative to *http://localhost:8081*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**file**](#file) | **POST** /api/v1/ai/auto-file | File existing documents on demand|
|[**fileInbox**](#fileinbox) | **POST** /api/v1/ai/auto-file/inbox | File everything lying loose in the caller\&#39;s Inbox|
|[**job**](#job) | **GET** /api/v1/ai/auto-file/{jobId} | Progress and outcome of a filing job|
|[**jobs**](#jobs) | **POST** /api/v1/ai/auto-file/jobs | Progress and outcome of several filing jobs|
|[**lastFiling**](#lastfiling) | **GET** /api/v1/ai/auto-file/document/{documentId} | The latest filing record of a document (the \&quot;Filed by OpenFilz\&quot; chip)|
|[**undo**](#undo) | **POST** /api/v1/ai/auto-file/{jobId}/undo | Move every document the job filed back where it came from|
|[**undoFiling**](#undofiling) | **POST** /api/v1/ai/auto-file/filing/{planId}/undo | Move one filed document back (the chip\&#39;s \&quot;Move back\&quot;)|

# **file**
> AutoFileJobView file(autoFileRequest)

Runs smart filing for the given documents (e.g. the contents of an Inbox) and returns the job at once.

### Example

```typescript
import {
    SmartFilingApi,
    Configuration,
    AutoFileRequest
} from '@openfilz-sdk/typescript';

const configuration = new Configuration();
const apiInstance = new SmartFilingApi(configuration);

let autoFileRequest: AutoFileRequest; //

const { status, data } = await apiInstance.file(
    autoFileRequest
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **autoFileRequest** | **AutoFileRequest**|  | |


### Return type

**AutoFileJobView**

### Authorization

[keycloak_auth](../README.md#keycloak_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **fileInbox**
> AutoFileJobView fileInbox()

Schedules one filing job for every active file directly in the caller\'s Inbox folder (the per-user Inbox of the smart-filing preferences) and returns the job at once, like the on-demand endpoint. 404 when the caller has no Inbox, 400 when the deployment does not offer it.

### Example

```typescript
import {
    SmartFilingApi,
    Configuration,
    AutoFileInboxRequest
} from '@openfilz-sdk/typescript';

const configuration = new Configuration();
const apiInstance = new SmartFilingApi(configuration);

let autoFileInboxRequest: AutoFileInboxRequest; // (optional)

const { status, data } = await apiInstance.fileInbox(
    autoFileInboxRequest
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **autoFileInboxRequest** | **AutoFileInboxRequest**|  | |


### Return type

**AutoFileJobView**

### Authorization

[keycloak_auth](../README.md#keycloak_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **job**
> AutoFileJobView job()


### Example

```typescript
import {
    SmartFilingApi,
    Configuration
} from '@openfilz-sdk/typescript';

const configuration = new Configuration();
const apiInstance = new SmartFilingApi(configuration);

let jobId: string; // (default to undefined)

const { status, data } = await apiInstance.job(
    jobId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **jobId** | [**string**] |  | defaults to undefined|


### Return type

**AutoFileJobView**

### Authorization

[keycloak_auth](../README.md#keycloak_auth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **jobs**
> Array<AutoFileJobView> jobs(autoFileJobsRequest)

Follows a whole upload batch in one call: the browser sends one upload request per file, so a batch leaves as many jobs to poll. Jobs that do not exist, or belong to somebody else, are left out of the answer rather than failing it. A POST because a batch of ids does not fit in a query string.

### Example

```typescript
import {
    SmartFilingApi,
    Configuration,
    AutoFileJobsRequest
} from '@openfilz-sdk/typescript';

const configuration = new Configuration();
const apiInstance = new SmartFilingApi(configuration);

let autoFileJobsRequest: AutoFileJobsRequest; //

const { status, data } = await apiInstance.jobs(
    autoFileJobsRequest
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **autoFileJobsRequest** | **AutoFileJobsRequest**|  | |


### Return type

**Array<AutoFileJobView>**

### Authorization

[keycloak_auth](../README.md#keycloak_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **lastFiling**
> FilingOutcome lastFiling()


### Example

```typescript
import {
    SmartFilingApi,
    Configuration
} from '@openfilz-sdk/typescript';

const configuration = new Configuration();
const apiInstance = new SmartFilingApi(configuration);

let documentId: string; // (default to undefined)

const { status, data } = await apiInstance.lastFiling(
    documentId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **documentId** | [**string**] |  | defaults to undefined|


### Return type

**FilingOutcome**

### Authorization

[keycloak_auth](../README.md#keycloak_auth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | The document\&#39;s latest filing record |  -  |
|**204** | The document was never filed (or is not visible to the caller) |  -  |
|**404** | Smart filing is off on this deployment |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **undo**
> AutoFileJobView undo()


### Example

```typescript
import {
    SmartFilingApi,
    Configuration
} from '@openfilz-sdk/typescript';

const configuration = new Configuration();
const apiInstance = new SmartFilingApi(configuration);

let jobId: string; // (default to undefined)

const { status, data } = await apiInstance.undo(
    jobId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **jobId** | [**string**] |  | defaults to undefined|


### Return type

**AutoFileJobView**

### Authorization

[keycloak_auth](../README.md#keycloak_auth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **undoFiling**
> FilingOutcome undoFiling()


### Example

```typescript
import {
    SmartFilingApi,
    Configuration
} from '@openfilz-sdk/typescript';

const configuration = new Configuration();
const apiInstance = new SmartFilingApi(configuration);

let planId: string; // (default to undefined)

const { status, data } = await apiInstance.undoFiling(
    planId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **planId** | [**string**] |  | defaults to undefined|


### Return type

**FilingOutcome**

### Authorization

[keycloak_auth](../README.md#keycloak_auth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

