Skip to content

Commit

Permalink
used codegen-cli and flotiq-setup, updated readme, updated packages, …
Browse files Browse the repository at this point in the history
…fixed eslint errors
  • Loading branch information
CiotkaCierpienia committed May 29, 2024
1 parent 10475cb commit 1171530
Show file tree
Hide file tree
Showing 99 changed files with 8,380 additions and 1 deletion.
189 changes: 189 additions & 0 deletions flotiqApi/apis/ExampleAPI.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
/**
* Flotiq User API
* ## Getting started This API Documentation reflects the endpoints defined in your [Flotiq](https://flotiq.com) account. The documentation is generated using an OpenAPI schema describing the API, which can be obtained in several flavors: - [OAS 3.0](https://api.flotiq.com/api/v1/open-api-schema.json?auth_token=REPLACE_KEY_VALUE) - without hydration, will not expand relations between content types (this is the default version which provides maximum compatibility with downstream systems) - with hydration, pass [hydrate=1](https://api.flotiq.com/api/v1/open-api-schema.json?auth_token=REPLACE_KEY_VALUE&hydrate=1) - use this for a better type support in exported OpenAPI schemas - without system endpoints, pass [user_only=1](https://api.flotiq.com/api/v1/open-api-schema.json?auth_token=REPLACE_KEY_VALUE&hydrate=1&user_only=1) - use this to only include your endpoints, without system ones - [OAS 2.0](https://api.flotiq.com/api/v1/open-api-schema.json?auth_token=REPLACE_KEY_VALUE&version=2) - provided for compatibility with several older systems Check Flotiq documentation for more information about [Flotiq OpenAPI capabilities](https://flotiq.com/docs/API/open-api-schema/), instructions how to generate code and other useful tips. ### Access to data There are several methods that you can use to access your data: * Live API docs - available via <code>Try it out</code> button available next to each endpoint * Copying example code on the right side of each endpoint * By downloading the SDKs available in mulitple languages. * By downloading the Postman collection and importing it into Postman. Each of these methods is described in length in the [user documentation](https://flotiq.com/docs/). ### Authorization In order to make use of the provided documentation, example code, SDKs and so on - you will need to pull out your API key. We recommend that you start with the ReadOnly API Key which will allow you to make all the `GET` requests but will error-out when you try to modify content. Please remember to replace the key for `POST`, `PUT` and `DELETE` calls. It's also possible to use scoped API keys - you can create those in the API keys section of the Flotiq user interface. This will allow you to create a key that only authorizes access to a specific content type (or a set of content types, if you choose so). Read more about how to use and create API keys in the [API keys documentation](https://flotiq.com/docs/API/). ## Object access Once you define a Content Type it will become available in your Content API as a set of endpoints that will allow you to work with objects: * create * list * update * delete * batch create * retrieve single object. ### Hydration When you build Content Types that have relation to others your objects will optionally support hydration of related entities. The endpoints that support object retrieval accept a `hydrate` parameter, which can be used to easily fetch hydrated objects. Since this breaks the standard REST concepts - it's not enabled by default, but it's a very handy feature that allows to reduce the amount of HTTP requests sent over the wire and we strongly recommend to use it.
*
* The version of the OpenAPI document: 2.0.1
* Contact: hello@flotiq.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import * as runtime from '../runtime';
import type { BatchResponseSuccess, Example, ExampleBatchDelete200Response, ExampleList, ExampleVersionsList, ExampleWithoutInternal, ExampleWithoutRequired } from '../models/index';
export interface ExampleAPIDeleteRequest {
id: string;
}
export interface ExampleAPIBatchCreateRequest {
updateExisting?: boolean;
ExampleWithoutInternal?: Array<ExampleWithoutInternal>;
}
export interface ExampleAPIBatchDeleteRequest {
request_body?: Array<string>;
}
export interface ExampleAPIBatchPatchRequest {
ExampleWithoutInternal?: Array<ExampleWithoutInternal>;
}
export interface ExampleAPICreateRequest {
ExampleWithoutInternal?: ExampleWithoutInternal;
}
export interface ExampleAPIGetRequest {
id: string;
hydrate?: number;
}
export interface ExampleAPIGetRemovedRequest {
deletedAfter?: string;
}
export interface ExampleAPIGetVersionsRequest {
id: string;
versionId: string;
}
export interface ExampleAPIListRequest {
page?: number;
limit?: number;
order_by?: string;
order_direction?: string;
hydrate?: number;
filters?: string;
ids?: Array<string>;
}
export interface ExampleAPIListVersionRequest {
id: string;
page?: number;
limit?: number;
order_by?: string;
order_direction?: string;
}
export interface ExampleAPIPatchRequest {
id: string;
ExampleWithoutRequired?: ExampleWithoutRequired;
}
export interface ExampleAPIUpdateRequest {
id: string;
ExampleWithoutInternal?: ExampleWithoutInternal;
}
/**
*
*/
export declare class ExampleAPI extends runtime.BaseAPI {
/**
* Removes Example object.<br />
* Delete a Example object
*/
_deleteRaw(requestParameters: ExampleAPIDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
/**
* Removes Example object.<br />
* Delete a Example object
*/
_delete(requestParameters: ExampleAPIDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
/**
* Allows you to create or create and update up to 100 objects of Example type. <br />
* Create a batch of example objects
*/
batchCreateRaw(requestParameters: ExampleAPIBatchCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BatchResponseSuccess>>;
/**
* Allows you to create or create and update up to 100 objects of Example type. <br />
* Create a batch of example objects
*/
batchCreate(requestParameters?: ExampleAPIBatchCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BatchResponseSuccess>;
/**
* Allows you to delete up to 100 objects of Example type. <br />Request body accepts an array of content object IDs that are to be deleted.<br />
* Delete a batch of Example objects
*/
batchDeleteRaw(requestParameters: ExampleAPIBatchDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ExampleBatchDelete200Response>>;
/**
* Allows you to delete up to 100 objects of Example type. <br />Request body accepts an array of content object IDs that are to be deleted.<br />
* Delete a batch of Example objects
*/
batchDelete(requestParameters?: ExampleAPIBatchDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ExampleBatchDelete200Response>;
/**
* Allows you to update up to 100 objects of Example type. <br />
* Update selected fields of a batch of objects
*/
batchPatchRaw(requestParameters: ExampleAPIBatchPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BatchResponseSuccess>>;
/**
* Allows you to update up to 100 objects of Example type. <br />
* Update selected fields of a batch of objects
*/
batchPatch(requestParameters?: ExampleAPIBatchPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BatchResponseSuccess>;
/**
* Allows you to create object of Example type. <br />
* Create a Example object
*/
createRaw(requestParameters: ExampleAPICreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Example>>;
/**
* Allows you to create object of Example type. <br />
* Create a Example object
*/
create(requestParameters?: ExampleAPICreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Example>;
/**
* Returns all information about Example object. <br />
* Get Example object by Id
*/
getRaw(requestParameters: ExampleAPIGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Example>>;
/**
* Returns all information about Example object. <br />
* Get Example object by Id
*/
get(requestParameters: ExampleAPIGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Example>;
/**
* Get ids of removed Example objects. <br />
* Get removed object identifiers
*/
getRemovedRaw(requestParameters: ExampleAPIGetRemovedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<string>>>;
/**
* Get ids of removed Example objects. <br />
* Get removed object identifiers
*/
getRemoved(requestParameters?: ExampleAPIGetRemovedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<string>>;
/**
* Return version of Example object. <br />
* Get a specific version of Example object
*/
getVersionsRaw(requestParameters: ExampleAPIGetVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Example>>;
/**
* Return version of Example object. <br />
* Get a specific version of Example object
*/
getVersions(requestParameters: ExampleAPIGetVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Example>;
/**
* List objects of Example type. <br />
* List Example objects
*/
listRaw(requestParameters: ExampleAPIListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ExampleList>>;
/**
* List objects of Example type. <br />
* List Example objects
*/
list(requestParameters?: ExampleAPIListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ExampleList>;
/**
* List objects versions of Example type. <br />
* List all versions of a Example object
*/
listVersionRaw(requestParameters: ExampleAPIListVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ExampleVersionsList>>;
/**
* List objects versions of Example type. <br />
* List all versions of a Example object
*/
listVersion(requestParameters: ExampleAPIListVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ExampleVersionsList>;
/**
* Allows update of the Example object, but it is unnecessary to specify all the object\'s properties. Properties not included in the payload will be completed with data from the database. <br />
* Update selected fields of Example object
*/
patchRaw(requestParameters: ExampleAPIPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Example>>;
/**
* Allows update of the Example object, but it is unnecessary to specify all the object\'s properties. Properties not included in the payload will be completed with data from the database. <br />
* Update selected fields of Example object
*/
patch(requestParameters: ExampleAPIPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Example>;
/**
* Allows update of the Example object, it has to have all fields, as this operation overwrites the object. All properties not included in the payload will be lost. <br />
* Update existing Example object
*/
updateRaw(requestParameters: ExampleAPIUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Example>>;
/**
* Allows update of the Example object, it has to have all fields, as this operation overwrites the object. All properties not included in the payload will be lost. <br />
* Update existing Example object
*/
update(requestParameters: ExampleAPIUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Example>;
}
Loading

0 comments on commit 1171530

Please sign in to comment.