Skip to content
Open
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import app from "../../eaccounting.app.mjs";

export default {
key: "eaccounting-create-attachment",
name: "Create Attachment",
description: "Creates a new attachment. [See the documentation](https://developer.vismaonline.com)",
version: "0.0.1",
type: "action",
props: {
app,
data: {
type: "object",
label: "Attachment Data",
description: "The attachment data as a JSON object. [See the API documentation](https://developer.vismaonline.com) for the complete schema. Should include fileName, data (base64), and optional metadata.",
},
},
annotations: {
readOnlyHint: false,
destructiveHint: false,
openWorldHint: true,
},
async run({ $ }) {
const response = await this.app.createAttachment({
$,
data: this.data,
});
$.export("$summary", `Successfully created attachment with ID ${response.id || "N/A"}`);
return response;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import app from "../../eaccounting.app.mjs";

export default {
key: "eaccounting-create-customer-invoice",
name: "Create Customer Invoice",
description: "Creates a new customer invoice. [See the documentation](https://developer.vismaonline.com)",
version: "0.0.1",
type: "action",
props: {
app,
data: {
type: "object",
label: "Invoice Data",
description: "The customer invoice data as a JSON object. [See the API documentation](https://developer.vismaonline.com) for the complete schema.",
},
Comment on lines +11 to +15
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Consider providing a more specific documentation link.

The data prop's description references the generic documentation URL. Linking directly to the CustomerInvoice schema endpoint (e.g., the Swagger docs at https://eaccountingapi.vismaonline.com/swagger/ui/index#/CustomerInvoicesV2) would improve user experience.

     data: {
       type: "object",
       label: "Invoice Data",
-      description: "The customer invoice data as a JSON object. [See the API documentation](https://developer.vismaonline.com) for the complete schema.",
+      description: "The customer invoice data as a JSON object. [See the API documentation](https://eaccountingapi.vismaonline.com/swagger/ui/index#/CustomerInvoicesV2) for the complete schema.",
     },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
data: {
type: "object",
label: "Invoice Data",
description: "The customer invoice data as a JSON object. [See the API documentation](https://developer.vismaonline.com) for the complete schema.",
},
data: {
type: "object",
label: "Invoice Data",
description: "The customer invoice data as a JSON object. [See the API documentation](https://eaccountingapi.vismaonline.com/swagger/ui/index#/CustomerInvoicesV2) for the complete schema.",
},
🤖 Prompt for AI Agents
In
components/eaccounting/actions/create-customer-invoice/create-customer-invoice.mjs
around lines 11 to 15, the data property's description links to a generic API
doc; update that description to point directly to the CustomerInvoice schema
Swagger endpoint (for example
https://eaccountingapi.vismaonline.com/swagger/ui/index#/CustomerInvoicesV2) so
users land on the exact CustomerInvoice docs; replace the existing URL in the
description with the specific endpoint and keep the rest of the text unchanged.

rotReducedAutomaticDistribution: {
type: "boolean",
label: "ROT Reduced Automatic Distribution",
description: "Used for the automatic distribution per person of the ROT reduced invoicing amount",
optional: true,
},
},
annotations: {
readOnlyHint: false,
destructiveHint: false,
openWorldHint: true,
},
async run({ $ }) {
const response = await this.app.createCustomerInvoice({
$,
data: this.data,
params: {
rotReducedAutomaticDistribution: this.rotReducedAutomaticDistribution,
},
});
$.export("$summary", `Successfully created customer invoice with ID ${response.id || "N/A"}`);
return response;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import app from "../../eaccounting.app.mjs";

export default {
key: "eaccounting-create-supplier-invoice",
name: "Create Supplier Invoice",
description: "Creates a new supplier invoice. [See the documentation](https://developer.vismaonline.com)",
version: "0.0.1",
type: "action",
props: {
app,
data: {
type: "object",
label: "Invoice Data",
description: "The supplier invoice data as a JSON object. [See the API documentation](https://developer.vismaonline.com) for the complete schema.",
},
useDefaultVatCodes: {
type: "boolean",
label: "Use Default VAT Codes",
description: "Use default VAT codes",
optional: true,
},
calculateVatOnCostAccounts: {
type: "boolean",
label: "Calculate VAT on Cost Accounts",
description: "Calculate VAT on cost accounts automatically",
optional: true,
},
duplicateCheckExtendedValidation: {
type: "boolean",
label: "Duplicate Check Extended Validation",
description: "Check if the invoice is duplicate",
optional: true,
},
},
annotations: {
readOnlyHint: false,
destructiveHint: false,
openWorldHint: true,
},
async run({ $ }) {
const response = await this.app.createSupplierInvoice({
$,
data: this.data,
params: {
useDefaultVatCodes: this.useDefaultVatCodes,
calculateVatOnCostAccounts: this.calculateVatOnCostAccounts,
duplicateCheckExtendedValidation: this.duplicateCheckExtendedValidation,
},
});
$.export("$summary", `Successfully created supplier invoice with ID ${response.id || "N/A"}`);
return response;
},
};
53 changes: 53 additions & 0 deletions components/eaccounting/actions/create-voucher/create-voucher.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import app from "../../eaccounting.app.mjs";

export default {
key: "eaccounting-create-voucher",
name: "Create Voucher",
description: "Creates a new voucher. [See the documentation](https://developer.vismaonline.com)",
version: "0.0.1",
type: "action",
props: {
app,
data: {
type: "object",
label: "Voucher Data",
description: "The voucher data as a JSON object. [See the API documentation](https://developer.vismaonline.com) for the complete schema.",
},
useAutomaticVatCalculation: {
type: "boolean",
label: "Use Automatic VAT Calculation",
description: "Set to true and specify the sales or purchase gross amount and VAT rows will be added automatically. Default: false",
optional: true,
},
useDefaultVatCodes: {
type: "boolean",
label: "Use Default VAT Codes",
description: "Set to false to override default VAT codes on all rows in the request. Default: true",
optional: true,
},
useDefaultVoucherSeries: {
type: "boolean",
label: "Use Default Voucher Series",
description: "Set to false to override default voucher series. Default: true",
optional: true,
},
},
annotations: {
readOnlyHint: false,
destructiveHint: false,
openWorldHint: true,
},
async run({ $ }) {
const response = await this.app.createVoucher({
$,
data: this.data,
params: {
useAutomaticVatCalculation: this.useAutomaticVatCalculation,
useDefaultVatCodes: this.useDefaultVatCodes,
useDefaultVoucherSeries: this.useDefaultVoucherSeries,
},
});
$.export("$summary", `Successfully created voucher with ID ${response.id || "N/A"}`);
return response;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import app from "../../eaccounting.app.mjs";

export default {
key: "eaccounting-get-account-balance-by-account-number",
name: "Get Account Balance by Account Number",
description: "Retrieves account balance by account number and date. [See the documentation](https://developer.vismaonline.com)",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Consider adding a more specific documentation URL.

The documentation link points to the general developer portal. Consider linking to the specific account balances endpoint documentation.

🤖 Prompt for AI Agents
In
components/eaccounting/actions/get-account-balance-by-account-number/get-account-balance-by-account-number.mjs
around line 6, the description uses the generic developer portal URL; replace it
with the direct documentation URL for the specific "account balances" or "get
account balance by account number" endpoint (for example the API endpoint page
or an anchor that documents account balance parameters and response) so the
comment links developers straight to the relevant endpoint documentation; update
the markdown link to point to that specific page/anchor and keep the rest of the
description unchanged.

version: "0.0.1",
type: "action",
props: {
app,
accountNumber: {
type: "integer",
label: "Account Number",
description: "The account number",
},
date: {
type: "string",
label: "Date",
description: "Date in format yyyy-MM-dd",
},
},
annotations: {
readOnlyHint: true,
destructiveHint: false,
openWorldHint: true,
},
async run({ $ }) {
const response = await this.app.getAccountBalanceByAccountNumber({
accountNumber: this.accountNumber,
date: this.date,
$,
});
$.export("$summary", `Successfully retrieved account balance for account ${this.accountNumber} on ${this.date}`);
return response;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import app from "../../eaccounting.app.mjs";

export default {
key: "eaccounting-get-account-balances",
name: "Get Account Balances",
description: "Retrieves account balances by date. [See the documentation](https://developer.vismaonline.com)",
version: "0.0.1",
type: "action",
props: {
app,
date: {
type: "string",
label: "Date",
description: "Date in format yyyy-MM-dd",
},
Comment on lines +11 to +15
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Add date format validation.

The date prop specifies the format as "yyyy-MM-dd" in the description but lacks validation. Users could submit invalid formats, leading to API errors.

Apply this diff to add format validation:

     date: {
       type: "string",
       label: "Date",
       description: "Date in format yyyy-MM-dd",
+      pattern: "\\d{4}-\\d{2}-\\d{2}",
     },

Alternatively, consider using a date picker with type: "string", format: "date" if supported by the Pipedream platform.

},
annotations: {
readOnlyHint: true,
destructiveHint: false,
openWorldHint: true,
},
async run({ $ }) {
const response = await this.app.getAccountBalances({
date: this.date,
$,
});
$.export("$summary", `Successfully retrieved account balances for ${this.date}`);
return response;
},
};
42 changes: 42 additions & 0 deletions components/eaccounting/actions/get-attachments/get-attachments.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import app from "../../eaccounting.app.mjs";

export default {
key: "eaccounting-get-attachments",
name: "Get Attachments",
description: "Retrieves a list of attachments. [See the documentation](https://developer.vismaonline.com)",
version: "0.0.1",
type: "action",
props: {
app,
includeMatched: {
type: "boolean",
label: "Include Matched",
description: "When set to false, returns only unmatched attachments. Default: true",
optional: true,
default: true,
},
includeTemporaryUrl: {
type: "boolean",
label: "Include Temporary URL",
description: "When set to false, returns attachments without the TemporaryUrl. Default: true",
optional: true,
default: true,
},
},
annotations: {
readOnlyHint: true,
destructiveHint: false,
openWorldHint: true,
},
async run({ $ }) {
const response = await this.app.getAttachments({
$,
params: {
includeMatched: this.includeMatched,
includeTemporaryUrl: this.includeTemporaryUrl,
},
});
$.export("$summary", `Successfully retrieved ${response.data?.length || 0} attachments`);
return response;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import app from "../../eaccounting.app.mjs";

export default {
key: "eaccounting-get-bank-accounts",
name: "Get Bank Accounts",
description: "Retrieves a list of bank accounts. [See the documentation](https://developer.vismaonline.com)",
version: "0.0.1",
type: "action",
props: {
app,
},
annotations: {
readOnlyHint: true,
destructiveHint: false,
openWorldHint: true,
},
async run({ $ }) {
const response = await this.app.getBankAccounts({
$,
});
$.export("$summary", `Successfully retrieved ${response.data?.length || 0} bank accounts`);
return response;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import app from "../../eaccounting.app.mjs";

export default {
key: "eaccounting-get-company-settings",
name: "Get Company Settings",
description: "Retrieves company settings. [See the documentation](https://developer.vismaonline.com)",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Reference the specific Swagger API documentation instead of the generic developer portal.

The documentation link should point to the interactive Swagger endpoint reference rather than the generic developer portal. Use https://eaccountingapi.vismaonline.com/swagger/ui/index for direct access to endpoint specifications, which helps developers find relevant API operations more efficiently.

🤖 Prompt for AI Agents
In components/eaccounting/actions/get-company-settings/get-company-settings.mjs
around line 6, the description's documentation link points to the generic
developer portal; update it to reference the specific Swagger interactive API
docs by replacing the URL with
https://eaccountingapi.vismaonline.com/swagger/ui/index so the description links
directly to the endpoint specifications.

version: "0.0.1",
type: "action",
props: {
app,
},
annotations: {
readOnlyHint: true,
destructiveHint: false,
openWorldHint: true,
},
async run({ $ }) {
const response = await this.app.getCompanySettings({
$,
});
$.export("$summary", "Successfully retrieved company settings");
return response;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import app from "../../eaccounting.app.mjs";

export default {
key: "eaccounting-get-customer-invoices",
name: "Get Customer Invoices",
description: "Retrieves all customer invoices. [See the documentation](https://developer.vismaonline.com)",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Consider adding a more specific documentation URL.

The documentation link points to the general developer portal. Consider linking to the specific API endpoint documentation (e.g., https://eaccountingapi.vismaonline.com/swagger/ui/index#!/CustomerInvoiceV2) to help users understand the exact endpoint behavior, response structure, and available parameters.

🤖 Prompt for AI Agents
In
components/eaccounting/actions/get-customer-invoices/get-customer-invoices.mjs
around line 6, the description uses a generic developer portal URL; replace it
with the specific API endpoint documentation URL (for example
https://eaccountingapi.vismaonline.com/swagger/ui/index#!/CustomerInvoiceV2 or
the exact CustomerInvoiceV2 endpoint page) so users can view the endpoint
details, parameters and response schema—update the description string to include
that specific URL.

version: "0.0.1",
type: "action",
props: {
app,
modifiedSinceUtc: {
type: "string",
label: "Modified Since (UTC)",
description: "Get the invoices which have been modified since this date. Format: yyyy-MM-ddTHH:mm:ss",
optional: true,
},
},
annotations: {
readOnlyHint: true,
destructiveHint: false,
openWorldHint: true,
},
async run({ $ }) {
const response = await this.app.getCustomerInvoices({
$,
params: {
modifiedSinceUtc: this.modifiedSinceUtc,
},
});
$.export("$summary", `Successfully retrieved ${response.data?.length || 0} customer invoices`);
return response;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import app from "../../eaccounting.app.mjs";

export default {
key: "eaccounting-get-supplier-invoices",
name: "Get Supplier Invoices",
description: "Retrieves all supplier invoices. [See the documentation](https://developer.vismaonline.com)",
version: "0.0.1",
type: "action",
props: {
app,
},
annotations: {
readOnlyHint: true,
destructiveHint: false,
openWorldHint: true,
},
async run({ $ }) {
const response = await this.app.getSupplierInvoices({
$,
});
$.export("$summary", `Successfully retrieved ${response.data?.length || 0} supplier invoices`);
return response;
},
};
Loading
Loading