# SwiftShiftApi.UserApi

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**forgotPassword**](UserApi.md#forgotPassword) | **POST** /open/forgot_password | init forgot password flow
[**getSiteUsers**](UserApi.md#getSiteUsers) | **GET** /organizations/{organization_id}/sites/{site_id}/users | 
[**getUserAccount**](UserApi.md#getUserAccount) | **GET** /users/{user_id}/account | 
[**resetPassword**](UserApi.md#resetPassword) | **POST** /open/reset_password | reset password
[**signUp**](UserApi.md#signUp) | **POST** /open/sign_up | initialize sign up flow
[**signUpComplete**](UserApi.md#signUpComplete) | **POST** /open/sign_up/complete | complete sign up flow
[**verifyCode**](UserApi.md#verifyCode) | **POST** /open/verify_code | verify code


<a name="forgotPassword"></a>
# **forgotPassword**
> ForgotPasswordResponse forgotPassword(opts)

init forgot password flow

### Example
```javascript
import SwiftShiftApi from 'swift_shift_api';

let apiInstance = new SwiftShiftApi.UserApi();
let opts = {
  'forgotPasswordPayload': new SwiftShiftApi.ForgotPasswordPayload() // ForgotPasswordPayload | 
};
apiInstance.forgotPassword(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **forgotPasswordPayload** | [**ForgotPasswordPayload**](ForgotPasswordPayload.md)|  | [optional] 

### Return type

[**ForgotPasswordResponse**](ForgotPasswordResponse.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="getSiteUsers"></a>
# **getSiteUsers**
> InlineResponse2002 getSiteUsers(siteId, organizationId, opts)



get site users

### Example
```javascript
import SwiftShiftApi from 'swift_shift_api';

let apiInstance = new SwiftShiftApi.UserApi();
let siteId = "siteId_example"; // String | id of the site
let organizationId = "organizationId_example"; // String | id of the organization
let opts = {
  'q': "q_example" // String | resource query language
};
apiInstance.getSiteUsers(siteId, organizationId, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **siteId** | **String**| id of the site | 
 **organizationId** | **String**| id of the organization | 
 **q** | **String**| resource query language | [optional] 

### Return type

[**InlineResponse2002**](InlineResponse2002.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="getUserAccount"></a>
# **getUserAccount**
> UserAccount getUserAccount(userId)



Get user account.

### Example
```javascript
import SwiftShiftApi from 'swift_shift_api';

let apiInstance = new SwiftShiftApi.UserApi();
let userId = "userId_example"; // String | The id of the user.
apiInstance.getUserAccount(userId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **userId** | **String**| The id of the user. | 

### Return type

[**UserAccount**](UserAccount.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="resetPassword"></a>
# **resetPassword**
> resetPassword(opts)

reset password

### Example
```javascript
import SwiftShiftApi from 'swift_shift_api';

let apiInstance = new SwiftShiftApi.UserApi();
let opts = {
  'resetPasswordPayload': new SwiftShiftApi.ResetPasswordPayload() // ResetPasswordPayload | 
};
apiInstance.resetPassword(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **resetPasswordPayload** | [**ResetPasswordPayload**](ResetPasswordPayload.md)|  | [optional] 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

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

<a name="signUp"></a>
# **signUp**
> ForgotPasswordResponse signUp(opts)

initialize sign up flow

### Example
```javascript
import SwiftShiftApi from 'swift_shift_api';

let apiInstance = new SwiftShiftApi.UserApi();
let opts = {
  'signUpPayload': new SwiftShiftApi.SignUpPayload() // SignUpPayload | 
};
apiInstance.signUp(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **signUpPayload** | [**SignUpPayload**](SignUpPayload.md)|  | [optional] 

### Return type

[**ForgotPasswordResponse**](ForgotPasswordResponse.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="signUpComplete"></a>
# **signUpComplete**
> signUpComplete(opts)

complete sign up flow

### Example
```javascript
import SwiftShiftApi from 'swift_shift_api';

let apiInstance = new SwiftShiftApi.UserApi();
let opts = {
  'resetPasswordPayload': new SwiftShiftApi.ResetPasswordPayload() // ResetPasswordPayload | 
};
apiInstance.signUpComplete(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **resetPasswordPayload** | [**ResetPasswordPayload**](ResetPasswordPayload.md)|  | [optional] 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

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

<a name="verifyCode"></a>
# **verifyCode**
> verifyCode(opts)

verify code

### Example
```javascript
import SwiftShiftApi from 'swift_shift_api';

let apiInstance = new SwiftShiftApi.UserApi();
let opts = {
  'verifyCodePayload': new SwiftShiftApi.VerifyCodePayload() // VerifyCodePayload | 
};
apiInstance.verifyCode(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **verifyCodePayload** | [**VerifyCodePayload**](VerifyCodePayload.md)|  | [optional] 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

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

