feat: Convert all app files to JS

This commit is contained in:
Faruk AYDIN
2024-01-05 17:44:21 +01:00
parent b95478b635
commit 43dba351c3
1030 changed files with 5114 additions and 6436 deletions

View File

@@ -1,5 +1,5 @@
import defineAction from '../../../../helpers/define-action';
import { filterProvidedFields } from '../../common/filter-provided-fields';
import defineAction from '../../../../helpers/define-action.js';
import { filterProvidedFields } from '../../common/filter-provided-fields.js';
export default defineAction({
name: 'Create deal',
@@ -9,7 +9,7 @@ export default defineAction({
{
label: 'Title',
key: 'title',
type: 'string' as const,
type: 'string',
required: true,
description: '',
variables: true,
@@ -17,7 +17,7 @@ export default defineAction({
{
label: 'Creation Date',
key: 'addTime',
type: 'string' as const,
type: 'string',
required: false,
description:
'Requires admin access to Pipedrive account. Format: YYYY-MM-DD HH:MM:SS',
@@ -26,7 +26,7 @@ export default defineAction({
{
label: 'Status',
key: 'status',
type: 'dropdown' as const,
type: 'dropdown',
required: false,
description: '',
options: [
@@ -51,7 +51,7 @@ export default defineAction({
{
label: 'Lost Reason',
key: 'lostReason',
type: 'string' as const,
type: 'string',
required: false,
description: '',
variables: true,
@@ -59,7 +59,7 @@ export default defineAction({
{
label: 'Stage',
key: 'stageId',
type: 'dropdown' as const,
type: 'dropdown',
required: false,
value: '1',
description:
@@ -94,7 +94,7 @@ export default defineAction({
{
label: 'Owner',
key: 'userId',
type: 'dropdown' as const,
type: 'dropdown',
required: false,
description:
'Select user who will be marked as the owner of this deal. If omitted, the authorized user will be used.',
@@ -113,7 +113,7 @@ export default defineAction({
{
label: 'Organization',
key: 'organizationId',
type: 'dropdown' as const,
type: 'dropdown',
required: false,
description: 'Organization this deal will be associated with.',
variables: true,
@@ -131,7 +131,7 @@ export default defineAction({
{
label: 'Person',
key: 'personId',
type: 'dropdown' as const,
type: 'dropdown',
required: false,
description: 'Person this deal will be associated with.',
variables: true,
@@ -149,7 +149,7 @@ export default defineAction({
{
label: 'Probability',
key: 'probability',
type: 'string' as const,
type: 'string',
required: false,
description:
'The success probability percentage of the deal. Used/shown only when deal_probability for the pipeline of the deal is enabled.',
@@ -158,7 +158,7 @@ export default defineAction({
{
label: 'Expected Close Date',
key: 'expectedCloseDate',
type: 'string' as const,
type: 'string',
required: false,
description:
'The expected close date of the deal. In ISO 8601 format: YYYY-MM-DD.',
@@ -167,7 +167,7 @@ export default defineAction({
{
label: 'Value',
key: 'value',
type: 'string' as const,
type: 'string',
required: false,
description: 'The value of the deal. If omitted, value will be set to 0.',
variables: true,
@@ -175,7 +175,7 @@ export default defineAction({
{
label: 'Currency',
key: 'currency',
type: 'dropdown' as const,
type: 'dropdown',
required: false,
description:
'The currency of the deal. Accepts a 3-character currency code. If omitted, currency will be set to the default currency of the authorized user.',
@@ -210,18 +210,18 @@ export default defineAction({
} = $.step.parameters;
const fields = {
title: title as string,
value: value as string,
add_time: addTime as string,
status: status as string,
lost_reason: lostReason as string,
stage_id: stageId as number,
user_id: userId as number,
org_id: organizationId as number,
person_id: personId as number,
probability: probability as number,
expected_close_date: expectedCloseDate as string,
currency: currency as string,
title: title,
value: value,
add_time: addTime,
status: status,
lost_reason: lostReason,
stage_id: stageId,
user_id: userId,
org_id: organizationId,
person_id: personId,
probability: probability,
expected_close_date: expectedCloseDate,
currency: currency,
};
const body = filterProvidedFields(fields);