Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ This section explains how you can setup a development environment for ByteChef c

### Prerequisites

- Node v16+
- [Node v16+](https://nodejs.org/en/download/)
- [Docker](https://docs.docker.com/get-docker/)

### Steps for setup
Expand Down Expand Up @@ -185,8 +185,8 @@ This section doesn't provide instructions to install Java and Gradle because the
### Prerequisites

- [Docker](https://docs.docker.com/get-docker/)
- Java - OpenJDK 17.
- Gradle - V7.6+.
- [Java - GraalVM V22.3+](https://www.graalvm.org/downloads/)
- Gradle - V7.6+. - Comes as part of the project as [Gradle Wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html)
- A PostgreSQL database - Refer to the [Setting up local development infrastructure](#setting-up-local-development-infrastructure-using-docker).
- A Redis instance - Refer to the [Setting up local development infrastructure](#setting-up-local-development-infrastructure-using-docker).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ index.ts
models/CategoryModel.ts
models/IntegrationModel.ts
models/PostIntegrationWorkflowRequestModel.ts
models/PutIntegrationTagsRequestModel.ts
models/TagModel.ts
models/WorkflowFormatModel.ts
models/WorkflowModel.ts
Expand Down
19 changes: 11 additions & 8 deletions client/src/data-access/integration/apis/IntegrationsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import type {
CategoryModel,
IntegrationModel,
PostIntegrationWorkflowRequestModel,
PutIntegrationTagsRequestModel,
TagModel,
WorkflowModel,
} from '../models';
Expand All @@ -28,6 +29,8 @@ import {
IntegrationModelToJSON,
PostIntegrationWorkflowRequestModelFromJSON,
PostIntegrationWorkflowRequestModelToJSON,
PutIntegrationTagsRequestModelFromJSON,
PutIntegrationTagsRequestModelToJSON,
TagModelFromJSON,
TagModelToJSON,
WorkflowModelFromJSON,
Expand Down Expand Up @@ -67,7 +70,7 @@ export interface PutIntegrationRequest {

export interface PutIntegrationTagsRequest {
id: number;
tagModel: Array<TagModel>;
putIntegrationTagsRequestModel: PutIntegrationTagsRequestModel;
}

/**
Expand Down Expand Up @@ -298,8 +301,8 @@ export class IntegrationsApi extends runtime.BaseAPI {
}

/**
* Creates new workflow and adds it to an existing integration.
* Creates new workflow and adds it to an existing integration.
* Create new workflow and adds it to an existing integration.
* Create new workflow and adds it to an existing integration.
*/
async postIntegrationWorkflowRaw(requestParameters: PostIntegrationWorkflowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IntegrationModel>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
Expand Down Expand Up @@ -328,8 +331,8 @@ export class IntegrationsApi extends runtime.BaseAPI {
}

/**
* Creates new workflow and adds it to an existing integration.
* Creates new workflow and adds it to an existing integration.
* Create new workflow and adds it to an existing integration.
* Create new workflow and adds it to an existing integration.
*/
async postIntegrationWorkflow(requestParameters: PostIntegrationWorkflowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IntegrationModel> {
const response = await this.postIntegrationWorkflowRaw(requestParameters, initOverrides);
Expand Down Expand Up @@ -384,8 +387,8 @@ export class IntegrationsApi extends runtime.BaseAPI {
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling putIntegrationTags.');
}

if (requestParameters.tagModel === null || requestParameters.tagModel === undefined) {
throw new runtime.RequiredError('tagModel','Required parameter requestParameters.tagModel was null or undefined when calling putIntegrationTags.');
if (requestParameters.putIntegrationTagsRequestModel === null || requestParameters.putIntegrationTagsRequestModel === undefined) {
throw new runtime.RequiredError('putIntegrationTagsRequestModel','Required parameter requestParameters.putIntegrationTagsRequestModel was null or undefined when calling putIntegrationTags.');
}

const queryParameters: any = {};
Expand All @@ -399,7 +402,7 @@ export class IntegrationsApi extends runtime.BaseAPI {
method: 'PUT',
headers: headerParameters,
query: queryParameters,
body: requestParameters.tagModel.map(TagModelToJSON),
body: PutIntegrationTagsRequestModelToJSON(requestParameters.putIntegrationTagsRequestModel),
}, initOverrides);

return new runtime.VoidApiResponse(response);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/* tslint:disable */
/* eslint-disable */
/**
* OpenAPI definition
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

import { exists, mapValues } from '../runtime';
import type { TagModel } from './TagModel';
import {
TagModelFromJSON,
TagModelFromJSONTyped,
TagModelToJSON,
} from './TagModel';

/**
* The request object that contains the array of tags.
* @export
* @interface PutIntegrationTagsRequestModel
*/
export interface PutIntegrationTagsRequestModel {
/**
*
* @type {Array<TagModel>}
* @memberof PutIntegrationTagsRequestModel
*/
tags?: Array<TagModel>;
}

/**
* Check if a given object implements the PutIntegrationTagsRequestModel interface.
*/
export function instanceOfPutIntegrationTagsRequestModel(value: object): boolean {
let isInstance = true;

return isInstance;
}

export function PutIntegrationTagsRequestModelFromJSON(json: any): PutIntegrationTagsRequestModel {
return PutIntegrationTagsRequestModelFromJSONTyped(json, false);
}

export function PutIntegrationTagsRequestModelFromJSONTyped(json: any, ignoreDiscriminator: boolean): PutIntegrationTagsRequestModel {
if ((json === undefined) || (json === null)) {
return json;
}
return {

'tags': !exists(json, 'tags') ? undefined : ((json['tags'] as Array<any>).map(TagModelFromJSON)),
};
}

export function PutIntegrationTagsRequestModelToJSON(value?: PutIntegrationTagsRequestModel | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {

'tags': value.tags === undefined ? undefined : ((value.tags as Array<any>).map(TagModelToJSON)),
};
}

1 change: 1 addition & 0 deletions client/src/data-access/integration/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
export * from './CategoryModel';
export * from './IntegrationModel';
export * from './PostIntegrationWorkflowRequestModel';
export * from './PutIntegrationTagsRequestModel';
export * from './TagModel';
export * from './WorkflowFormatModel';
export * from './WorkflowModel';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import com.bytechef.atlas.error.Errorable;
import com.bytechef.atlas.error.ExecutionError;
import com.bytechef.atlas.task.WorkflowTask;
import com.bytechef.commons.utils.MapUtils;
import com.bytechef.commons.utils.MapValueUtils;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Collections;
Expand Down Expand Up @@ -141,14 +141,14 @@ public Workflow(String id, String definition, Format format, Map<String, Object>
this.id = id;
this.format = format;
this.definition = definition;
this.description = MapUtils.getString(source, WorkflowConstants.DESCRIPTION);
this.inputs = MapUtils.getList(
this.description = MapValueUtils.getString(source, WorkflowConstants.DESCRIPTION);
this.inputs = MapValueUtils.getList(
source, WorkflowConstants.INPUTS, new ParameterizedTypeReference<>() {}, Collections.emptyList());
this.label = MapUtils.getString(source, WorkflowConstants.LABEL);
this.outputs = MapUtils.getList(
this.label = MapValueUtils.getString(source, WorkflowConstants.LABEL);
this.outputs = MapValueUtils.getList(
source, WorkflowConstants.OUTPUTS, new ParameterizedTypeReference<>() {}, Collections.emptyList());
this.retry = MapUtils.getInteger(source, WorkflowConstants.RETRY, 0);
this.tasks = MapUtils
this.retry = MapValueUtils.getInteger(source, WorkflowConstants.RETRY, 0);
this.tasks = MapValueUtils
.getList(source, WorkflowConstants.TASKS, new ParameterizedTypeReference<Map<String, Object>>() {})
.stream()
.map(WorkflowTask::new)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import com.bytechef.atlas.constants.WorkflowConstants;
import com.bytechef.commons.utils.CollectionUtils;
import com.bytechef.commons.utils.MapUtils;
import com.bytechef.commons.utils.MapValueUtils;
import java.io.Serializable;
import java.util.Collections;
import java.util.HashMap;
Expand All @@ -41,7 +41,7 @@
public class WorkflowTask implements Serializable {

static {
MapUtils.addConverter(new Converter<Map, WorkflowTask>() {
MapValueUtils.addConverter(new Converter<Map, WorkflowTask>() {

@Override
@SuppressWarnings("unchecked")
Expand Down Expand Up @@ -83,34 +83,34 @@ public void putAll(Map<String, Object> source) {
this.finalize = CollectionUtils.concat(
finalize,
CollectionUtils.map(
MapUtils.getList(
MapValueUtils.getList(
source, WorkflowConstants.FINALIZE, Map.class, Collections.emptyList()),
WorkflowTask::new));
}

if (source.containsKey(WorkflowConstants.LABEL)) {
this.label = MapUtils.getString(source, WorkflowConstants.LABEL);
this.label = MapValueUtils.getString(source, WorkflowConstants.LABEL);
}

if (source.containsKey(WorkflowConstants.NAME)) {
this.name = MapUtils.getString(source, WorkflowConstants.NAME);
this.name = MapValueUtils.getString(source, WorkflowConstants.NAME);
}

if (source.containsKey(WorkflowConstants.NODE)) {
this.node = MapUtils.getString(source, WorkflowConstants.NODE);
this.node = MapValueUtils.getString(source, WorkflowConstants.NODE);
}

if (source.containsKey(WorkflowConstants.PARAMETERS)) {
this.parameters = CollectionUtils.concat(
parameters,
MapUtils.getMap(source, WorkflowConstants.PARAMETERS, Collections.emptyMap()));
MapValueUtils.getMap(source, WorkflowConstants.PARAMETERS, Collections.emptyMap()));
}

if (source.containsKey(WorkflowConstants.POST)) {
this.post = CollectionUtils.concat(
post,
CollectionUtils.map(
MapUtils.getList(
MapValueUtils.getList(
source, WorkflowConstants.POST, Map.class, Collections.emptyList()),
WorkflowTask::new));
}
Expand All @@ -119,17 +119,17 @@ public void putAll(Map<String, Object> source) {
this.pre = CollectionUtils.concat(
pre,
CollectionUtils.map(
MapUtils.getList(
MapValueUtils.getList(
source, WorkflowConstants.PRE, Map.class, Collections.emptyList()),
WorkflowTask::new));
}

if (source.containsKey(WorkflowConstants.TIMEOUT)) {
this.timeout = MapUtils.getString(source, WorkflowConstants.TIMEOUT);
this.timeout = MapValueUtils.getString(source, WorkflowConstants.TIMEOUT);
}

if (source.containsKey(WorkflowConstants.TYPE)) {
this.type = MapUtils.getString(source, WorkflowConstants.TYPE);
this.type = MapValueUtils.getString(source, WorkflowConstants.TYPE);
}
}

Expand Down
Loading