Skip to content

Commit

Permalink
feat: generate new source file with updated swagger
Browse files Browse the repository at this point in the history
BREAKING CHANGE: `StSeenAt` type renamed to `SeenAt`
  • Loading branch information
JuroUhlar committed Jan 17, 2023
1 parent a328ad6 commit 1d94e69
Show file tree
Hide file tree
Showing 43 changed files with 290 additions and 78 deletions.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</p>

# Fingerprint Pro Server Go SDK
Fingerprint Pro Server API provides a way for validating visitorsdata issued by Fingerprint Pro.
Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios.

This Go package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

Expand Down Expand Up @@ -111,17 +111,20 @@ All URIs are relative to *https://api.fpjs.io*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*FingerprintApi* | [**GetEvent**](docs/FingerprintApi.md#getevent) | **Get** /events/{request_id} | Get event by request ID
*FingerprintApi* | [**GetVisits**](docs/FingerprintApi.md#getvisits) | **Get** /visitors/{visitor_id} |
*FingerprintApi* | [**GetEvent**](docs/FingerprintApi.md#getevent) | **Get** /events/{request_id} | Get event by requestId
*FingerprintApi* | [**GetVisits**](docs/FingerprintApi.md#getvisits) | **Get** /visitors/{visitor_id} | Get visits by visitorId

## Documentation For Models

- [BotdDetectionResult](docs/BotdDetectionResult.md)
- [BotdError](docs/BotdError.md)
- [BotdResult](docs/BotdResult.md)
- [BrowserDetails](docs/BrowserDetails.md)
- [Confidence](docs/Confidence.md)
- [ErrorResponse](docs/ErrorResponse.md)
- [ErrorResponseError](docs/ErrorResponseError.md)
- [ErrorEvent403Response](docs/ErrorEvent403Response.md)
- [ErrorEvent403ResponseError](docs/ErrorEvent403ResponseError.md)
- [ErrorEvent404Response](docs/ErrorEvent404Response.md)
- [ErrorEvent404ResponseError](docs/ErrorEvent404ResponseError.md)
- [EventResponse](docs/EventResponse.md)
- [IpLocation](docs/IpLocation.md)
- [IpLocationCity](docs/IpLocationCity.md)
Expand All @@ -133,7 +136,7 @@ Class | Method | HTTP request | Description
- [ProductsResponseIdentificationData](docs/ProductsResponseIdentificationData.md)
- [Response](docs/Response.md)
- [ResponseVisits](docs/ResponseVisits.md)
- [StSeenAt](docs/StSeenAt.md)
- [SeenAt](docs/SeenAt.md)
- [Subdivision](docs/Subdivision.md)
- [Visit](docs/Visit.md)
- [WebhookVisit](docs/WebhookVisit.md)
Expand Down
10 changes: 10 additions & 0 deletions docs/BotdError.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# BotdError

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Code** | **string** | Error code: * &#x60;TooManyRequests&#x60; - the limit on secret API key requests per second has been exceeded * &#x60;Failed&#x60; - internal server error | [default to null]
**Message** | **string** | | [default to null]

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

4 changes: 2 additions & 2 deletions docs/ErrorResponse.md → docs/ErrorEvent403Response.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# ErrorResponse
# ErrorEvent403Response

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Error_** | [***ErrorResponseError**](ErrorResponseError.md) | | [optional] [default to null]
**Error_** | [***ErrorEvent403ResponseError**](ErrorEvent403ResponseError.md) | | [optional] [default to null]

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

10 changes: 10 additions & 0 deletions docs/ErrorEvent403ResponseError.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# ErrorEvent403ResponseError

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Code** | **string** | Error code: * &#x60;TokenRequired&#x60; - &#x60;Auth-API-Key&#x60; header is missing or empty * &#x60;TokenNotFound&#x60; - subscription not found for specified secret key * &#x60;SubscriptionNotActive&#x60; - subscription is not active * &#x60;WrongRegion&#x60; - server and subscription region differ | [default to null]
**Message** | **string** | | [default to null]

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

5 changes: 2 additions & 3 deletions docs/ErrorResponseError.md → docs/ErrorEvent404Response.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# ErrorResponseError
# ErrorEvent404Response

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Code** | **string** | | [optional] [default to null]
**Message** | **string** | | [optional] [default to null]
**Error_** | [***ErrorEvent404ResponseError**](ErrorEvent404ResponseError.md) | | [optional] [default to null]

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

10 changes: 10 additions & 0 deletions docs/ErrorEvent404ResponseError.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# ErrorEvent404ResponseError

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Code** | **string** | Error code: * &#x60;RequestNotFound&#x60; - request not found for specified id | [default to null]
**Message** | **string** | | [default to null]

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

18 changes: 9 additions & 9 deletions docs/FingerprintApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ All URIs are relative to *https://api.fpjs.io*

Method | HTTP request | Description
------------- | ------------- | -------------
[**GetEvent**](FingerprintApi.md#GetEvent) | **Get** /events/{request_id} | Get event by request ID
[**GetVisits**](FingerprintApi.md#GetVisits) | **Get** /visitors/{visitor_id} |
[**GetEvent**](FingerprintApi.md#GetEvent) | **Get** /events/{request_id} | Get event by requestId
[**GetVisits**](FingerprintApi.md#GetVisits) | **Get** /visitors/{visitor_id} | Get visits by visitorId

# **GetEvent**
> EventResponse GetEvent(ctx, requestId)
Get event by request ID
Get event by requestId

This endpoint allows you to get events with all the information from each activated product - BOTD and Fingerprinting. Use the requestId as a URL path :request_id parameter. This API method is scoped to a request, i.e. all returned information is by requestId.
This endpoint allows you to get events with all the information from each activated product (Fingerprint Pro or Bot Detection). Use the requestId as a URL path :request_id parameter. This API method is scoped to a request, i.e. all returned information is by requestId.

### Required Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**requestId** | **string**| Request ID |
**requestId** | **string**| requestId is the unique identifier of each request |

### Return type

Expand All @@ -37,7 +37,7 @@ Name | Type | Description | Notes

# **GetVisits**
> Response GetVisits(ctx, visitorId, optional)
Get visits by visitorId

This endpoint allows you to get a history of visits with all available information. Use the visitorId as a URL path parameter. This API method is scoped to a visitor, i.e. all returned information is by visitorId.

Expand All @@ -54,8 +54,8 @@ Optional parameters are passed through a pointer to a FingerprintApiGetVisitsOpt

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**requestId** | **optional.String**| Filter events by requestId |
**linkedId** | **optional.String**| Filter events by custom identifier |
**requestId** | **optional.String**| Filter visits by requestId |
**linkedId** | **optional.String**| Filter visits by custom identifier |
**limit** | **optional.Int32**| Limit scanned results |
**before** | **optional.Int32**| Used to paginate results |

Expand All @@ -70,7 +70,7 @@ Name | Type | Description | Notes
### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json
- **Accept**: application/json, text/html

[[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)

1 change: 1 addition & 0 deletions docs/ProductsResponseBotd.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [***BotdResult**](BotdResult.md) | | [optional] [default to null]
**Error_** | [***BotdError**](BotdError.md) | | [optional] [default to null]

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

4 changes: 2 additions & 2 deletions docs/ProductsResponseIdentificationData.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ Name | Type | Description | Notes
**LinkedId** | **string** | A customer-provided id that was sent with identification request. | [optional] [default to null]
**Confidence** | [***Confidence**](Confidence.md) | | [default to null]
**VisitorFound** | **bool** | Attribute represents if a visitor had been identified before. | [default to null]
**FirstSeenAt** | [***StSeenAt**](StSeenAt.md) | | [default to null]
**LastSeenAt** | [***StSeenAt**](StSeenAt.md) | | [default to null]
**FirstSeenAt** | [***SeenAt**](SeenAt.md) | | [default to null]
**LastSeenAt** | [***SeenAt**](SeenAt.md) | | [default to null]
**VisitorId** | **string** | | [default to null]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
4 changes: 2 additions & 2 deletions docs/ResponseVisits.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ Name | Type | Description | Notes
**LinkedId** | **string** | A customer-provided id that was sent with identification request. | [optional] [default to null]
**Confidence** | [***Confidence**](Confidence.md) | | [default to null]
**VisitorFound** | **bool** | Attribute represents if a visitor had been identified before. | [default to null]
**FirstSeenAt** | [***StSeenAt**](StSeenAt.md) | | [default to null]
**LastSeenAt** | [***StSeenAt**](StSeenAt.md) | | [default to null]
**FirstSeenAt** | [***SeenAt**](SeenAt.md) | | [default to null]
**LastSeenAt** | [***SeenAt**](SeenAt.md) | | [default to null]

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

2 changes: 1 addition & 1 deletion docs/StSeenAt.md → docs/SeenAt.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# StSeenAt
# SeenAt

## Properties
Name | Type | Description | Notes
Expand Down
4 changes: 2 additions & 2 deletions docs/Visit.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ Name | Type | Description | Notes
**LinkedId** | **string** | A customer-provided id that was sent with identification request. | [optional] [default to null]
**Confidence** | [***Confidence**](Confidence.md) | | [default to null]
**VisitorFound** | **bool** | Attribute represents if a visitor had been identified before. | [default to null]
**FirstSeenAt** | [***StSeenAt**](StSeenAt.md) | | [default to null]
**LastSeenAt** | [***StSeenAt**](StSeenAt.md) | | [default to null]
**FirstSeenAt** | [***SeenAt**](SeenAt.md) | | [default to null]
**LastSeenAt** | [***SeenAt**](SeenAt.md) | | [default to null]

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

4 changes: 2 additions & 2 deletions docs/WebhookVisit.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Name | Type | Description | Notes
**LinkedId** | **string** | A customer-provided id that was sent with identification request. | [optional] [default to null]
**Confidence** | [***Confidence**](Confidence.md) | | [default to null]
**VisitorFound** | **bool** | Attribute represents if a visitor had been identified before. | [default to null]
**FirstSeenAt** | [***StSeenAt**](StSeenAt.md) | | [default to null]
**LastSeenAt** | [***StSeenAt**](StSeenAt.md) | | [default to null]
**FirstSeenAt** | [***SeenAt**](SeenAt.md) | | [default to null]
**LastSeenAt** | [***SeenAt**](SeenAt.md) | | [default to null]

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

32 changes: 21 additions & 11 deletions sdk/api_fingerprint.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Fingerprint Pro Server API
*
* Fingerprint Pro Server API provides a way for validating visitorsdata issued by Fingerprint Pro.
* Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios.
*
* API version: 3
* Contact: [email protected]
Expand All @@ -22,10 +22,10 @@ import (
type FingerprintApiService service

/*
FingerprintApiService Get event by request ID
This endpoint allows you to get events with all the information from each activated product - BOTD and Fingerprinting. Use the requestId as a URL path :request_id parameter. This API method is scoped to a request, i.e. all returned information is by requestId.
FingerprintApiService Get event by requestId
This endpoint allows you to get events with all the information from each activated product (Fingerprint Pro or Bot Detection). Use the requestId as a URL path :request_id parameter. This API method is scoped to a request, i.e. all returned information is by requestId.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param requestId Request ID
- @param requestId requestId is the unique identifier of each request
@return EventResponse
*/
Expand Down Expand Up @@ -113,8 +113,8 @@ func (a *FingerprintApiService) GetEvent(ctx context.Context, requestId string)
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
}
if localVarHttpResponse.StatusCode == 400 {
var v ErrorResponse
if localVarHttpResponse.StatusCode == 403 {
var v ErrorEvent403Response
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
Expand All @@ -123,8 +123,8 @@ func (a *FingerprintApiService) GetEvent(ctx context.Context, requestId string)
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
}
if localVarHttpResponse.StatusCode == 403 {
var v ErrorResponse
if localVarHttpResponse.StatusCode == 404 {
var v ErrorEvent404Response
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
Expand All @@ -150,13 +150,13 @@ func (a *FingerprintApiService) GetEvent(ctx context.Context, requestId string)
}

/*
FingerprintApiService
FingerprintApiService Get visits by visitorId
This endpoint allows you to get a history of visits with all available information. Use the visitorId as a URL path parameter. This API method is scoped to a visitor, i.e. all returned information is by visitorId.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param visitorId
* @param optional nil or *FingerprintApiGetVisitsOpts - Optional Parameters:
* @param "RequestId" (optional.String) - Filter events by requestId
* @param "LinkedId" (optional.String) - Filter events by custom identifier
* @param "RequestId" (optional.String) - Filter visits by requestId
* @param "LinkedId" (optional.String) - Filter visits by custom identifier
* @param "Limit" (optional.Int32) - Limit scanned results
* @param "Before" (optional.Int32) - Used to paginate results
@return Response
Expand Down Expand Up @@ -268,6 +268,16 @@ func (a *FingerprintApiService) GetVisits(ctx context.Context, visitorId string,
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
}
if localVarHttpResponse.StatusCode == 403 {
var v string
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
}
if localVarHttpResponse.StatusCode == 429 {
var v ManyRequestsResponse
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
Expand Down
2 changes: 1 addition & 1 deletion sdk/client.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Fingerprint Pro Server API
*
* Fingerprint Pro Server API provides a way for validating visitorsdata issued by Fingerprint Pro.
* Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios.
*
* API version: 3
* Contact: [email protected]
Expand Down
2 changes: 1 addition & 1 deletion sdk/configuration.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Fingerprint Pro Server API
*
* Fingerprint Pro Server API provides a way for validating visitorsdata issued by Fingerprint Pro.
* Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios.
*
* API version: 3
* Contact: [email protected]
Expand Down
2 changes: 1 addition & 1 deletion sdk/model_botd_detection_result.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Fingerprint Pro Server API
*
* Fingerprint Pro Server API provides a way for validating visitorsdata issued by Fingerprint Pro.
* Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios.
*
* API version: 3
* Contact: [email protected]
Expand Down
16 changes: 16 additions & 0 deletions sdk/model_botd_error.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Fingerprint Pro Server API
*
* Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios.
*
* API version: 3
* Contact: [email protected]
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package sdk

type BotdError struct {
// Error code: * `TooManyRequests` - the limit on secret API key requests per second has been exceeded * `Failed` - internal server error
Code string `json:"code"`
Message string `json:"message"`
}
4 changes: 2 additions & 2 deletions sdk/model_botd_result.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Fingerprint Pro Server API
*
* Fingerprint Pro Server API provides a way for validating visitorsdata issued by Fingerprint Pro.
* Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios.
*
* API version: 3
* Contact: [email protected]
Expand All @@ -13,7 +13,7 @@ import (
"time"
)

// Contains all the information from BOTD product
// Contains all the information from Bot Detection product
type BotdResult struct {
// IP address of the requesting browser or bot.
Ip string `json:"ip"`
Expand Down
2 changes: 1 addition & 1 deletion sdk/model_browser_details.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Fingerprint Pro Server API
*
* Fingerprint Pro Server API provides a way for validating visitorsdata issued by Fingerprint Pro.
* Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios.
*
* API version: 3
* Contact: [email protected]
Expand Down
2 changes: 1 addition & 1 deletion sdk/model_confidence.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Fingerprint Pro Server API
*
* Fingerprint Pro Server API provides a way for validating visitorsdata issued by Fingerprint Pro.
* Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios.
*
* API version: 3
* Contact: [email protected]
Expand Down
14 changes: 14 additions & 0 deletions sdk/model_error_event403_response.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* Fingerprint Pro Server API
*
* Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios.
*
* API version: 3
* Contact: [email protected]
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package sdk

type ErrorEvent403Response struct {
Error_ *ErrorEvent403ResponseError `json:"error,omitempty"`
}
Loading

0 comments on commit 1d94e69

Please sign in to comment.