From af1342d394358986799ee5ca4bb929bcf4bf7bb1 Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Thu, 11 Jan 2024 16:40:55 +0300 Subject: [PATCH 01/24] automation.actions --- ...nsApi.ts => PublicActionDefinitionsApi.ts} | 130 +++--- ...ionsApi.ts => PublicActionFunctionsApi.ts} | 192 ++++---- ...ionsApi.ts => PublicActionRevisionsApi.ts} | 58 ++- ...{CallbacksApi.ts => PublicCallbacksApi.ts} | 20 +- codegen/automation/actions/index.ts | 2 +- .../models/ActionFunctionIdentifier.ts | 53 --- ...atchInputCallbackCompletionBatchRequest.ts | 4 +- .../models/CallbackCompletionBatchRequest.ts | 27 +- .../models/CallbackCompletionRequest.ts | 10 +- ...nsePublicActionDefinitionForwardPaging.ts} | 24 +- ...PublicActionFunctionIdentifierNoPaging.ts} | 14 +- ...ponsePublicActionRevisionForwardPaging.ts} | 24 +- .../automation/actions/models/ErrorDetail.ts | 40 +- .../actions/models/FieldTypeDefinition.ts | 86 ++-- .../actions/models/ForwardPaging.ts | 4 +- .../actions/models/InputFieldDefinition.ts | 36 +- .../automation/actions/models/ModelError.ts | 68 +-- codegen/automation/actions/models/NextPage.ts | 14 +- .../actions/models/ObjectSerializer.ts | 104 +++-- codegen/automation/actions/models/Option.ts | 49 +- .../actions/models/OutputFieldDefinition.ts | 35 ++ ...efinition.ts => PublicActionDefinition.ts} | 124 +++-- ...nInput.ts => PublicActionDefinitionEgg.ts} | 115 +++-- ...nDefinitionInputFieldDependenciesInner.ts} | 14 +- ...atch.ts => PublicActionDefinitionPatch.ts} | 91 ++-- ...ionFunction.ts => PublicActionFunction.ts} | 26 +- .../models/PublicActionFunctionIdentifier.ts | 44 ++ ...{ActionLabels.ts => PublicActionLabels.ts} | 74 +-- ...ionRevision.ts => PublicActionRevision.ts} | 39 +- ...PublicConditionalSingleFieldDependency.ts} | 14 +- .../models/PublicExecutionTranslationRule.ts | 41 ++ ...tions.ts => PublicObjectRequestOptions.ts} | 14 +- ...ency.ts => PublicSingleFieldDependency.ts} | 14 +- codegen/automation/actions/models/all.ts | 30 +- .../actions/types/ObjectParamAPI.ts | 430 ++++++++---------- .../automation/actions/types/ObservableAPI.ts | 316 ++++++------- .../automation/actions/types/PromiseAPI.ts | 256 +++++------ 37 files changed, 1257 insertions(+), 1379 deletions(-) rename codegen/automation/actions/apis/{DefinitionsApi.ts => PublicActionDefinitionsApi.ts} (75%) rename codegen/automation/actions/apis/{FunctionsApi.ts => PublicActionFunctionsApi.ts} (76%) rename codegen/automation/actions/apis/{RevisionsApi.ts => PublicActionRevisionsApi.ts} (78%) rename codegen/automation/actions/apis/{CallbacksApi.ts => PublicCallbacksApi.ts} (90%) delete mode 100644 codegen/automation/actions/models/ActionFunctionIdentifier.ts rename codegen/automation/actions/models/{CollectionResponseExtensionActionDefinitionForwardPaging.ts => CollectionResponsePublicActionDefinitionForwardPaging.ts} (64%) rename codegen/automation/actions/models/{CollectionResponseActionFunctionIdentifierNoPaging.ts => CollectionResponsePublicActionFunctionIdentifierNoPaging.ts} (54%) rename codegen/automation/actions/models/{CollectionResponseActionRevisionForwardPaging.ts => CollectionResponsePublicActionRevisionForwardPaging.ts} (65%) create mode 100644 codegen/automation/actions/models/OutputFieldDefinition.ts rename codegen/automation/actions/models/{ExtensionActionDefinition.ts => PublicActionDefinition.ts} (55%) rename codegen/automation/actions/models/{ExtensionActionDefinitionInput.ts => PublicActionDefinitionEgg.ts} (53%) rename codegen/automation/actions/models/{ExtensionActionDefinitionPatchInputFieldDependenciesInner.ts => PublicActionDefinitionInputFieldDependenciesInner.ts} (68%) rename codegen/automation/actions/models/{ExtensionActionDefinitionPatch.ts => PublicActionDefinitionPatch.ts} (52%) rename codegen/automation/actions/models/{ActionFunction.ts => PublicActionFunction.ts} (54%) create mode 100644 codegen/automation/actions/models/PublicActionFunctionIdentifier.ts rename codegen/automation/actions/models/{ActionLabels.ts => PublicActionLabels.ts} (63%) rename codegen/automation/actions/models/{ActionRevision.ts => PublicActionRevision.ts} (69%) rename codegen/automation/actions/models/{ConditionalSingleFieldDependency.ts => PublicConditionalSingleFieldDependency.ts} (70%) create mode 100644 codegen/automation/actions/models/PublicExecutionTranslationRule.ts rename codegen/automation/actions/models/{ObjectRequestOptions.ts => PublicObjectRequestOptions.ts} (64%) rename codegen/automation/actions/models/{SingleFieldDependency.ts => PublicSingleFieldDependency.ts} (69%) diff --git a/codegen/automation/actions/apis/DefinitionsApi.ts b/codegen/automation/actions/apis/PublicActionDefinitionsApi.ts similarity index 75% rename from codegen/automation/actions/apis/DefinitionsApi.ts rename to codegen/automation/actions/apis/PublicActionDefinitionsApi.ts index cdfa9d0ce..98550fd08 100644 --- a/codegen/automation/actions/apis/DefinitionsApi.ts +++ b/codegen/automation/actions/apis/PublicActionDefinitionsApi.ts @@ -8,20 +8,18 @@ import { isCodeInRange} from '../util'; import {SecurityAuthentication} from '../auth/auth'; -import { CollectionResponseExtensionActionDefinitionForwardPaging } from '../models/CollectionResponseExtensionActionDefinitionForwardPaging'; -import { ExtensionActionDefinition } from '../models/ExtensionActionDefinition'; -import { ExtensionActionDefinitionInput } from '../models/ExtensionActionDefinitionInput'; -import { ExtensionActionDefinitionPatch } from '../models/ExtensionActionDefinitionPatch'; +import { CollectionResponsePublicActionDefinitionForwardPaging } from '../models/CollectionResponsePublicActionDefinitionForwardPaging'; +import { PublicActionDefinition } from '../models/PublicActionDefinition'; +import { PublicActionDefinitionEgg } from '../models/PublicActionDefinitionEgg'; +import { PublicActionDefinitionPatch } from '../models/PublicActionDefinitionPatch'; /** * no description */ -export class DefinitionsApiRequestFactory extends BaseAPIRequestFactory { +export class PublicActionDefinitionsApiRequestFactory extends BaseAPIRequestFactory { /** - * Archives a single custom workflow action with the specified ID. Workflows that currently use this custom action will stop attempting to execute the action, and all future executions will be marked as a failure. - * Archive a custom action - * @param definitionId The ID of the custom workflow action. + * @param definitionId * @param appId */ public async archive(definitionId: string, appId: number, _options?: Configuration): Promise { @@ -29,13 +27,13 @@ export class DefinitionsApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'definitionId' is not null or undefined if (definitionId === null || definitionId === undefined) { - throw new RequiredError("DefinitionsApi", "archive", "definitionId"); + throw new RequiredError("PublicActionDefinitionsApi", "archive", "definitionId"); } // verify required parameter 'appId' is not null or undefined if (appId === null || appId === undefined) { - throw new RequiredError("DefinitionsApi", "archive", "appId"); + throw new RequiredError("PublicActionDefinitionsApi", "archive", "appId"); } @@ -65,23 +63,21 @@ export class DefinitionsApiRequestFactory extends BaseAPIRequestFactory { } /** - * Creates a new custom workflow action. - * Create new custom action * @param appId - * @param extensionActionDefinitionInput The custom workflow action to create. + * @param publicActionDefinitionEgg */ - public async create(appId: number, extensionActionDefinitionInput: ExtensionActionDefinitionInput, _options?: Configuration): Promise { + public async create(appId: number, publicActionDefinitionEgg: PublicActionDefinitionEgg, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'appId' is not null or undefined if (appId === null || appId === undefined) { - throw new RequiredError("DefinitionsApi", "create", "appId"); + throw new RequiredError("PublicActionDefinitionsApi", "create", "appId"); } - // verify required parameter 'extensionActionDefinitionInput' is not null or undefined - if (extensionActionDefinitionInput === null || extensionActionDefinitionInput === undefined) { - throw new RequiredError("DefinitionsApi", "create", "extensionActionDefinitionInput"); + // verify required parameter 'publicActionDefinitionEgg' is not null or undefined + if (publicActionDefinitionEgg === null || publicActionDefinitionEgg === undefined) { + throw new RequiredError("PublicActionDefinitionsApi", "create", "publicActionDefinitionEgg"); } @@ -100,7 +96,7 @@ export class DefinitionsApiRequestFactory extends BaseAPIRequestFactory { ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(extensionActionDefinitionInput, "ExtensionActionDefinitionInput", ""), + ObjectSerializer.serialize(publicActionDefinitionEgg, "PublicActionDefinitionEgg", ""), contentType ); requestContext.setBody(serializedBody); @@ -121,24 +117,22 @@ export class DefinitionsApiRequestFactory extends BaseAPIRequestFactory { } /** - * Returns a single custom workflow action with the specified ID. - * Get a custom action - * @param definitionId The ID of the custom workflow action. + * @param definitionId * @param appId - * @param archived Whether to include archived custom actions. + * @param archived Whether to return only results that have been archived. */ public async getById(definitionId: string, appId: number, archived?: boolean, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'definitionId' is not null or undefined if (definitionId === null || definitionId === undefined) { - throw new RequiredError("DefinitionsApi", "getById", "definitionId"); + throw new RequiredError("PublicActionDefinitionsApi", "getById", "definitionId"); } // verify required parameter 'appId' is not null or undefined if (appId === null || appId === undefined) { - throw new RequiredError("DefinitionsApi", "getById", "appId"); + throw new RequiredError("PublicActionDefinitionsApi", "getById", "appId"); } @@ -174,19 +168,17 @@ export class DefinitionsApiRequestFactory extends BaseAPIRequestFactory { } /** - * Returns a list of all custom workflow actions. - * Get all custom actions * @param appId - * @param limit Maximum number of results per page. + * @param limit The maximum number of results to display per page. * @param after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. - * @param archived Whether to include archived custom actions. + * @param archived Whether to return only results that have been archived. */ public async getPage(appId: number, limit?: number, after?: string, archived?: boolean, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'appId' is not null or undefined if (appId === null || appId === undefined) { - throw new RequiredError("DefinitionsApi", "getPage", "appId"); + throw new RequiredError("PublicActionDefinitionsApi", "getPage", "appId"); } @@ -233,30 +225,28 @@ export class DefinitionsApiRequestFactory extends BaseAPIRequestFactory { } /** - * Updates a custom workflow action with new values for the specified fields. - * Update a custom action - * @param definitionId The ID of the custom workflow action. + * @param definitionId * @param appId - * @param extensionActionDefinitionPatch The custom workflow action fields to be updated. + * @param publicActionDefinitionPatch */ - public async update(definitionId: string, appId: number, extensionActionDefinitionPatch: ExtensionActionDefinitionPatch, _options?: Configuration): Promise { + public async update(definitionId: string, appId: number, publicActionDefinitionPatch: PublicActionDefinitionPatch, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'definitionId' is not null or undefined if (definitionId === null || definitionId === undefined) { - throw new RequiredError("DefinitionsApi", "update", "definitionId"); + throw new RequiredError("PublicActionDefinitionsApi", "update", "definitionId"); } // verify required parameter 'appId' is not null or undefined if (appId === null || appId === undefined) { - throw new RequiredError("DefinitionsApi", "update", "appId"); + throw new RequiredError("PublicActionDefinitionsApi", "update", "appId"); } - // verify required parameter 'extensionActionDefinitionPatch' is not null or undefined - if (extensionActionDefinitionPatch === null || extensionActionDefinitionPatch === undefined) { - throw new RequiredError("DefinitionsApi", "update", "extensionActionDefinitionPatch"); + // verify required parameter 'publicActionDefinitionPatch' is not null or undefined + if (publicActionDefinitionPatch === null || publicActionDefinitionPatch === undefined) { + throw new RequiredError("PublicActionDefinitionsApi", "update", "publicActionDefinitionPatch"); } @@ -276,7 +266,7 @@ export class DefinitionsApiRequestFactory extends BaseAPIRequestFactory { ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(extensionActionDefinitionPatch, "ExtensionActionDefinitionPatch", ""), + ObjectSerializer.serialize(publicActionDefinitionPatch, "PublicActionDefinitionPatch", ""), contentType ); requestContext.setBody(serializedBody); @@ -298,7 +288,7 @@ export class DefinitionsApiRequestFactory extends BaseAPIRequestFactory { } -export class DefinitionsApiResponseProcessor { +export class PublicActionDefinitionsApiResponseProcessor { /** * Unwraps the actual response sent by the server from the response context and deserializes the response content @@ -339,13 +329,13 @@ export class DefinitionsApiResponseProcessor { * @params response Response returned by the server for a request to create * @throws ApiException if the response code was not in [200, 299] */ - public async create(response: ResponseContext): Promise { + public async create(response: ResponseContext): Promise { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("201", response.httpStatusCode)) { - const body: ExtensionActionDefinition = ObjectSerializer.deserialize( + const body: PublicActionDefinition = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "ExtensionActionDefinition", "" - ) as ExtensionActionDefinition; + "PublicActionDefinition", "" + ) as PublicActionDefinition; return body; } if (isCodeInRange("0", response.httpStatusCode)) { @@ -358,10 +348,10 @@ export class DefinitionsApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: ExtensionActionDefinition = ObjectSerializer.deserialize( + const body: PublicActionDefinition = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "ExtensionActionDefinition", "" - ) as ExtensionActionDefinition; + "PublicActionDefinition", "" + ) as PublicActionDefinition; return body; } @@ -375,13 +365,13 @@ export class DefinitionsApiResponseProcessor { * @params response Response returned by the server for a request to getById * @throws ApiException if the response code was not in [200, 299] */ - public async getById(response: ResponseContext): Promise { + public async getById(response: ResponseContext): Promise { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { - const body: ExtensionActionDefinition = ObjectSerializer.deserialize( + const body: PublicActionDefinition = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "ExtensionActionDefinition", "" - ) as ExtensionActionDefinition; + "PublicActionDefinition", "" + ) as PublicActionDefinition; return body; } if (isCodeInRange("0", response.httpStatusCode)) { @@ -394,10 +384,10 @@ export class DefinitionsApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: ExtensionActionDefinition = ObjectSerializer.deserialize( + const body: PublicActionDefinition = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "ExtensionActionDefinition", "" - ) as ExtensionActionDefinition; + "PublicActionDefinition", "" + ) as PublicActionDefinition; return body; } @@ -411,13 +401,13 @@ export class DefinitionsApiResponseProcessor { * @params response Response returned by the server for a request to getPage * @throws ApiException if the response code was not in [200, 299] */ - public async getPage(response: ResponseContext): Promise { + public async getPage(response: ResponseContext): Promise { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { - const body: CollectionResponseExtensionActionDefinitionForwardPaging = ObjectSerializer.deserialize( + const body: CollectionResponsePublicActionDefinitionForwardPaging = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "CollectionResponseExtensionActionDefinitionForwardPaging", "" - ) as CollectionResponseExtensionActionDefinitionForwardPaging; + "CollectionResponsePublicActionDefinitionForwardPaging", "" + ) as CollectionResponsePublicActionDefinitionForwardPaging; return body; } if (isCodeInRange("0", response.httpStatusCode)) { @@ -430,10 +420,10 @@ export class DefinitionsApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: CollectionResponseExtensionActionDefinitionForwardPaging = ObjectSerializer.deserialize( + const body: CollectionResponsePublicActionDefinitionForwardPaging = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "CollectionResponseExtensionActionDefinitionForwardPaging", "" - ) as CollectionResponseExtensionActionDefinitionForwardPaging; + "CollectionResponsePublicActionDefinitionForwardPaging", "" + ) as CollectionResponsePublicActionDefinitionForwardPaging; return body; } @@ -447,13 +437,13 @@ export class DefinitionsApiResponseProcessor { * @params response Response returned by the server for a request to update * @throws ApiException if the response code was not in [200, 299] */ - public async update(response: ResponseContext): Promise { + public async update(response: ResponseContext): Promise { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { - const body: ExtensionActionDefinition = ObjectSerializer.deserialize( + const body: PublicActionDefinition = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "ExtensionActionDefinition", "" - ) as ExtensionActionDefinition; + "PublicActionDefinition", "" + ) as PublicActionDefinition; return body; } if (isCodeInRange("0", response.httpStatusCode)) { @@ -466,10 +456,10 @@ export class DefinitionsApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: ExtensionActionDefinition = ObjectSerializer.deserialize( + const body: PublicActionDefinition = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "ExtensionActionDefinition", "" - ) as ExtensionActionDefinition; + "PublicActionDefinition", "" + ) as PublicActionDefinition; return body; } diff --git a/codegen/automation/actions/apis/FunctionsApi.ts b/codegen/automation/actions/apis/PublicActionFunctionsApi.ts similarity index 76% rename from codegen/automation/actions/apis/FunctionsApi.ts rename to codegen/automation/actions/apis/PublicActionFunctionsApi.ts index 40bbc919d..be77c581c 100644 --- a/codegen/automation/actions/apis/FunctionsApi.ts +++ b/codegen/automation/actions/apis/PublicActionFunctionsApi.ts @@ -8,47 +8,45 @@ import { isCodeInRange} from '../util'; import {SecurityAuthentication} from '../auth/auth'; -import { ActionFunction } from '../models/ActionFunction'; -import { ActionFunctionIdentifier } from '../models/ActionFunctionIdentifier'; -import { CollectionResponseActionFunctionIdentifierNoPaging } from '../models/CollectionResponseActionFunctionIdentifierNoPaging'; +import { CollectionResponsePublicActionFunctionIdentifierNoPaging } from '../models/CollectionResponsePublicActionFunctionIdentifierNoPaging'; +import { PublicActionFunction } from '../models/PublicActionFunction'; +import { PublicActionFunctionIdentifier } from '../models/PublicActionFunctionIdentifier'; /** * no description */ -export class FunctionsApiRequestFactory extends BaseAPIRequestFactory { +export class PublicActionFunctionsApiRequestFactory extends BaseAPIRequestFactory { /** - * Delete a function for a custom workflow action. This will remove the function itself as well as removing the association between the function and the custom action. This can't be undone. - * Delete a custom action function - * @param definitionId The ID of the custom workflow action - * @param functionType The type of function. This determines when the function will be called. - * @param functionId The ID qualifier for the function. This is used to specify which input field a function is associated with for `PRE_FETCH_OPTIONS` and `POST_FETCH_OPTIONS` function types. + * @param definitionId + * @param functionType + * @param functionId * @param appId */ - public async archive(definitionId: string, functionType: 'PRE_ACTION_EXECUTION' | 'PRE_FETCH_OPTIONS' | 'POST_FETCH_OPTIONS', functionId: string, appId: number, _options?: Configuration): Promise { + public async archive(definitionId: string, functionType: 'PRE_ACTION_EXECUTION' | 'PRE_FETCH_OPTIONS' | 'POST_FETCH_OPTIONS' | 'POST_ACTION_EXECUTION', functionId: string, appId: number, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'definitionId' is not null or undefined if (definitionId === null || definitionId === undefined) { - throw new RequiredError("FunctionsApi", "archive", "definitionId"); + throw new RequiredError("PublicActionFunctionsApi", "archive", "definitionId"); } // verify required parameter 'functionType' is not null or undefined if (functionType === null || functionType === undefined) { - throw new RequiredError("FunctionsApi", "archive", "functionType"); + throw new RequiredError("PublicActionFunctionsApi", "archive", "functionType"); } // verify required parameter 'functionId' is not null or undefined if (functionId === null || functionId === undefined) { - throw new RequiredError("FunctionsApi", "archive", "functionId"); + throw new RequiredError("PublicActionFunctionsApi", "archive", "functionId"); } // verify required parameter 'appId' is not null or undefined if (appId === null || appId === undefined) { - throw new RequiredError("FunctionsApi", "archive", "appId"); + throw new RequiredError("PublicActionFunctionsApi", "archive", "appId"); } @@ -80,30 +78,28 @@ export class FunctionsApiRequestFactory extends BaseAPIRequestFactory { } /** - * Delete a function for a custom workflow action. This will remove the function itself as well as removing the association between the function and the custom action. This can't be undone. - * Delete a custom action function - * @param definitionId The ID of the custom workflow action. - * @param functionType The type of function. This determines when the function will be called. + * @param definitionId + * @param functionType * @param appId */ - public async archiveByFunctionType(definitionId: string, functionType: 'PRE_ACTION_EXECUTION' | 'PRE_FETCH_OPTIONS' | 'POST_FETCH_OPTIONS', appId: number, _options?: Configuration): Promise { + public async archiveByFunctionType(definitionId: string, functionType: 'PRE_ACTION_EXECUTION' | 'PRE_FETCH_OPTIONS' | 'POST_FETCH_OPTIONS' | 'POST_ACTION_EXECUTION', appId: number, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'definitionId' is not null or undefined if (definitionId === null || definitionId === undefined) { - throw new RequiredError("FunctionsApi", "archiveByFunctionType", "definitionId"); + throw new RequiredError("PublicActionFunctionsApi", "archiveByFunctionType", "definitionId"); } // verify required parameter 'functionType' is not null or undefined if (functionType === null || functionType === undefined) { - throw new RequiredError("FunctionsApi", "archiveByFunctionType", "functionType"); + throw new RequiredError("PublicActionFunctionsApi", "archiveByFunctionType", "functionType"); } // verify required parameter 'appId' is not null or undefined if (appId === null || appId === undefined) { - throw new RequiredError("FunctionsApi", "archiveByFunctionType", "appId"); + throw new RequiredError("PublicActionFunctionsApi", "archiveByFunctionType", "appId"); } @@ -134,44 +130,42 @@ export class FunctionsApiRequestFactory extends BaseAPIRequestFactory { } /** - * Creates or replaces a function for a custom workflow action. - * Create or replace a custom action function - * @param definitionId The ID of the custom workflow action. - * @param functionType The type of function. This determines when the function will be called. - * @param functionId The ID qualifier for the function. This is used to specify which input field a function is associated with for `PRE_FETCH_OPTIONS` and `POST_FETCH_OPTIONS` function types. + * @param definitionId + * @param functionType + * @param functionId * @param appId - * @param body The function source code. Must be valid JavaScript code. + * @param body */ - public async createOrReplace(definitionId: string, functionType: 'PRE_ACTION_EXECUTION' | 'PRE_FETCH_OPTIONS' | 'POST_FETCH_OPTIONS', functionId: string, appId: number, body: string, _options?: Configuration): Promise { + public async createOrReplace(definitionId: string, functionType: 'PRE_ACTION_EXECUTION' | 'PRE_FETCH_OPTIONS' | 'POST_FETCH_OPTIONS' | 'POST_ACTION_EXECUTION', functionId: string, appId: number, body: string, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'definitionId' is not null or undefined if (definitionId === null || definitionId === undefined) { - throw new RequiredError("FunctionsApi", "createOrReplace", "definitionId"); + throw new RequiredError("PublicActionFunctionsApi", "createOrReplace", "definitionId"); } // verify required parameter 'functionType' is not null or undefined if (functionType === null || functionType === undefined) { - throw new RequiredError("FunctionsApi", "createOrReplace", "functionType"); + throw new RequiredError("PublicActionFunctionsApi", "createOrReplace", "functionType"); } // verify required parameter 'functionId' is not null or undefined if (functionId === null || functionId === undefined) { - throw new RequiredError("FunctionsApi", "createOrReplace", "functionId"); + throw new RequiredError("PublicActionFunctionsApi", "createOrReplace", "functionId"); } // verify required parameter 'appId' is not null or undefined if (appId === null || appId === undefined) { - throw new RequiredError("FunctionsApi", "createOrReplace", "appId"); + throw new RequiredError("PublicActionFunctionsApi", "createOrReplace", "appId"); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { - throw new RequiredError("FunctionsApi", "createOrReplace", "body"); + throw new RequiredError("PublicActionFunctionsApi", "createOrReplace", "body"); } @@ -214,37 +208,35 @@ export class FunctionsApiRequestFactory extends BaseAPIRequestFactory { } /** - * Creates or replaces a function for a custom workflow action. - * Create or replace a custom action function - * @param definitionId The ID of the custom workflow action. - * @param functionType The type of function. This determines when the function will be called. + * @param definitionId + * @param functionType * @param appId - * @param body The function source code. Must be valid JavaScript code. + * @param body */ - public async createOrReplaceByFunctionType(definitionId: string, functionType: 'PRE_ACTION_EXECUTION' | 'PRE_FETCH_OPTIONS' | 'POST_FETCH_OPTIONS', appId: number, body: string, _options?: Configuration): Promise { + public async createOrReplaceByFunctionType(definitionId: string, functionType: 'PRE_ACTION_EXECUTION' | 'PRE_FETCH_OPTIONS' | 'POST_FETCH_OPTIONS' | 'POST_ACTION_EXECUTION', appId: number, body: string, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'definitionId' is not null or undefined if (definitionId === null || definitionId === undefined) { - throw new RequiredError("FunctionsApi", "createOrReplaceByFunctionType", "definitionId"); + throw new RequiredError("PublicActionFunctionsApi", "createOrReplaceByFunctionType", "definitionId"); } // verify required parameter 'functionType' is not null or undefined if (functionType === null || functionType === undefined) { - throw new RequiredError("FunctionsApi", "createOrReplaceByFunctionType", "functionType"); + throw new RequiredError("PublicActionFunctionsApi", "createOrReplaceByFunctionType", "functionType"); } // verify required parameter 'appId' is not null or undefined if (appId === null || appId === undefined) { - throw new RequiredError("FunctionsApi", "createOrReplaceByFunctionType", "appId"); + throw new RequiredError("PublicActionFunctionsApi", "createOrReplaceByFunctionType", "appId"); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { - throw new RequiredError("FunctionsApi", "createOrReplaceByFunctionType", "body"); + throw new RequiredError("PublicActionFunctionsApi", "createOrReplaceByFunctionType", "body"); } @@ -286,30 +278,28 @@ export class FunctionsApiRequestFactory extends BaseAPIRequestFactory { } /** - * Returns the given function for a custom workflow action. - * Get a custom action function - * @param definitionId The ID of the custom workflow action. - * @param functionType The type of function. This determines when the function will be called. + * @param definitionId + * @param functionType * @param appId */ - public async getByFunctionType(definitionId: string, functionType: 'PRE_ACTION_EXECUTION' | 'PRE_FETCH_OPTIONS' | 'POST_FETCH_OPTIONS', appId: number, _options?: Configuration): Promise { + public async getByFunctionType(definitionId: string, functionType: 'PRE_ACTION_EXECUTION' | 'PRE_FETCH_OPTIONS' | 'POST_FETCH_OPTIONS' | 'POST_ACTION_EXECUTION', appId: number, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'definitionId' is not null or undefined if (definitionId === null || definitionId === undefined) { - throw new RequiredError("FunctionsApi", "getByFunctionType", "definitionId"); + throw new RequiredError("PublicActionFunctionsApi", "getByFunctionType", "definitionId"); } // verify required parameter 'functionType' is not null or undefined if (functionType === null || functionType === undefined) { - throw new RequiredError("FunctionsApi", "getByFunctionType", "functionType"); + throw new RequiredError("PublicActionFunctionsApi", "getByFunctionType", "functionType"); } // verify required parameter 'appId' is not null or undefined if (appId === null || appId === undefined) { - throw new RequiredError("FunctionsApi", "getByFunctionType", "appId"); + throw new RequiredError("PublicActionFunctionsApi", "getByFunctionType", "appId"); } @@ -340,37 +330,35 @@ export class FunctionsApiRequestFactory extends BaseAPIRequestFactory { } /** - * Returns the given function for a custom workflow action. - * Get a custom action function - * @param definitionId The ID of the custom workflow action. - * @param functionType The type of function. This determines when the function will be called. - * @param functionId The ID qualifier for the function. This is used to specify which input field a function is associated with for `PRE_FETCH_OPTIONS` and `POST_FETCH_OPTIONS` function types. + * @param definitionId + * @param functionType + * @param functionId * @param appId */ - public async getById(definitionId: string, functionType: 'PRE_ACTION_EXECUTION' | 'PRE_FETCH_OPTIONS' | 'POST_FETCH_OPTIONS', functionId: string, appId: number, _options?: Configuration): Promise { + public async getById(definitionId: string, functionType: 'PRE_ACTION_EXECUTION' | 'PRE_FETCH_OPTIONS' | 'POST_FETCH_OPTIONS' | 'POST_ACTION_EXECUTION', functionId: string, appId: number, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'definitionId' is not null or undefined if (definitionId === null || definitionId === undefined) { - throw new RequiredError("FunctionsApi", "getById", "definitionId"); + throw new RequiredError("PublicActionFunctionsApi", "getById", "definitionId"); } // verify required parameter 'functionType' is not null or undefined if (functionType === null || functionType === undefined) { - throw new RequiredError("FunctionsApi", "getById", "functionType"); + throw new RequiredError("PublicActionFunctionsApi", "getById", "functionType"); } // verify required parameter 'functionId' is not null or undefined if (functionId === null || functionId === undefined) { - throw new RequiredError("FunctionsApi", "getById", "functionId"); + throw new RequiredError("PublicActionFunctionsApi", "getById", "functionId"); } // verify required parameter 'appId' is not null or undefined if (appId === null || appId === undefined) { - throw new RequiredError("FunctionsApi", "getById", "appId"); + throw new RequiredError("PublicActionFunctionsApi", "getById", "appId"); } @@ -402,9 +390,7 @@ export class FunctionsApiRequestFactory extends BaseAPIRequestFactory { } /** - * Returns a list of all functions that are associated with the given custom workflow action. - * Get all custom action functions - * @param definitionId The ID of the custom workflow action. + * @param definitionId * @param appId */ public async getPage(definitionId: string, appId: number, _options?: Configuration): Promise { @@ -412,13 +398,13 @@ export class FunctionsApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'definitionId' is not null or undefined if (definitionId === null || definitionId === undefined) { - throw new RequiredError("FunctionsApi", "getPage", "definitionId"); + throw new RequiredError("PublicActionFunctionsApi", "getPage", "definitionId"); } // verify required parameter 'appId' is not null or undefined if (appId === null || appId === undefined) { - throw new RequiredError("FunctionsApi", "getPage", "appId"); + throw new RequiredError("PublicActionFunctionsApi", "getPage", "appId"); } @@ -449,7 +435,7 @@ export class FunctionsApiRequestFactory extends BaseAPIRequestFactory { } -export class FunctionsApiResponseProcessor { +export class PublicActionFunctionsApiResponseProcessor { /** * Unwraps the actual response sent by the server from the response context and deserializes the response content @@ -522,13 +508,13 @@ export class FunctionsApiResponseProcessor { * @params response Response returned by the server for a request to createOrReplace * @throws ApiException if the response code was not in [200, 299] */ - public async createOrReplace(response: ResponseContext): Promise { + public async createOrReplace(response: ResponseContext): Promise { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { - const body: ActionFunctionIdentifier = ObjectSerializer.deserialize( + const body: PublicActionFunctionIdentifier = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "ActionFunctionIdentifier", "" - ) as ActionFunctionIdentifier; + "PublicActionFunctionIdentifier", "" + ) as PublicActionFunctionIdentifier; return body; } if (isCodeInRange("0", response.httpStatusCode)) { @@ -541,10 +527,10 @@ export class FunctionsApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: ActionFunctionIdentifier = ObjectSerializer.deserialize( + const body: PublicActionFunctionIdentifier = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "ActionFunctionIdentifier", "" - ) as ActionFunctionIdentifier; + "PublicActionFunctionIdentifier", "" + ) as PublicActionFunctionIdentifier; return body; } @@ -558,13 +544,13 @@ export class FunctionsApiResponseProcessor { * @params response Response returned by the server for a request to createOrReplaceByFunctionType * @throws ApiException if the response code was not in [200, 299] */ - public async createOrReplaceByFunctionType(response: ResponseContext): Promise { + public async createOrReplaceByFunctionType(response: ResponseContext): Promise { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { - const body: ActionFunctionIdentifier = ObjectSerializer.deserialize( + const body: PublicActionFunctionIdentifier = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "ActionFunctionIdentifier", "" - ) as ActionFunctionIdentifier; + "PublicActionFunctionIdentifier", "" + ) as PublicActionFunctionIdentifier; return body; } if (isCodeInRange("0", response.httpStatusCode)) { @@ -577,10 +563,10 @@ export class FunctionsApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: ActionFunctionIdentifier = ObjectSerializer.deserialize( + const body: PublicActionFunctionIdentifier = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "ActionFunctionIdentifier", "" - ) as ActionFunctionIdentifier; + "PublicActionFunctionIdentifier", "" + ) as PublicActionFunctionIdentifier; return body; } @@ -594,13 +580,13 @@ export class FunctionsApiResponseProcessor { * @params response Response returned by the server for a request to getByFunctionType * @throws ApiException if the response code was not in [200, 299] */ - public async getByFunctionType(response: ResponseContext): Promise { + public async getByFunctionType(response: ResponseContext): Promise { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { - const body: ActionFunction = ObjectSerializer.deserialize( + const body: PublicActionFunction = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "ActionFunction", "" - ) as ActionFunction; + "PublicActionFunction", "" + ) as PublicActionFunction; return body; } if (isCodeInRange("0", response.httpStatusCode)) { @@ -613,10 +599,10 @@ export class FunctionsApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: ActionFunction = ObjectSerializer.deserialize( + const body: PublicActionFunction = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "ActionFunction", "" - ) as ActionFunction; + "PublicActionFunction", "" + ) as PublicActionFunction; return body; } @@ -630,13 +616,13 @@ export class FunctionsApiResponseProcessor { * @params response Response returned by the server for a request to getById * @throws ApiException if the response code was not in [200, 299] */ - public async getById(response: ResponseContext): Promise { + public async getById(response: ResponseContext): Promise { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { - const body: ActionFunction = ObjectSerializer.deserialize( + const body: PublicActionFunction = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "ActionFunction", "" - ) as ActionFunction; + "PublicActionFunction", "" + ) as PublicActionFunction; return body; } if (isCodeInRange("0", response.httpStatusCode)) { @@ -649,10 +635,10 @@ export class FunctionsApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: ActionFunction = ObjectSerializer.deserialize( + const body: PublicActionFunction = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "ActionFunction", "" - ) as ActionFunction; + "PublicActionFunction", "" + ) as PublicActionFunction; return body; } @@ -666,13 +652,13 @@ export class FunctionsApiResponseProcessor { * @params response Response returned by the server for a request to getPage * @throws ApiException if the response code was not in [200, 299] */ - public async getPage(response: ResponseContext): Promise { + public async getPage(response: ResponseContext): Promise { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { - const body: CollectionResponseActionFunctionIdentifierNoPaging = ObjectSerializer.deserialize( + const body: CollectionResponsePublicActionFunctionIdentifierNoPaging = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "CollectionResponseActionFunctionIdentifierNoPaging", "" - ) as CollectionResponseActionFunctionIdentifierNoPaging; + "CollectionResponsePublicActionFunctionIdentifierNoPaging", "" + ) as CollectionResponsePublicActionFunctionIdentifierNoPaging; return body; } if (isCodeInRange("0", response.httpStatusCode)) { @@ -685,10 +671,10 @@ export class FunctionsApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: CollectionResponseActionFunctionIdentifierNoPaging = ObjectSerializer.deserialize( + const body: CollectionResponsePublicActionFunctionIdentifierNoPaging = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "CollectionResponseActionFunctionIdentifierNoPaging", "" - ) as CollectionResponseActionFunctionIdentifierNoPaging; + "CollectionResponsePublicActionFunctionIdentifierNoPaging", "" + ) as CollectionResponsePublicActionFunctionIdentifierNoPaging; return body; } diff --git a/codegen/automation/actions/apis/RevisionsApi.ts b/codegen/automation/actions/apis/PublicActionRevisionsApi.ts similarity index 78% rename from codegen/automation/actions/apis/RevisionsApi.ts rename to codegen/automation/actions/apis/PublicActionRevisionsApi.ts index a6b31af25..311f8c6ed 100644 --- a/codegen/automation/actions/apis/RevisionsApi.ts +++ b/codegen/automation/actions/apis/PublicActionRevisionsApi.ts @@ -8,19 +8,17 @@ import { isCodeInRange} from '../util'; import {SecurityAuthentication} from '../auth/auth'; -import { ActionRevision } from '../models/ActionRevision'; -import { CollectionResponseActionRevisionForwardPaging } from '../models/CollectionResponseActionRevisionForwardPaging'; +import { CollectionResponsePublicActionRevisionForwardPaging } from '../models/CollectionResponsePublicActionRevisionForwardPaging'; +import { PublicActionRevision } from '../models/PublicActionRevision'; /** * no description */ -export class RevisionsApiRequestFactory extends BaseAPIRequestFactory { +export class PublicActionRevisionsApiRequestFactory extends BaseAPIRequestFactory { /** - * Returns the given version of a custom workflow action. - * Get a revision for a custom action - * @param definitionId The ID of the custom workflow action. - * @param revisionId The version of the custom workflow action. + * @param definitionId + * @param revisionId * @param appId */ public async getById(definitionId: string, revisionId: string, appId: number, _options?: Configuration): Promise { @@ -28,19 +26,19 @@ export class RevisionsApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'definitionId' is not null or undefined if (definitionId === null || definitionId === undefined) { - throw new RequiredError("RevisionsApi", "getById", "definitionId"); + throw new RequiredError("PublicActionRevisionsApi", "getById", "definitionId"); } // verify required parameter 'revisionId' is not null or undefined if (revisionId === null || revisionId === undefined) { - throw new RequiredError("RevisionsApi", "getById", "revisionId"); + throw new RequiredError("PublicActionRevisionsApi", "getById", "revisionId"); } // verify required parameter 'appId' is not null or undefined if (appId === null || appId === undefined) { - throw new RequiredError("RevisionsApi", "getById", "appId"); + throw new RequiredError("PublicActionRevisionsApi", "getById", "appId"); } @@ -71,11 +69,9 @@ export class RevisionsApiRequestFactory extends BaseAPIRequestFactory { } /** - * Returns a list of revisions for a custom workflow action. - * Get all revisions for a custom action - * @param definitionId The ID of the custom workflow action + * @param definitionId * @param appId - * @param limit Maximum number of results per page. + * @param limit The maximum number of results to display per page. * @param after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. */ public async getPage(definitionId: string, appId: number, limit?: number, after?: string, _options?: Configuration): Promise { @@ -83,13 +79,13 @@ export class RevisionsApiRequestFactory extends BaseAPIRequestFactory { // verify required parameter 'definitionId' is not null or undefined if (definitionId === null || definitionId === undefined) { - throw new RequiredError("RevisionsApi", "getPage", "definitionId"); + throw new RequiredError("PublicActionRevisionsApi", "getPage", "definitionId"); } // verify required parameter 'appId' is not null or undefined if (appId === null || appId === undefined) { - throw new RequiredError("RevisionsApi", "getPage", "appId"); + throw new RequiredError("PublicActionRevisionsApi", "getPage", "appId"); } @@ -132,7 +128,7 @@ export class RevisionsApiRequestFactory extends BaseAPIRequestFactory { } -export class RevisionsApiResponseProcessor { +export class PublicActionRevisionsApiResponseProcessor { /** * Unwraps the actual response sent by the server from the response context and deserializes the response content @@ -141,13 +137,13 @@ export class RevisionsApiResponseProcessor { * @params response Response returned by the server for a request to getById * @throws ApiException if the response code was not in [200, 299] */ - public async getById(response: ResponseContext): Promise { + public async getById(response: ResponseContext): Promise { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { - const body: ActionRevision = ObjectSerializer.deserialize( + const body: PublicActionRevision = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "ActionRevision", "" - ) as ActionRevision; + "PublicActionRevision", "" + ) as PublicActionRevision; return body; } if (isCodeInRange("0", response.httpStatusCode)) { @@ -160,10 +156,10 @@ export class RevisionsApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: ActionRevision = ObjectSerializer.deserialize( + const body: PublicActionRevision = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "ActionRevision", "" - ) as ActionRevision; + "PublicActionRevision", "" + ) as PublicActionRevision; return body; } @@ -177,13 +173,13 @@ export class RevisionsApiResponseProcessor { * @params response Response returned by the server for a request to getPage * @throws ApiException if the response code was not in [200, 299] */ - public async getPage(response: ResponseContext): Promise { + public async getPage(response: ResponseContext): Promise { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { - const body: CollectionResponseActionRevisionForwardPaging = ObjectSerializer.deserialize( + const body: CollectionResponsePublicActionRevisionForwardPaging = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "CollectionResponseActionRevisionForwardPaging", "" - ) as CollectionResponseActionRevisionForwardPaging; + "CollectionResponsePublicActionRevisionForwardPaging", "" + ) as CollectionResponsePublicActionRevisionForwardPaging; return body; } if (isCodeInRange("0", response.httpStatusCode)) { @@ -196,10 +192,10 @@ export class RevisionsApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: CollectionResponseActionRevisionForwardPaging = ObjectSerializer.deserialize( + const body: CollectionResponsePublicActionRevisionForwardPaging = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "CollectionResponseActionRevisionForwardPaging", "" - ) as CollectionResponseActionRevisionForwardPaging; + "CollectionResponsePublicActionRevisionForwardPaging", "" + ) as CollectionResponsePublicActionRevisionForwardPaging; return body; } diff --git a/codegen/automation/actions/apis/CallbacksApi.ts b/codegen/automation/actions/apis/PublicCallbacksApi.ts similarity index 90% rename from codegen/automation/actions/apis/CallbacksApi.ts rename to codegen/automation/actions/apis/PublicCallbacksApi.ts index f5d7826b7..763913eb9 100644 --- a/codegen/automation/actions/apis/CallbacksApi.ts +++ b/codegen/automation/actions/apis/PublicCallbacksApi.ts @@ -14,26 +14,24 @@ import { CallbackCompletionRequest } from '../models/CallbackCompletionRequest'; /** * no description */ -export class CallbacksApiRequestFactory extends BaseAPIRequestFactory { +export class PublicCallbacksApiRequestFactory extends BaseAPIRequestFactory { /** - * Completes the given action callback. - * Complete a callback - * @param callbackId The ID of the target app. - * @param callbackCompletionRequest The result of the completed action. + * @param callbackId + * @param callbackCompletionRequest */ public async complete(callbackId: string, callbackCompletionRequest: CallbackCompletionRequest, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'callbackId' is not null or undefined if (callbackId === null || callbackId === undefined) { - throw new RequiredError("CallbacksApi", "complete", "callbackId"); + throw new RequiredError("PublicCallbacksApi", "complete", "callbackId"); } // verify required parameter 'callbackCompletionRequest' is not null or undefined if (callbackCompletionRequest === null || callbackCompletionRequest === undefined) { - throw new RequiredError("CallbacksApi", "complete", "callbackCompletionRequest"); + throw new RequiredError("PublicCallbacksApi", "complete", "callbackCompletionRequest"); } @@ -73,16 +71,14 @@ export class CallbacksApiRequestFactory extends BaseAPIRequestFactory { } /** - * Completes the given action callbacks. - * Complete a batch of callbacks - * @param batchInputCallbackCompletionBatchRequest The result of the completed action. + * @param batchInputCallbackCompletionBatchRequest */ public async completeBatch(batchInputCallbackCompletionBatchRequest: BatchInputCallbackCompletionBatchRequest, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'batchInputCallbackCompletionBatchRequest' is not null or undefined if (batchInputCallbackCompletionBatchRequest === null || batchInputCallbackCompletionBatchRequest === undefined) { - throw new RequiredError("CallbacksApi", "completeBatch", "batchInputCallbackCompletionBatchRequest"); + throw new RequiredError("PublicCallbacksApi", "completeBatch", "batchInputCallbackCompletionBatchRequest"); } @@ -122,7 +118,7 @@ export class CallbacksApiRequestFactory extends BaseAPIRequestFactory { } -export class CallbacksApiResponseProcessor { +export class PublicCallbacksApiResponseProcessor { /** * Unwraps the actual response sent by the server from the response context and deserializes the response content diff --git a/codegen/automation/actions/index.ts b/codegen/automation/actions/index.ts index 4a82efe79..a03bde11f 100644 --- a/codegen/automation/actions/index.ts +++ b/codegen/automation/actions/index.ts @@ -8,5 +8,5 @@ export * from "./servers"; export { RequiredError } from "./apis/baseapi"; export { PromiseMiddleware as Middleware } from './middleware'; -export { PromiseCallbacksApi as CallbacksApi, PromiseDefinitionsApi as DefinitionsApi, PromiseFunctionsApi as FunctionsApi, PromiseRevisionsApi as RevisionsApi } from './types/PromiseAPI'; +export { PromisePublicActionDefinitionsApi as PublicActionDefinitionsApi, PromisePublicActionFunctionsApi as PublicActionFunctionsApi, PromisePublicActionRevisionsApi as PublicActionRevisionsApi, PromisePublicCallbacksApi as PublicCallbacksApi } from './types/PromiseAPI'; diff --git a/codegen/automation/actions/models/ActionFunctionIdentifier.ts b/codegen/automation/actions/models/ActionFunctionIdentifier.ts deleted file mode 100644 index 4cad6c668..000000000 --- a/codegen/automation/actions/models/ActionFunctionIdentifier.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Custom Workflow Actions - * Create custom workflow actions - * - * OpenAPI spec version: v4 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -/** -* A serverless function associated with this custom workflow action. -*/ -export class ActionFunctionIdentifier { - /** - * The type of function. This determines when the function will be called. - */ - 'functionType': ActionFunctionIdentifierFunctionTypeEnum; - /** - * The ID qualifier for the function. This is used to specify which input field a function is associated with for `PRE_FETCH_OPTIONS` and `POST_FETCH_OPTIONS` function types. - */ - 'id'?: string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "functionType", - "baseName": "functionType", - "type": "ActionFunctionIdentifierFunctionTypeEnum", - "format": "" - }, - { - "name": "id", - "baseName": "id", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return ActionFunctionIdentifier.attributeTypeMap; - } - - public constructor() { - } -} - - -export type ActionFunctionIdentifierFunctionTypeEnum = "PRE_ACTION_EXECUTION" | "PRE_FETCH_OPTIONS" | "POST_FETCH_OPTIONS" ; - diff --git a/codegen/automation/actions/models/BatchInputCallbackCompletionBatchRequest.ts b/codegen/automation/actions/models/BatchInputCallbackCompletionBatchRequest.ts index 3af78c4ec..a44bb7050 100644 --- a/codegen/automation/actions/models/BatchInputCallbackCompletionBatchRequest.ts +++ b/codegen/automation/actions/models/BatchInputCallbackCompletionBatchRequest.ts @@ -1,6 +1,6 @@ /** - * Custom Workflow Actions - * Create custom workflow actions + * Actions V4 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v4 * diff --git a/codegen/automation/actions/models/CallbackCompletionBatchRequest.ts b/codegen/automation/actions/models/CallbackCompletionBatchRequest.ts index aec2c79b3..11252a045 100644 --- a/codegen/automation/actions/models/CallbackCompletionBatchRequest.ts +++ b/codegen/automation/actions/models/CallbackCompletionBatchRequest.ts @@ -1,6 +1,6 @@ /** - * Custom Workflow Actions - * Create custom workflow actions + * Actions V4 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v4 * @@ -11,33 +11,24 @@ */ -/** -* Any information to send back to Workflows when completing an action callback as part of a batch request. -*/ export class CallbackCompletionBatchRequest { - /** - * The ID of the callback to complete. - */ - 'callbackId': string; - /** - * A map of action output names and values. - */ 'outputFields': { [key: string]: string; }; + 'callbackId': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "callbackId", - "baseName": "callbackId", - "type": "string", - "format": "" - }, { "name": "outputFields", "baseName": "outputFields", "type": "{ [key: string]: string; }", "format": "" + }, + { + "name": "callbackId", + "baseName": "callbackId", + "type": "string", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/automation/actions/models/CallbackCompletionRequest.ts b/codegen/automation/actions/models/CallbackCompletionRequest.ts index feceb4b4b..bab887c3a 100644 --- a/codegen/automation/actions/models/CallbackCompletionRequest.ts +++ b/codegen/automation/actions/models/CallbackCompletionRequest.ts @@ -1,6 +1,6 @@ /** - * Custom Workflow Actions - * Create custom workflow actions + * Actions V4 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v4 * @@ -11,13 +11,7 @@ */ -/** -* Any information to send back to Workflows when completing an action callback. -*/ export class CallbackCompletionRequest { - /** - * A map of action output names and values. - */ 'outputFields': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; diff --git a/codegen/automation/actions/models/CollectionResponseExtensionActionDefinitionForwardPaging.ts b/codegen/automation/actions/models/CollectionResponsePublicActionDefinitionForwardPaging.ts similarity index 64% rename from codegen/automation/actions/models/CollectionResponseExtensionActionDefinitionForwardPaging.ts rename to codegen/automation/actions/models/CollectionResponsePublicActionDefinitionForwardPaging.ts index dd9fe60a0..571682bb6 100644 --- a/codegen/automation/actions/models/CollectionResponseExtensionActionDefinitionForwardPaging.ts +++ b/codegen/automation/actions/models/CollectionResponsePublicActionDefinitionForwardPaging.ts @@ -1,6 +1,6 @@ /** - * Custom Workflow Actions - * Create custom workflow actions + * Actions V4 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v4 * @@ -10,31 +10,31 @@ * Do not edit the class manually. */ -import { ExtensionActionDefinition } from '../models/ExtensionActionDefinition'; import { ForwardPaging } from '../models/ForwardPaging'; +import { PublicActionDefinition } from '../models/PublicActionDefinition'; -export class CollectionResponseExtensionActionDefinitionForwardPaging { - 'results': Array; +export class CollectionResponsePublicActionDefinitionForwardPaging { 'paging'?: ForwardPaging; + 'results': Array; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "results", - "baseName": "results", - "type": "Array", - "format": "" - }, { "name": "paging", "baseName": "paging", "type": "ForwardPaging", "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" } ]; static getAttributeTypeMap() { - return CollectionResponseExtensionActionDefinitionForwardPaging.attributeTypeMap; + return CollectionResponsePublicActionDefinitionForwardPaging.attributeTypeMap; } public constructor() { diff --git a/codegen/automation/actions/models/CollectionResponseActionFunctionIdentifierNoPaging.ts b/codegen/automation/actions/models/CollectionResponsePublicActionFunctionIdentifierNoPaging.ts similarity index 54% rename from codegen/automation/actions/models/CollectionResponseActionFunctionIdentifierNoPaging.ts rename to codegen/automation/actions/models/CollectionResponsePublicActionFunctionIdentifierNoPaging.ts index b0fba8a41..be7711311 100644 --- a/codegen/automation/actions/models/CollectionResponseActionFunctionIdentifierNoPaging.ts +++ b/codegen/automation/actions/models/CollectionResponsePublicActionFunctionIdentifierNoPaging.ts @@ -1,6 +1,6 @@ /** - * Custom Workflow Actions - * Create custom workflow actions + * Actions V4 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v4 * @@ -10,10 +10,10 @@ * Do not edit the class manually. */ -import { ActionFunctionIdentifier } from '../models/ActionFunctionIdentifier'; +import { PublicActionFunctionIdentifier } from '../models/PublicActionFunctionIdentifier'; -export class CollectionResponseActionFunctionIdentifierNoPaging { - 'results': Array; +export class CollectionResponsePublicActionFunctionIdentifierNoPaging { + 'results': Array; static readonly discriminator: string | undefined = undefined; @@ -21,12 +21,12 @@ export class CollectionResponseActionFunctionIdentifierNoPaging { { "name": "results", "baseName": "results", - "type": "Array", + "type": "Array", "format": "" } ]; static getAttributeTypeMap() { - return CollectionResponseActionFunctionIdentifierNoPaging.attributeTypeMap; + return CollectionResponsePublicActionFunctionIdentifierNoPaging.attributeTypeMap; } public constructor() { diff --git a/codegen/automation/actions/models/CollectionResponseActionRevisionForwardPaging.ts b/codegen/automation/actions/models/CollectionResponsePublicActionRevisionForwardPaging.ts similarity index 65% rename from codegen/automation/actions/models/CollectionResponseActionRevisionForwardPaging.ts rename to codegen/automation/actions/models/CollectionResponsePublicActionRevisionForwardPaging.ts index 94f47c977..2fcef9855 100644 --- a/codegen/automation/actions/models/CollectionResponseActionRevisionForwardPaging.ts +++ b/codegen/automation/actions/models/CollectionResponsePublicActionRevisionForwardPaging.ts @@ -1,6 +1,6 @@ /** - * Custom Workflow Actions - * Create custom workflow actions + * Actions V4 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v4 * @@ -10,31 +10,31 @@ * Do not edit the class manually. */ -import { ActionRevision } from '../models/ActionRevision'; import { ForwardPaging } from '../models/ForwardPaging'; +import { PublicActionRevision } from '../models/PublicActionRevision'; -export class CollectionResponseActionRevisionForwardPaging { - 'results': Array; +export class CollectionResponsePublicActionRevisionForwardPaging { 'paging'?: ForwardPaging; + 'results': Array; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "results", - "baseName": "results", - "type": "Array", - "format": "" - }, { "name": "paging", "baseName": "paging", "type": "ForwardPaging", "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" } ]; static getAttributeTypeMap() { - return CollectionResponseActionRevisionForwardPaging.attributeTypeMap; + return CollectionResponsePublicActionRevisionForwardPaging.attributeTypeMap; } public constructor() { diff --git a/codegen/automation/actions/models/ErrorDetail.ts b/codegen/automation/actions/models/ErrorDetail.ts index 99af87608..4d4021350 100644 --- a/codegen/automation/actions/models/ErrorDetail.ts +++ b/codegen/automation/actions/models/ErrorDetail.ts @@ -1,6 +1,6 @@ /** - * Custom Workflow Actions - * Create custom workflow actions + * Actions V4 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v4 * @@ -13,38 +13,32 @@ export class ErrorDetail { /** - * A human readable message describing the error along with remediation steps where appropriate - */ - 'message': string; - /** - * The name of the field or parameter in which the error was found. + * A specific category that contains more specific detail about the error */ - '_in'?: string; + 'subCategory'?: string; /** * The status code associated with the error detail */ 'code'?: string; /** - * A specific category that contains more specific detail about the error + * The name of the field or parameter in which the error was found. */ - 'subCategory'?: string; + '_in'?: string; /** * Context about the error condition */ 'context'?: { [key: string]: Array; }; + /** + * A human readable message describing the error along with remediation steps where appropriate + */ + 'message': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "message", - "baseName": "message", - "type": "string", - "format": "" - }, - { - "name": "_in", - "baseName": "in", + "name": "subCategory", + "baseName": "subCategory", "type": "string", "format": "" }, @@ -55,8 +49,8 @@ export class ErrorDetail { "format": "" }, { - "name": "subCategory", - "baseName": "subCategory", + "name": "_in", + "baseName": "in", "type": "string", "format": "" }, @@ -65,6 +59,12 @@ export class ErrorDetail { "baseName": "context", "type": "{ [key: string]: Array; }", "format": "" + }, + { + "name": "message", + "baseName": "message", + "type": "string", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/automation/actions/models/FieldTypeDefinition.ts b/codegen/automation/actions/models/FieldTypeDefinition.ts index 6e16428c9..60638df7e 100644 --- a/codegen/automation/actions/models/FieldTypeDefinition.ts +++ b/codegen/automation/actions/models/FieldTypeDefinition.ts @@ -1,6 +1,6 @@ /** - * Custom Workflow Actions - * Create custom workflow actions + * Actions V4 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * OpenAPI spec version: v4 * @@ -12,44 +12,64 @@ import { Option } from '../models/Option'; -/** -* The data type expected by an input field. -*/ export class FieldTypeDefinition { - /** - * The input field name. - */ + 'helpText'?: string; + 'referencedObjectType'?: FieldTypeDefinitionReferencedObjectTypeEnum; 'name': string; - /** - * The data type of the field. - */ + 'options': Array