Skip to content

Commit

Permalink
api regeneration
Browse files Browse the repository at this point in the history
  • Loading branch information
laliconfigcat committed Feb 2, 2022
1 parent 3386101 commit a9e4caf
Show file tree
Hide file tree
Showing 95 changed files with 1,283 additions and 1,138 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ Class | Method | HTTP request | Description
- [SdkKeysModel](docs/SdkKeysModel.md)
- [SegmentComparator](docs/SegmentComparator.md)
- [SegmentListModel](docs/SegmentListModel.md)
- [SegmentListModelHaljson](docs/SegmentListModelHaljson.md)
- [SegmentModel](docs/SegmentModel.md)
- [SegmentModelHaljson](docs/SegmentModelHaljson.md)
- [SettingDataModel](docs/SettingDataModel.md)
Expand Down
65 changes: 61 additions & 4 deletions api/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3074,7 +3074,7 @@ paths:
schema:
type: array
items:
$ref: '#/components/schemas/SegmentListModel'
$ref: '#/components/schemas/SegmentListModel-haljson'
"400":
description: Bad request.
"404":
Expand Down Expand Up @@ -4748,6 +4748,8 @@ components:
usage:
type: integer
format: int32
product:
$ref: '#/components/schemas/ProductModel'
segmentId:
type: string
format: uuid
Expand Down Expand Up @@ -4778,6 +4780,13 @@ components:
additionalProperties: false
example:
createdAt: 2000-01-23T04:56:07.000+00:00
product:
productId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
organization:
organizationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
name: name
name: name
description: description
lastUpdaterEmail: lastUpdaterEmail
creatorEmail: creatorEmail
usage: 0
Expand All @@ -4787,6 +4796,43 @@ components:
creatorFullName: creatorFullName
lastUpdaterFullName: lastUpdaterFullName
updatedAt: 2000-01-23T04:56:07.000+00:00
SegmentListModel-haljson:
type: object
properties:
usage:
type: integer
format: int32
_embedded:
$ref: '#/components/schemas/ConfigModelhaljson__embedded'
segmentId:
type: string
format: uuid
name:
type: string
nullable: true
description:
type: string
nullable: true
creatorEmail:
type: string
nullable: true
creatorFullName:
type: string
nullable: true
createdAt:
type: string
format: date-time
lastUpdaterEmail:
type: string
nullable: true
lastUpdaterFullName:
type: string
nullable: true
updatedAt:
type: string
format: date-time
_links:
$ref: '#/components/schemas/EnvironmentModelhaljson__links'
SegmentModel:
type: object
properties:
Expand All @@ -4798,6 +4844,8 @@ components:
comparisonValue:
type: string
nullable: true
product:
$ref: '#/components/schemas/ProductModel'
segmentId:
type: string
format: uuid
Expand Down Expand Up @@ -4827,14 +4875,21 @@ components:
format: date-time
additionalProperties: false
example:
product:
productId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
organization:
organizationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
name: name
name: name
description: description
comparisonValue: comparisonValue
creatorEmail: creatorEmail
description: description
comparator: isOneOf
createdAt: 2000-01-23T04:56:07.000+00:00
lastUpdaterEmail: lastUpdaterEmail
comparisonValue: comparisonValue
creatorEmail: creatorEmail
segmentId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
name: name
description: description
creatorFullName: creatorFullName
lastUpdaterFullName: lastUpdaterFullName
comparisonAttribute: comparisonAttribute
Expand All @@ -4850,6 +4905,8 @@ components:
comparisonValue:
type: string
nullable: true
_embedded:
$ref: '#/components/schemas/ConfigModelhaljson__embedded'
segmentId:
type: string
format: uuid
Expand Down
109 changes: 56 additions & 53 deletions api_audit_logs.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@

/*
* ConfigCat Public Management API
*
* **Base API URL**: https://api.configcat.com If you prefer the swagger documentation, you can find it here: [Swagger UI](https://api.configcat.com/swagger). The purpose of this API is to access the ConfigCat platform programmatically. You can **Create**, **Read**, **Update** and **Delete** any entities like **Feature Flags, Configs, Environments** or **Products** within ConfigCat. The API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON and JSON+HAL format. Do not use this API for accessing and evaluating feature flag values. Use the [SDKs instead](https://configcat.com/docs/sdk-reference/overview). # OpenAPI Specification The complete specification is publicly available here: [swagger.json](v1/swagger.json). You can use it to generate client libraries in various languages with [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) or [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) to interact with this API. # Authentication This API uses the [Basic HTTP Authentication Scheme](https://en.wikipedia.org/wiki/Basic_access_authentication). <!-- ReDoc-Inject: <security-definitions> --> # Throttling and rate limits All the rate limited API calls are returning information about the current rate limit period in the following HTTP headers: | Header | Description | | :- | :- | | X-Rate-Limit-Remaining | The maximum number of requests remaining in the current rate limit period. | | X-Rate-Limit-Reset | The time when the current rate limit period resets. | When the rate limit is exceeded by a request, the API returns with a `HTTP 429 - Too many requests` status along with a `Retry-After` HTTP header.
* **Base API URL**: https://api.configcat.com If you prefer the swagger documentation, you can find it here: [Swagger UI](https://api.configcat.com/swagger). The purpose of this API is to access the ConfigCat platform programmatically. You can **Create**, **Read**, **Update** and **Delete** any entities like **Feature Flags, Configs, Environments** or **Products** within ConfigCat. The API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON and JSON+HAL format. Do not use this API for accessing and evaluating feature flag values. Use the [SDKs instead](https://configcat.com/docs/sdk-reference/overview). # OpenAPI Specification The complete specification is publicly available here: [swagger.json](v1/swagger.json). You can use it to generate client libraries in various languages with [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) or [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) to interact with this API. # Authentication This API uses the [Basic HTTP Authentication Scheme](https://en.wikipedia.org/wiki/Basic_access_authentication). <!-- ReDoc-Inject: <security-definitions> --> # Throttling and rate limits All the rate limited API calls are returning information about the current rate limit period in the following HTTP headers: | Header | Description | | :- | :- | | X-Rate-Limit-Remaining | The maximum number of requests remaining in the current rate limit period. | | X-Rate-Limit-Reset | The time when the current rate limit period resets. | When the rate limit is exceeded by a request, the API returns with a `HTTP 429 - Too many requests` status along with a `Retry-After` HTTP header.
*
* API version: v1
* Contact: [email protected]
Expand All @@ -12,11 +11,12 @@ package configcatpublicapi

import (
"context"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"strings"
"fmt"

"github.com/antihax/optional"
)

Expand All @@ -26,6 +26,7 @@ var (
)

type AuditLogsApiService service

/*
AuditLogsApiService List Audit log items for Product
This endpoint returns the list of Audit log items for a given Product and the result can be optionally filtered by Config and/or Environment.
Expand All @@ -41,19 +42,19 @@ This endpoint returns the list of Audit log items for a given Product and the r
*/

type AuditLogsApiGetAuditlogsOpts struct {
ConfigId optional.Interface
EnvironmentId optional.Interface
AuditLogType optional.Interface
FromUtcDateTime optional.Time
ToUtcDateTime optional.Time
ConfigId optional.Interface
EnvironmentId optional.Interface
AuditLogType optional.Interface
FromUtcDateTime optional.Time
ToUtcDateTime optional.Time
}

func (a *AuditLogsApiService) GetAuditlogs(ctx context.Context, productId string, localVarOptionals *AuditLogsApiGetAuditlogsOpts) ([]AuditLogItemModel, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
localVarReturnValue []AuditLogItemModel
)

Expand Down Expand Up @@ -115,32 +116,33 @@ func (a *AuditLogsApiService) GetAuditlogs(ctx context.Context, productId string

if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err == nil {
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}

if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
body: localVarBody,
body: localVarBody,
error: localVarHttpResponse.Status,
}
if localVarHttpResponse.StatusCode == 200 {
var v []AuditLogItemModel
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
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
}
return localVarReturnValue, localVarHttpResponse, newErr
}

return localVarReturnValue, localVarHttpResponse, nil
}

/*
AuditLogsApiService List Deleted Settings
This endpoint returns the list of Feature Flags and Settings that were deleted from the given Config.
Expand All @@ -150,10 +152,10 @@ This endpoint returns the list of Feature Flags and Settings that were deleted f
*/
func (a *AuditLogsApiService) GetDeletedSettings(ctx context.Context, configId string) ([]SettingModel, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
localVarReturnValue []SettingModel
)

Expand Down Expand Up @@ -200,32 +202,33 @@ func (a *AuditLogsApiService) GetDeletedSettings(ctx context.Context, configId s

if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err == nil {
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}

if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
body: localVarBody,
body: localVarBody,
error: localVarHttpResponse.Status,
}
if localVarHttpResponse.StatusCode == 200 {
var v []SettingModel
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
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
}
return localVarReturnValue, localVarHttpResponse, newErr
}

return localVarReturnValue, localVarHttpResponse, nil
}

/*
AuditLogsApiService List Audit log items for Organization
This endpoint returns the list of Audit log items for a given Organization and the result can be optionally filtered by Product and/or Config and/or Environment.
Expand All @@ -242,20 +245,20 @@ This endpoint returns the list of Audit log items for a given Organization and
*/

type AuditLogsApiGetOrganizationAuditlogsOpts struct {
ProductId optional.Interface
ConfigId optional.Interface
EnvironmentId optional.Interface
AuditLogType optional.Interface
FromUtcDateTime optional.Time
ToUtcDateTime optional.Time
ProductId optional.Interface
ConfigId optional.Interface
EnvironmentId optional.Interface
AuditLogType optional.Interface
FromUtcDateTime optional.Time
ToUtcDateTime optional.Time
}

func (a *AuditLogsApiService) GetOrganizationAuditlogs(ctx context.Context, organizationId string, localVarOptionals *AuditLogsApiGetOrganizationAuditlogsOpts) ([]AuditLogItemModel, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
localVarReturnValue []AuditLogItemModel
)

Expand Down Expand Up @@ -320,26 +323,26 @@ func (a *AuditLogsApiService) GetOrganizationAuditlogs(ctx context.Context, orga

if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err == nil {
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}

if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
body: localVarBody,
body: localVarBody,
error: localVarHttpResponse.Status,
}
if localVarHttpResponse.StatusCode == 200 {
var v []AuditLogItemModel
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
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
}
return localVarReturnValue, localVarHttpResponse, newErr
}
Expand Down
Loading

0 comments on commit a9e4caf

Please sign in to comment.