-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from flotiq/feature/24741-use-codegen-cli
used codegen-cli and flotiq-setup, updated readme, updated packages, fixed eslint errors
- Loading branch information
Showing
115 changed files
with
12,113 additions
and
1,988 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "npm" | ||
directory: '/' | ||
schedule: | ||
interval: 'weekly' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: PR workflow | ||
on: | ||
pull_request: | ||
|
||
permissions: | ||
pull-requests: write | ||
|
||
jobs: | ||
test-build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [ 18.x ] | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v2 | ||
with: | ||
persist-credentials: false | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm install -g flotiq-cli | ||
- run: flotiq import . ${{ secrets.FLOTIQ_API_KEY }} | ||
- run: yarn install | ||
- run: yarn build | ||
env: | ||
FLOTIQ_API_KEY: ${{ secrets.FLOTIQ_API_KEY }} | ||
FLOTIQ_API_URL: ${{ secrets.FLOTIQ_API_URL }} | ||
dependabot: | ||
needs: test-build | ||
runs-on: ubuntu-latest | ||
if: github.actor == 'dependabot[bot]' | ||
steps: | ||
- name: Dependabot metadata | ||
id: metadata | ||
uses: dependabot/fetch-metadata@v1 | ||
with: | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
- name: Approve a PR | ||
run: gh pr review --approve "$PR_URL" | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GH_TOKEN: ${{secrets.GITHUB_TOKEN}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: [email protected] | ||
* | ||
* 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>; | ||
} |
Oops, something went wrong.