Skip to content

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

feat(0codekit): validate business data and work with dates and conversions (part 1/3) (#15857)

Odai Ahmad02d219abb806
diff --git a/bun.lock b/bun.lock
index a4a63c6e52b..113c5400e82 100644
--- a/bun.lock
+++ b/bun.lock
@@ -226,6 +226,18 @@
"vitest": "3.2.6",
},
},
+ "packages/pieces/community/0codekit": {
+ "name": "@activepieces/piece-0codekit",
+ "version": "0.0.1",
+ "dependencies": {
+ "@activepieces/pieces-common": "workspace:*",
+ "@activepieces/pieces-framework": "workspace:*",
+ },
+ "devDependencies": {
+ "tslib": "2.6.2",
+ "vitest": "3.2.6",
+ },
+ },
"packages/pieces/community/activecampaign": {
"name": "@activepieces/piece-activecampaign",
"version": "0.1.8",
@@ -11195,6 +11207,8 @@
"@activepieces/engine": ["@activepieces/engine@workspace:packages/server/engine"],
+ "@activepieces/piece-0codekit": ["@activepieces/piece-0codekit@workspace:packages/pieces/community/0codekit"],
+
"@activepieces/piece-activecampaign": ["@activepieces/piece-activecampaign@workspace:packages/pieces/community/activecampaign"],
"@activepieces/piece-activepieces": ["@activepieces/piece-activepieces@workspace:packages/pieces/community/activepieces"],
diff --git a/packages/pieces/community/0codekit/.eslintrc.json b/packages/pieces/community/0codekit/.eslintrc.json
new file mode 100644
index 00000000000..9ee1a0770e8
--- /dev/null
+++ b/packages/pieces/community/0codekit/.eslintrc.json
@@ -0,0 +1,26 @@
+{
+ "extends": ["../../../../.eslintrc.json"],
+ "ignorePatterns": ["!**/*"],
+ "overrides": [
+ { "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], "rules": {} },
+ {
+ "files": ["*.ts", "*.tsx"],
+ "rules": {
+ "no-restricted-imports": [
+ "error",
+ {
+ "patterns": [
+ "lodash",
+ "lodash/*",
+ "@activepieces/core-*",
+ "@activepieces/server*",
+ "@activepieces/engine",
+ "@activepieces/shared"
+ ]
+ }
+ ]
+ }
+ },
+ { "files": ["*.js", "*.jsx"], "rules": {} }
+ ]
+}
diff --git a/packages/pieces/community/0codekit/package.json b/packages/pieces/community/0codekit/package.json
new file mode 100644
index 00000000000..da48716a7b2
--- /dev/null
+++ b/packages/pieces/community/0codekit/package.json
@@ -0,0 +1,20 @@
+{
+ "name": "@activepieces/piece-0codekit",
+ "version": "0.0.1",
+ "main": "./dist/src/index.js",
+ "types": "./dist/src/index.d.ts",
+ "scripts": {
+ "build": "tsc -p tsconfig.lib.json && cp package.json dist/",
+ "bundle": "node ../../../../dist/packages/cli/src/index.js pieces bundle",
+ "lint": "eslint 'src/**/*.ts'",
+ "test": "vitest run"
+ },
+ "dependencies": {
+ "@activepieces/pieces-common": "workspace:*",
+ "@activepieces/pieces-framework": "workspace:*"
+ },
+ "devDependencies": {
+ "tslib": "2.6.2",
+ "vitest": "3.2.6"
+ }
+}
diff --git a/packages/pieces/community/0codekit/src/i18n/translation.json b/packages/pieces/community/0codekit/src/i18n/translation.json
new file mode 100644
index 00000000000..2cd8b2b6db8
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/i18n/translation.json
@@ -0,0 +1,675 @@
+{
+ "Ready-made utilities for automations: dates and calendar weeks, conversions and validation.": "Ready-made utilities for automations: dates and calendar weeks, conversions and validation.",
+ "To get your API key:\n1. Log in to your [0CodeKit](https://0codekit.com) account.\n2. Open the **Account** tab. Your API key is shown there.\n3. Copy the key and paste it here.": "To get your API key:\n1. Log in to your [0CodeKit](https://0codekit.com) account.\n2. Open the **Account** tab. Your API key is shown there.\n3. Copy the key and paste it here.",
+ "Current Month": "Current Month",
+ "Specific Month and Year": "Specific Month and Year",
+ "Current Week": "Current Week",
+ "Current Week from Date": "Current Week from Date",
+ "Current Week from Unix Timestamp": "Current Week from Unix Timestamp",
+ "Current Week only with Week Number": "Current Week only with Week Number",
+ "Current Week with Week Number and Year": "Current Week with Week Number and Year",
+ "Is Given Date is Weekend": "Is Given Date is Weekend",
+ "Is Given Date is Weekend, with Format": "Is Given Date is Weekend, with Format",
+ "Holidays in Specific Country and Year": "Holidays in Specific Country and Year",
+ "Convert Between Timezones with Date": "Convert Between Timezones with Date",
+ "Convert Between Timezones with Unix Timestamp": "Convert Between Timezones with Unix Timestamp",
+ "Convert CSV to JSON": "Convert CSV to JSON",
+ "Convert Currency": "Convert Currency",
+ "Convert IP to Geo": "Convert IP to Geo",
+ "Convert ISO to Nation": "Convert ISO to Nation",
+ "Convert Nation to ISO": "Convert Nation to ISO",
+ "Calculate BMI": "Calculate BMI",
+ "Calculate Geo Distance": "Calculate Geo Distance",
+ "Validate a bic": "Validate a bic",
+ "Validates an email and correct it": "Validates an email and correct it",
+ "Validate an IBAN": "Validate an IBAN",
+ "Validate vat with Countrycode and plain ID": "Validate vat with Countrycode and plain ID",
+ "Checks validity of a VAT ID": "Checks validity of a VAT ID",
+ "Lookup VAT Rates": "Lookup VAT Rates",
+ "Verify a Domain": "Verify a Domain",
+ "Detect Gender": "Detect Gender",
+ "Split Name": "Split Name",
+ "Text Contains": "Text Contains",
+ "Get a Random City": "Get a Random City",
+ "Get Random Name": "Get Random Name",
+ "Get Random Name with Gender": "Get Random Name with Gender",
+ "Get a Number": "Get a Number",
+ "Custom API Call": "Custom API Call",
+ "Get the days, workdays, Saturdays and Sundays of the current month.": "Get the days, workdays, Saturdays and Sundays of the current month.",
+ "Get the days, workdays, Saturdays and Sundays of a chosen month.": "Get the days, workdays, Saturdays and Sundays of a chosen month.",
+ "Get the calendar week number and the first and last day of the current week.": "Get the calendar week number and the first and last day of the current week.",
+ "Get the calendar week number and the first and last day of the week a date falls in.": "Get the calendar week number and the first and last day of the week a date falls in.",
+ "Get the calendar week number and the first and last day of the week a Unix timestamp falls in.": "Get the calendar week number and the first and last day of the week a Unix timestamp falls in.",
+ "Get the first and last day of a calendar week in the current year.": "Get the first and last day of a calendar week in the current year.",
+ "Get the first and last day of a calendar week in a chosen year.": "Get the first and last day of a calendar week in a chosen year.",
+ "Check whether a date falls on a Saturday or Sunday, and get its weekday.": "Check whether a date falls on a Saturday or Sunday, and get its weekday.",
+ "Check whether a date written in a custom format falls on a weekend, and get its weekday.": "Check whether a date written in a custom format falls on a weekend, and get its weekday.",
+ "List the public holidays of a country, and optionally a state, for a year.": "List the public holidays of a country, and optionally a state, for a year.",
+ "Convert a date and time from one time zone to another.": "Convert a date and time from one time zone to another.",
+ "Show a Unix timestamp as a date and time in another time zone.": "Show a Unix timestamp as a date and time in another time zone.",
+ "Turn CSV text into a list of rows you can loop over.": "Turn CSV text into a list of rows you can loop over.",
+ "Convert an amount from one currency to another at the latest exchange rate.": "Convert an amount from one currency to another at the latest exchange rate.",
+ "Look up the country, city, coordinates and provider of an IP address.": "Look up the country, city, coordinates and provider of an IP address.",
+ "Get the English country name for an ISO country code.": "Get the English country name for an ISO country code.",
+ "Get the ISO country code for an English country name.": "Get the ISO country code for an English country name.",
+ "Calculate body mass index, desirable weight and daily nutrient needs from height and weight.": "Calculate body mass index, desirable weight and daily nutrient needs from height and weight.",
+ "Get the travel distance and time between two addresses.": "Get the travel distance and time between two addresses.",
+ "Check whether a BIC (SWIFT code) is valid.": "Check whether a BIC (SWIFT code) is valid.",
+ "Check whether an email address is valid and get a corrected version of it.": "Check whether an email address is valid and get a corrected version of it.",
+ "Check whether an IBAN bank account number is valid.": "Check whether an IBAN bank account number is valid.",
+ "Check an EU VAT number against VIES, with the country and the number given separately.": "Check an EU VAT number against VIES, with the country and the number given separately.",
+ "Check a full EU VAT ID, including its country prefix, against VIES.": "Check a full EU VAT ID, including its country prefix, against VIES.",
+ "Get the standard and reduced VAT rates of an EU country.": "Get the standard and reduced VAT rates of an EU country.",
+ "Check whether a domain or website is reachable and get its main domain.": "Check whether a domain or website is reachable and get its main domain.",
+ "Guess whether a first name is male, female or unisex.": "Guess whether a first name is male, female or unisex.",
+ "Split a full name into first name and last name.": "Split a full name into first name and last name.",
+ "Check whether a text contains one or more keywords, and where.": "Check whether a text contains one or more keywords, and where.",
+ "Generate a random, fictional city and country name for test data.": "Generate a random, fictional city and country name for test data.",
+ "Generate a random person name for test data.": "Generate a random person name for test data.",
+ "Generate a random male or female person name for test data.": "Generate a random male or female person name for test data.",
+ "Generate a random number between a minimum and a maximum.": "Generate a random number between a minimum and a maximum.",
+ "Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
+ "Output Date Format": "Output Date Format",
+ "Return Unix Timestamps": "Return Unix Timestamps",
+ "Month": "Month",
+ "Year": "Year",
+ "Date": "Date",
+ "Date Format": "Date Format",
+ "Unix Timestamp": "Unix Timestamp",
+ "Week Number": "Week Number",
+ "Time Zone": "Time Zone",
+ "Country Code": "Country Code",
+ "State": "State",
+ "Date and Time": "Date and Time",
+ "From Time Zone": "From Time Zone",
+ "To Time Zone": "To Time Zone",
+ "Output Format": "Output Format",
+ "CSV": "CSV",
+ "Delimiter": "Delimiter",
+ "First Row Is Data": "First Row Is Data",
+ "Trim Spaces": "Trim Spaces",
+ "Skip Empty Values": "Skip Empty Values",
+ "Amount": "Amount",
+ "From Currency": "From Currency",
+ "To Currency": "To Currency",
+ "Rate Date Format": "Rate Date Format",
+ "IP Address": "IP Address",
+ "ISO Country Code": "ISO Country Code",
+ "Country Name": "Country Name",
+ "Weight (kg)": "Weight (kg)",
+ "Height (cm)": "Height (cm)",
+ "Start Address": "Start Address",
+ "End Address": "End Address",
+ "Travel Mode": "Travel Mode",
+ "BIC": "BIC",
+ "Email": "Email",
+ "IBAN": "IBAN",
+ "Country": "Country",
+ "VAT Number": "VAT Number",
+ "VAT ID": "VAT ID",
+ "Domain": "Domain",
+ "First Name": "First Name",
+ "Full Name": "Full Name",
+ "Last Name First": "Last Name First",
+ "Text": "Text",
+ "Keywords": "Keywords",
+ "Case Sensitive": "Case Sensitive",
+ "Whole Words Only": "Whole Words Only",
+ "Gender": "Gender",
+ "Minimum": "Minimum",
+ "Maximum": "Maximum",
+ "Number Type": "Number Type",
+ "Decimal Places": "Decimal Places",
+ "Method": "Method",
+ "Headers": "Headers",
+ "Query Parameters": "Query Parameters",
+ "Body Type": "Body Type",
+ "Body": "Body",
+ "Response is Binary": "Response is Binary",
+ "Return Error as Output": "Return Error as Output",
+ "Timeout": "Timeout",
+ "Follow redirects": "Follow redirects",
+ "How dates in the result are written, using tokens such as `DD` (day), `MM` (month), `YYYY` (year), `HH:mm` (time). Leave empty to use the 0CodeKit default.": "How dates in the result are written, using tokens such as `DD` (day), `MM` (month), `YYYY` (year), `HH:mm` (time). Leave empty to use the 0CodeKit default.",
+ "Return every date as a Unix timestamp (seconds) instead of formatted text.": "Return every date as a Unix timestamp (seconds) instead of formatted text.",
+ "The month to describe.": "The month to describe.",
+ "The four-digit year, for example 2025.": "The four-digit year, for example 2025.",
+ "The date to look up, written in the format below.": "The date to look up, written in the format below.",
+ "How the date above is written, using tokens such as `DD` (day), `MM` (month) and `YYYY` (year). For example `DD.MM.YYYY` for 20.01.2025 or `YYYY-MM-DD` for 2025-01-20.": "How the date above is written, using tokens such as `DD` (day), `MM` (month) and `YYYY` (year). For example `DD.MM.YYYY` for 20.01.2025 or `YYYY-MM-DD` for 2025-01-20.",
+ "The moment to look up, in seconds since 1 January 1970.": "The moment to look up, in seconds since 1 January 1970.",
+ "The calendar week number, from 1 to 53.": "The calendar week number, from 1 to 53.",
+ "The date to check, for example 2025-01-20.": "The date to check, for example 2025-01-20.",
+ "The time zone the date belongs to. Leave empty to use the 0CodeKit default.": "The time zone the date belongs to. Leave empty to use the 0CodeKit default.",
+ "The date to check, written in the format below.": "The date to check, written in the format below.",
+ "How the date above is written, using `YYYY` or `YY` (year), `MM` or `M` (month) and `DD` or `D` (day), with any separators. For example `DD.MM.YYYY` for 20.01.2025.": "How the date above is written, using `YYYY` or `YY` (year), `MM` or `M` (month) and `DD` or `D` (day), with any separators. For example `DD.MM.YYYY` for 20.01.2025.",
+ "The two-letter ISO country code of the country.": "The two-letter ISO country code of the country.",
+ "A state or region code to add regional holidays. Empty: national only.": "A state or region code to add regional holidays. Empty: national only.",
+ "The date and time to convert, for example `2025-01-20 14:30`.": "The date and time to convert, for example `2025-01-20 14:30`.",
+ "The time zone the date and time above is in.": "The time zone the date and time above is in.",
+ "The time zone to convert to.": "The time zone to convert to.",
+ "How the converted time is written, using tokens such as `DD.MM.YYYY HH:mm`. Leave empty to use the 0CodeKit default.": "How the converted time is written, using tokens such as `DD.MM.YYYY HH:mm`. Leave empty to use the 0CodeKit default.",
+ "The moment to convert, in seconds since 1 January 1970.": "The moment to convert, in seconds since 1 January 1970.",
+ "The time zone of the timestamp. Unix timestamps are normally UTC.": "The time zone of the timestamp. Unix timestamps are normally UTC.",
+ "The CSV content to convert, including the header row.": "The CSV content to convert, including the header row.",
+ "The character that separates columns.": "The character that separates columns.",
+ "Turn on when the CSV has no header row; columns become field1, field2.": "Turn on when the CSV has no header row; columns become field1, field2.",
+ "Remove spaces around each value.": "Remove spaces around each value.",
+ "Leave empty cells out of each row instead of returning empty text.": "Leave empty cells out of each row instead of returning empty text.",
+ "The amount to convert.": "The amount to convert.",
+ "The three-letter currency code of the amount, for example `USD`.": "The three-letter currency code of the amount, for example `USD`.",
+ "The three-letter currency code to convert to, for example `EUR`.": "The three-letter currency code to convert to, for example `EUR`.",
+ "How the rate date is written, using `DD`, `MM` and `YYYY` tokens.": "How the rate date is written, using `DD`, `MM` and `YYYY` tokens.",
+ "The public IP address to look up.": "The public IP address to look up.",
+ "The ISO country code, for example `DE`.": "The ISO country code, for example `DE`.",
+ "The country name in English, for example `Germany`.": "The country name in English, for example `Germany`.",
+ "Body weight in kilograms.": "Body weight in kilograms.",
+ "Body height in centimetres.": "Body height in centimetres.",
+ "Where the trip starts. An address, city or place name.": "Where the trip starts. An address, city or place name.",
+ "Where the trip ends. An address, city or place name.": "Where the trip ends. An address, city or place name.",
+ "How the trip is made. This changes the route and the travel time.": "How the trip is made. This changes the route and the travel time.",
+ "The BIC or SWIFT code to check.": "The BIC or SWIFT code to check.",
+ "The email address to check.": "The email address to check.",
+ "The IBAN to check.": "The IBAN to check.",
+ "The EU member state that issued the VAT ID.": "The EU member state that issued the VAT ID.",
+ "The VAT number without the country prefix, for example `07643520567`.": "The VAT number without the country prefix, for example `07643520567`.",
+ "The full VAT ID, starting with the two-letter country code.": "The full VAT ID, starting with the two-letter country code.",
+ "The EU member state to look up.": "The EU member state to look up.",
+ "The domain or website to check, for example `https://www.example.com`.": "The domain or website to check, for example `https://www.example.com`.",
+ "The first name to check. Fill this or Full Name.": "The first name to check. Fill this or Full Name.",
+ "Used when First Name is empty; its first word is the first name.": "Used when First Name is empty; its first word is the first name.",
+ "The full name to split.": "The full name to split.",
+ "Turn on when the name is written with the last name first.": "Turn on when the name is written with the last name first.",
+ "The text to search in.": "The text to search in.",
+ "The words or phrases to look for.": "The words or phrases to look for.",
+ "Turn on to treat \"Apple\" and \"apple\" as different words.": "Turn on to treat \"Apple\" and \"apple\" as different words.",
+ "Turn on so that \"cat\" does not match inside \"category\".": "Turn on so that \"cat\" does not match inside \"category\".",
+ "The gender of the generated name.": "The gender of the generated name.",
+ "The smallest number that can be returned.": "The smallest number that can be returned.",
+ "The largest number that can be returned.": "The largest number that can be returned.",
+ "Whether to return a whole number or a decimal number.": "Whether to return a whole number or a decimal number.",
+ "Digits after the decimal point. Only used for decimal numbers.": "Digits after the decimal point. Only used for decimal numbers.",
+ "Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
+ "Appended to the URL as ?key=value.": "Appended to the URL as ?key=value.",
+ "Enable for files like PDFs, images, etc.": "Enable for files like PDFs, images, etc.",
+ "On a failed request, output the error instead of failing the step.": "On a failed request, output the error instead of failing the step.",
+ "Seconds to wait for a response. Empty: up to the flow limit (10 min).": "Seconds to wait for a response. Empty: up to the flow limit (10 min).",
+ "Follow 3xx redirects instead of returning them as the response.": "Follow 3xx redirects instead of returning them as the response.",
+ "January": "January",
+ "February": "February",
+ "March": "March",
+ "April": "April",
+ "May": "May",
+ "June": "June",
+ "July": "July",
+ "August": "August",
+ "September": "September",
+ "October": "October",
+ "November": "November",
+ "December": "December",
+ "UTC": "UTC",
+ "Africa/Abidjan": "Africa/Abidjan",
+ "Africa/Accra": "Africa/Accra",
+ "Africa/Addis_Ababa": "Africa/Addis_Ababa",
+ "Africa/Algiers": "Africa/Algiers",
+ "Africa/Asmera": "Africa/Asmera",
+ "Africa/Bamako": "Africa/Bamako",
+ "Africa/Bangui": "Africa/Bangui",
+ "Africa/Banjul": "Africa/Banjul",
+ "Africa/Bissau": "Africa/Bissau",
+ "Africa/Blantyre": "Africa/Blantyre",
+ "Africa/Brazzaville": "Africa/Brazzaville",
+ "Africa/Bujumbura": "Africa/Bujumbura",
+ "Africa/Cairo": "Africa/Cairo",
+ "Africa/Casablanca": "Africa/Casablanca",
+ "Africa/Ceuta": "Africa/Ceuta",
+ "Africa/Conakry": "Africa/Conakry",
+ "Africa/Dakar": "Africa/Dakar",
+ "Africa/Dar_es_Salaam": "Africa/Dar_es_Salaam",
+ "Africa/Djibouti": "Africa/Djibouti",
+ "Africa/Douala": "Africa/Douala",
+ "Africa/El_Aaiun": "Africa/El_Aaiun",
+ "Africa/Freetown": "Africa/Freetown",
+ "Africa/Gaborone": "Africa/Gaborone",
+ "Africa/Harare": "Africa/Harare",
+ "Africa/Johannesburg": "Africa/Johannesburg",
+ "Africa/Juba": "Africa/Juba",
+ "Africa/Kampala": "Africa/Kampala",
+ "Africa/Khartoum": "Africa/Khartoum",
+ "Africa/Kigali": "Africa/Kigali",
+ "Africa/Kinshasa": "Africa/Kinshasa",
+ "Africa/Lagos": "Africa/Lagos",
+ "Africa/Libreville": "Africa/Libreville",
+ "Africa/Lome": "Africa/Lome",
+ "Africa/Luanda": "Africa/Luanda",
+ "Africa/Lubumbashi": "Africa/Lubumbashi",
+ "Africa/Lusaka": "Africa/Lusaka",
+ "Africa/Malabo": "Africa/Malabo",
+ "Africa/Maputo": "Africa/Maputo",
+ "Africa/Maseru": "Africa/Maseru",
+ "Africa/Mbabane": "Africa/Mbabane",
+ "Africa/Mogadishu": "Africa/Mogadishu",
+ "Africa/Monrovia": "Africa/Monrovia",
+ "Africa/Nairobi": "Africa/Nairobi",
+ "Africa/Ndjamena": "Africa/Ndjamena",
+ "Africa/Niamey": "Africa/Niamey",
+ "Africa/Nouakchott": "Africa/Nouakchott",
+ "Africa/Ouagadougou": "Africa/Ouagadougou",
+ "Africa/Porto-Novo": "Africa/Porto-Novo",
+ "Africa/Sao_Tome": "Africa/Sao_Tome",
+ "Africa/Tripoli": "Africa/Tripoli",
+ "Africa/Tunis": "Africa/Tunis",
+ "Africa/Windhoek": "Africa/Windhoek",
+ "America/Adak": "America/Adak",
+ "America/Anchorage": "America/Anchorage",
+ "America/Anguilla": "America/Anguilla",
+ "America/Antigua": "America/Antigua",
+ "America/Araguaina": "America/Araguaina",
+ "America/Argentina/La_Rioja": "America/Argentina/La_Rioja",
+ "America/Argentina/Rio_Gallegos": "America/Argentina/Rio_Gallegos",
+ "America/Argentina/Salta": "America/Argentina/Salta",
+ "America/Argentina/San_Juan": "America/Argentina/San_Juan",
+ "America/Argentina/San_Luis": "America/Argentina/San_Luis",
+ "America/Argentina/Tucuman": "America/Argentina/Tucuman",
+ "America/Argentina/Ushuaia": "America/Argentina/Ushuaia",
+ "America/Aruba": "America/Aruba",
+ "America/Asuncion": "America/Asuncion",
+ "America/Bahia": "America/Bahia",
+ "America/Bahia_Banderas": "America/Bahia_Banderas",
+ "America/Barbados": "America/Barbados",
+ "America/Belem": "America/Belem",
+ "America/Belize": "America/Belize",
+ "America/Blanc-Sablon": "America/Blanc-Sablon",
+ "America/Boa_Vista": "America/Boa_Vista",
+ "America/Bogota": "America/Bogota",
+ "America/Boise": "America/Boise",
+ "America/Buenos_Aires": "America/Buenos_Aires",
+ "America/Cambridge_Bay": "America/Cambridge_Bay",
+ "America/Campo_Grande": "America/Campo_Grande",
+ "America/Cancun": "America/Cancun",
+ "America/Caracas": "America/Caracas",
+ "America/Catamarca": "America/Catamarca",
+ "America/Cayenne": "America/Cayenne",
+ "America/Cayman": "America/Cayman",
+ "America/Chicago": "America/Chicago",
+ "America/Chihuahua": "America/Chihuahua",
+ "America/Ciudad_Juarez": "America/Ciudad_Juarez",
+ "America/Coral_Harbour": "America/Coral_Harbour",
+ "America/Cordoba": "America/Cordoba",
+ "America/Costa_Rica": "America/Costa_Rica",
+ "America/Coyhaique": "America/Coyhaique",
+ "America/Creston": "America/Creston",
+ "America/Cuiaba": "America/Cuiaba",
+ "America/Curacao": "America/Curacao",
+ "America/Danmarkshavn": "America/Danmarkshavn",
+ "America/Dawson": "America/Dawson",
+ "America/Dawson_Creek": "America/Dawson_Creek",
+ "America/Denver": "America/Denver",
+ "America/Detroit": "America/Detroit",
+ "America/Dominica": "America/Dominica",
+ "America/Edmonton": "America/Edmonton",
+ "America/Eirunepe": "America/Eirunepe",
+ "America/El_Salvador": "America/El_Salvador",
+ "America/Fort_Nelson": "America/Fort_Nelson",
+ "America/Fortaleza": "America/Fortaleza",
+ "America/Glace_Bay": "America/Glace_Bay",
+ "America/Godthab": "America/Godthab",
+ "America/Goose_Bay": "America/Goose_Bay",
+ "America/Grand_Turk": "America/Grand_Turk",
+ "America/Grenada": "America/Grenada",
+ "America/Guadeloupe": "America/Guadeloupe",
+ "America/Guatemala": "America/Guatemala",
+ "America/Guayaquil": "America/Guayaquil",
+ "America/Guyana": "America/Guyana",
+ "America/Halifax": "America/Halifax",
+ "America/Havana": "America/Havana",
+ "America/Hermosillo": "America/Hermosillo",
+ "America/Indiana/Knox": "America/Indiana/Knox",
+ "America/Indiana/Marengo": "America/Indiana/Marengo",
+ "America/Indiana/Petersburg": "America/Indiana/Petersburg",
+ "America/Indiana/Tell_City": "America/Indiana/Tell_City",
+ "America/Indiana/Vevay": "America/Indiana/Vevay",
+ "America/Indiana/Vincennes": "America/Indiana/Vincennes",
+ "America/Indiana/Winamac": "America/Indiana/Winamac",
+ "America/Indianapolis": "America/Indianapolis",
+ "America/Inuvik": "America/Inuvik",
+ "America/Iqaluit": "America/Iqaluit",
+ "America/Jamaica": "America/Jamaica",
+ "America/Jujuy": "America/Jujuy",
+ "America/Juneau": "America/Juneau",
+ "America/Kentucky/Monticello": "America/Kentucky/Monticello",
+ "America/Kralendijk": "America/Kralendijk",
+ "America/La_Paz": "America/La_Paz",
+ "America/Lima": "America/Lima",
+ "America/Los_Angeles": "America/Los_Angeles",
+ "America/Louisville": "America/Louisville",
+ "America/Lower_Princes": "America/Lower_Princes",
+ "America/Maceio": "America/Maceio",
+ "America/Managua": "America/Managua",
+ "America/Manaus": "America/Manaus",
+ "America/Marigot": "America/Marigot",
+ "America/Martinique": "America/Martinique",
+ "America/Matamoros": "America/Matamoros",
+ "America/Mazatlan": "America/Mazatlan",
+ "America/Mendoza": "America/Mendoza",
+ "America/Menominee": "America/Menominee",
+ "America/Merida": "America/Merida",
+ "America/Metlakatla": "America/Metlakatla",
+ "America/Mexico_City": "America/Mexico_City",
+ "America/Miquelon": "America/Miquelon",
+ "America/Moncton": "America/Moncton",
+ "America/Monterrey": "America/Monterrey",
+ "America/Montevideo": "America/Montevideo",
+ "America/Montserrat": "America/Montserrat",
+ "America/Nassau": "America/Nassau",
+ "America/New_York": "America/New_York",
+ "America/Nome": "America/Nome",
+ "America/Noronha": "America/Noronha",
+ "America/North_Dakota/Beulah": "America/North_Dakota/Beulah",
+ "America/North_Dakota/Center": "America/North_Dakota/Center",
+ "America/North_Dakota/New_Salem": "America/North_Dakota/New_Salem",
+ "America/Ojinaga": "America/Ojinaga",
+ "America/Panama": "America/Panama",
+ "America/Paramaribo": "America/Paramaribo",
+ "America/Phoenix": "America/Phoenix",
+ "America/Port-au-Prince": "America/Port-au-Prince",
+ "America/Port_of_Spain": "America/Port_of_Spain",
+ "America/Porto_Velho": "America/Porto_Velho",
+ "America/Puerto_Rico": "America/Puerto_Rico",
+ "America/Punta_Arenas": "America/Punta_Arenas",
+ "America/Rankin_Inlet": "America/Rankin_Inlet",
+ "America/Recife": "America/Recife",
+ "America/Regina": "America/Regina",
+ "America/Resolute": "America/Resolute",
+ "America/Rio_Branco": "America/Rio_Branco",
+ "America/Santarem": "America/Santarem",
+ "America/Santiago": "America/Santiago",
+ "America/Santo_Domingo": "America/Santo_Domingo",
+ "America/Sao_Paulo": "America/Sao_Paulo",
+ "America/Scoresbysund": "America/Scoresbysund",
+ "America/Sitka": "America/Sitka",
+ "America/St_Barthelemy": "America/St_Barthelemy",
+ "America/St_Johns": "America/St_Johns",
+ "America/St_Kitts": "America/St_Kitts",
+ "America/St_Lucia": "America/St_Lucia",
+ "America/St_Thomas": "America/St_Thomas",
+ "America/St_Vincent": "America/St_Vincent",
+ "America/Swift_Current": "America/Swift_Current",
+ "America/Tegucigalpa": "America/Tegucigalpa",
+ "America/Thule": "America/Thule",
+ "America/Tijuana": "America/Tijuana",
+ "America/Toronto": "America/Toronto",
+ "America/Tortola": "America/Tortola",
+ "America/Vancouver": "America/Vancouver",
+ "America/Whitehorse": "America/Whitehorse",
+ "America/Winnipeg": "America/Winnipeg",
+ "America/Yakutat": "America/Yakutat",
+ "Antarctica/Casey": "Antarctica/Casey",
+ "Antarctica/Davis": "Antarctica/Davis",
+ "Antarctica/DumontDUrville": "Antarctica/DumontDUrville",
+ "Antarctica/Macquarie": "Antarctica/Macquarie",
+ "Antarctica/Mawson": "Antarctica/Mawson",
+ "Antarctica/McMurdo": "Antarctica/McMurdo",
+ "Antarctica/Palmer": "Antarctica/Palmer",
+ "Antarctica/Rothera": "Antarctica/Rothera",
+ "Antarctica/Syowa": "Antarctica/Syowa",
+ "Antarctica/Troll": "Antarctica/Troll",
+ "Antarctica/Vostok": "Antarctica/Vostok",
+ "Arctic/Longyearbyen": "Arctic/Longyearbyen",
+ "Asia/Aden": "Asia/Aden",
+ "Asia/Almaty": "Asia/Almaty",
+ "Asia/Amman": "Asia/Amman",
+ "Asia/Anadyr": "Asia/Anadyr",
+ "Asia/Aqtau": "Asia/Aqtau",
+ "Asia/Aqtobe": "Asia/Aqtobe",
+ "Asia/Ashgabat": "Asia/Ashgabat",
+ "Asia/Atyrau": "Asia/Atyrau",
+ "Asia/Baghdad": "Asia/Baghdad",
+ "Asia/Bahrain": "Asia/Bahrain",
+ "Asia/Baku": "Asia/Baku",
+ "Asia/Bangkok": "Asia/Bangkok",
+ "Asia/Barnaul": "Asia/Barnaul",
+ "Asia/Beirut": "Asia/Beirut",
+ "Asia/Bishkek": "Asia/Bishkek",
+ "Asia/Brunei": "Asia/Brunei",
+ "Asia/Calcutta": "Asia/Calcutta",
+ "Asia/Chita": "Asia/Chita",
+ "Asia/Colombo": "Asia/Colombo",
+ "Asia/Damascus": "Asia/Damascus",
+ "Asia/Dhaka": "Asia/Dhaka",
+ "Asia/Dili": "Asia/Dili",
+ "Asia/Dubai": "Asia/Dubai",
+ "Asia/Dushanbe": "Asia/Dushanbe",
+ "Asia/Famagusta": "Asia/Famagusta",
+ "Asia/Gaza": "Asia/Gaza",
+ "Asia/Hebron": "Asia/Hebron",
+ "Asia/Hong_Kong": "Asia/Hong_Kong",
+ "Asia/Hovd": "Asia/Hovd",
+ "Asia/Irkutsk": "Asia/Irkutsk",
+ "Asia/Jakarta": "Asia/Jakarta",
+ "Asia/Jayapura": "Asia/Jayapura",
+ "Asia/Jerusalem": "Asia/Jerusalem",
+ "Asia/Kabul": "Asia/Kabul",
+ "Asia/Kamchatka": "Asia/Kamchatka",
+ "Asia/Karachi": "Asia/Karachi",
+ "Asia/Katmandu": "Asia/Katmandu",
+ "Asia/Khandyga": "Asia/Khandyga",
+ "Asia/Krasnoyarsk": "Asia/Krasnoyarsk",
+ "Asia/Kuala_Lumpur": "Asia/Kuala_Lumpur",
+ "Asia/Kuching": "Asia/Kuching",
+ "Asia/Kuwait": "Asia/Kuwait",
+ "Asia/Macau": "Asia/Macau",
+ "Asia/Magadan": "Asia/Magadan",
+ "Asia/Makassar": "Asia/Makassar",
+ "Asia/Manila": "Asia/Manila",
+ "Asia/Muscat": "Asia/Muscat",
+ "Asia/Nicosia": "Asia/Nicosia",
+ "Asia/Novokuznetsk": "Asia/Novokuznetsk",
+ "Asia/Novosibirsk": "Asia/Novosibirsk",
+ "Asia/Omsk": "Asia/Omsk",
+ "Asia/Oral": "Asia/Oral",
+ "Asia/Phnom_Penh": "Asia/Phnom_Penh",
+ "Asia/Pontianak": "Asia/Pontianak",
+ "Asia/Pyongyang": "Asia/Pyongyang",
+ "Asia/Qatar": "Asia/Qatar",
+ "Asia/Qostanay": "Asia/Qostanay",
+ "Asia/Qyzylorda": "Asia/Qyzylorda",
+ "Asia/Rangoon": "Asia/Rangoon",
+ "Asia/Riyadh": "Asia/Riyadh",
+ "Asia/Saigon": "Asia/Saigon",
+ "Asia/Sakhalin": "Asia/Sakhalin",
+ "Asia/Samarkand": "Asia/Samarkand",
+ "Asia/Seoul": "Asia/Seoul",
+ "Asia/Shanghai": "Asia/Shanghai",
+ "Asia/Singapore": "Asia/Singapore",
+ "Asia/Srednekolymsk": "Asia/Srednekolymsk",
+ "Asia/Taipei": "Asia/Taipei",
+ "Asia/Tashkent": "Asia/Tashkent",
+ "Asia/Tbilisi": "Asia/Tbilisi",
+ "Asia/Tehran": "Asia/Tehran",
+ "Asia/Thimphu": "Asia/Thimphu",
+ "Asia/Tokyo": "Asia/Tokyo",
+ "Asia/Tomsk": "Asia/Tomsk",
+ "Asia/Ulaanbaatar": "Asia/Ulaanbaatar",
+ "Asia/Urumqi": "Asia/Urumqi",
+ "Asia/Ust-Nera": "Asia/Ust-Nera",
+ "Asia/Vientiane": "Asia/Vientiane",
+ "Asia/Vladivostok": "Asia/Vladivostok",
+ "Asia/Yakutsk": "Asia/Yakutsk",
+ "Asia/Yekaterinburg": "Asia/Yekaterinburg",
+ "Asia/Yerevan": "Asia/Yerevan",
+ "Atlantic/Azores": "Atlantic/Azores",
+ "Atlantic/Bermuda": "Atlantic/Bermuda",
+ "Atlantic/Canary": "Atlantic/Canary",
+ "Atlantic/Cape_Verde": "Atlantic/Cape_Verde",
+ "Atlantic/Faeroe": "Atlantic/Faeroe",
+ "Atlantic/Madeira": "Atlantic/Madeira",
+ "Atlantic/Reykjavik": "Atlantic/Reykjavik",
+ "Atlantic/South_Georgia": "Atlantic/South_Georgia",
+ "Atlantic/St_Helena": "Atlantic/St_Helena",
+ "Atlantic/Stanley": "Atlantic/Stanley",
+ "Australia/Adelaide": "Australia/Adelaide",
+ "Australia/Brisbane": "Australia/Brisbane",
+ "Australia/Broken_Hill": "Australia/Broken_Hill",
+ "Australia/Darwin": "Australia/Darwin",
+ "Australia/Eucla": "Australia/Eucla",
+ "Australia/Hobart": "Australia/Hobart",
+ "Australia/Lindeman": "Australia/Lindeman",
+ "Australia/Lord_Howe": "Australia/Lord_Howe",
+ "Australia/Melbourne": "Australia/Melbourne",
+ "Australia/Perth": "Australia/Perth",
+ "Australia/Sydney": "Australia/Sydney",
+ "Europe/Amsterdam": "Europe/Amsterdam",
+ "Europe/Andorra": "Europe/Andorra",
+ "Europe/Astrakhan": "Europe/Astrakhan",
+ "Europe/Athens": "Europe/Athens",
+ "Europe/Belgrade": "Europe/Belgrade",
+ "Europe/Berlin": "Europe/Berlin",
+ "Europe/Bratislava": "Europe/Bratislava",
+ "Europe/Brussels": "Europe/Brussels",
+ "Europe/Bucharest": "Europe/Bucharest",
+ "Europe/Budapest": "Europe/Budapest",
+ "Europe/Busingen": "Europe/Busingen",
+ "Europe/Chisinau": "Europe/Chisinau",
+ "Europe/Copenhagen": "Europe/Copenhagen",
+ "Europe/Dublin": "Europe/Dublin",
+ "Europe/Gibraltar": "Europe/Gibraltar",
+ "Europe/Guernsey": "Europe/Guernsey",
+ "Europe/Helsinki": "Europe/Helsinki",
+ "Europe/Isle_of_Man": "Europe/Isle_of_Man",
+ "Europe/Istanbul": "Europe/Istanbul",
+ "Europe/Jersey": "Europe/Jersey",
+ "Europe/Kaliningrad": "Europe/Kaliningrad",
+ "Europe/Kiev": "Europe/Kiev",
+ "Europe/Kirov": "Europe/Kirov",
+ "Europe/Lisbon": "Europe/Lisbon",
+ "Europe/Ljubljana": "Europe/Ljubljana",
+ "Europe/London": "Europe/London",
+ "Europe/Luxembourg": "Europe/Luxembourg",
+ "Europe/Madrid": "Europe/Madrid",
+ "Europe/Malta": "Europe/Malta",
+ "Europe/Mariehamn": "Europe/Mariehamn",
+ "Europe/Minsk": "Europe/Minsk",
+ "Europe/Monaco": "Europe/Monaco",
+ "Europe/Moscow": "Europe/Moscow",
+ "Europe/Oslo": "Europe/Oslo",
+ "Europe/Paris": "Europe/Paris",
+ "Europe/Podgorica": "Europe/Podgorica",
+ "Europe/Prague": "Europe/Prague",
+ "Europe/Riga": "Europe/Riga",
+ "Europe/Rome": "Europe/Rome",
+ "Europe/Samara": "Europe/Samara",
+ "Europe/San_Marino": "Europe/San_Marino",
+ "Europe/Sarajevo": "Europe/Sarajevo",
+ "Europe/Saratov": "Europe/Saratov",
+ "Europe/Simferopol": "Europe/Simferopol",
+ "Europe/Skopje": "Europe/Skopje",
+ "Europe/Sofia": "Europe/Sofia",
+ "Europe/Stockholm": "Europe/Stockholm",
+ "Europe/Tallinn": "Europe/Tallinn",
+ "Europe/Tirane": "Europe/Tirane",
+ "Europe/Ulyanovsk": "Europe/Ulyanovsk",
+ "Europe/Vaduz": "Europe/Vaduz",
+ "Europe/Vatican": "Europe/Vatican",
+ "Europe/Vienna": "Europe/Vienna",
+ "Europe/Vilnius": "Europe/Vilnius",
+ "Europe/Volgograd": "Europe/Volgograd",
+ "Europe/Warsaw": "Europe/Warsaw",
+ "Europe/Zagreb": "Europe/Zagreb",
+ "Europe/Zurich": "Europe/Zurich",
+ "Indian/Antananarivo": "Indian/Antananarivo",
+ "Indian/Chagos": "Indian/Chagos",
+ "Indian/Christmas": "Indian/Christmas",
+ "Indian/Cocos": "Indian/Cocos",
+ "Indian/Comoro": "Indian/Comoro",
+ "Indian/Kerguelen": "Indian/Kerguelen",
+ "Indian/Mahe": "Indian/Mahe",
+ "Indian/Maldives": "Indian/Maldives",
+ "Indian/Mauritius": "Indian/Mauritius",
+ "Indian/Mayotte": "Indian/Mayotte",
+ "Indian/Reunion": "Indian/Reunion",
+ "Pacific/Apia": "Pacific/Apia",
+ "Pacific/Auckland": "Pacific/Auckland",
+ "Pacific/Bougainville": "Pacific/Bougainville",
+ "Pacific/Chatham": "Pacific/Chatham",
+ "Pacific/Easter": "Pacific/Easter",
+ "Pacific/Efate": "Pacific/Efate",
+ "Pacific/Enderbury": "Pacific/Enderbury",
+ "Pacific/Fakaofo": "Pacific/Fakaofo",
+ "Pacific/Fiji": "Pacific/Fiji",
+ "Pacific/Funafuti": "Pacific/Funafuti",
+ "Pacific/Galapagos": "Pacific/Galapagos",
+ "Pacific/Gambier": "Pacific/Gambier",
+ "Pacific/Guadalcanal": "Pacific/Guadalcanal",
+ "Pacific/Guam": "Pacific/Guam",
+ "Pacific/Honolulu": "Pacific/Honolulu",
+ "Pacific/Kiritimati": "Pacific/Kiritimati",
+ "Pacific/Kosrae": "Pacific/Kosrae",
+ "Pacific/Kwajalein": "Pacific/Kwajalein",
+ "Pacific/Majuro": "Pacific/Majuro",
+ "Pacific/Marquesas": "Pacific/Marquesas",
+ "Pacific/Midway": "Pacific/Midway",
+ "Pacific/Nauru": "Pacific/Nauru",
+ "Pacific/Niue": "Pacific/Niue",
+ "Pacific/Norfolk": "Pacific/Norfolk",
+ "Pacific/Noumea": "Pacific/Noumea",
+ "Pacific/Pago_Pago": "Pacific/Pago_Pago",
+ "Pacific/Palau": "Pacific/Palau",
+ "Pacific/Pitcairn": "Pacific/Pitcairn",
+ "Pacific/Ponape": "Pacific/Ponape",
+ "Pacific/Port_Moresby": "Pacific/Port_Moresby",
+ "Pacific/Rarotonga": "Pacific/Rarotonga",
+ "Pacific/Saipan": "Pacific/Saipan",
+ "Pacific/Tahiti": "Pacific/Tahiti",
+ "Pacific/Tarawa": "Pacific/Tarawa",
+ "Pacific/Tongatapu": "Pacific/Tongatapu",
+ "Pacific/Truk": "Pacific/Truk",
+ "Pacific/Wake": "Pacific/Wake",
+ "Pacific/Wallis": "Pacific/Wallis",
+ "Detect automatically": "Detect automatically",
+ "Comma (,)": "Comma (,)",
+ "Semicolon (;)": "Semicolon (;)",
+ "Tab": "Tab",
+ "Pipe (|)": "Pipe (|)",
+ "Driving": "Driving",
+ "Walking": "Walking",
+ "Bicycling": "Bicycling",
+ "Public transit": "Public transit",
+ "Austria (AT)": "Austria (AT)",
+ "Belgium (BE)": "Belgium (BE)",
+ "Bulgaria (BG)": "Bulgaria (BG)",
+ "Croatia (HR)": "Croatia (HR)",
+ "Cyprus (CY)": "Cyprus (CY)",
+ "Czechia (CZ)": "Czechia (CZ)",
+ "Denmark (DK)": "Denmark (DK)",
+ "Estonia (EE)": "Estonia (EE)",
+ "Finland (FI)": "Finland (FI)",
+ "France (FR)": "France (FR)",
+ "Germany (DE)": "Germany (DE)",
+ "Greece (EL)": "Greece (EL)",
+ "Hungary (HU)": "Hungary (HU)",
+ "Ireland (IE)": "Ireland (IE)",
+ "Italy (IT)": "Italy (IT)",
+ "Latvia (LV)": "Latvia (LV)",
+ "Lithuania (LT)": "Lithuania (LT)",
+ "Luxembourg (LU)": "Luxembourg (LU)",
+ "Malta (MT)": "Malta (MT)",
+ "Netherlands (NL)": "Netherlands (NL)",
+ "Poland (PL)": "Poland (PL)",
+ "Portugal (PT)": "Portugal (PT)",
+ "Romania (RO)": "Romania (RO)",
+ "Slovakia (SK)": "Slovakia (SK)",
+ "Slovenia (SI)": "Slovenia (SI)",
+ "Spain (ES)": "Spain (ES)",
+ "Sweden (SE)": "Sweden (SE)",
+ "Northern Ireland (XI)": "Northern Ireland (XI)",
+ "Greece (GR)": "Greece (GR)",
+ "Female": "Female",
+ "Male": "Male",
+ "Whole number": "Whole number",
+ "Decimal number": "Decimal number",
+ "GET": "GET",
+ "POST": "POST",
+ "PATCH": "PATCH",
+ "PUT": "PUT",
+ "DELETE": "DELETE",
+ "HEAD": "HEAD"
+}
\ No newline at end of file
diff --git a/packages/pieces/community/0codekit/src/index.ts b/packages/pieces/community/0codekit/src/index.ts
new file mode 100644
index 00000000000..dc59ad53e85
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/index.ts
@@ -0,0 +1,92 @@
+import { createCustomApiCallAction } from '@activepieces/pieces-common';
+import { createPiece, PieceCategory } from '@activepieces/pieces-framework';
+import { lookupVatRatesAction } from './lib/actions/business/lookup-vat-rates';
+import { validateBicAction } from './lib/actions/business/validate-bic';
+import { validateEmailAction } from './lib/actions/business/validate-email';
+import { validateIbanAction } from './lib/actions/business/validate-iban';
+import { validateVatIdAction } from './lib/actions/business/validate-vat-id';
+import { validateVatWithCountryCodeAction } from './lib/actions/business/validate-vat-with-country-code';
+import { verifyDomainAction } from './lib/actions/business/verify-domain';
+import { calculateBmiAction } from './lib/actions/calculate/calculate-bmi';
+import { calculateGeoDistanceAction } from './lib/actions/calculate/calculate-geo-distance';
+import { convertCsvToJsonAction } from './lib/actions/convert/convert-csv-to-json';
+import { convertCurrencyAction } from './lib/actions/convert/convert-currency';
+import { convertIpToGeoAction } from './lib/actions/convert/convert-ip-to-geo';
+import { convertIsoToNationAction } from './lib/actions/convert/convert-iso-to-nation';
+import { convertNationToIsoAction } from './lib/actions/convert/convert-nation-to-iso';
+import { convertTimezoneWithDateAction } from './lib/actions/date-and-time/convert-timezone-with-date';
+import { convertTimezoneWithUnixTimestampAction } from './lib/actions/date-and-time/convert-timezone-with-unix-timestamp';
+import { currentMonthAction } from './lib/actions/date-and-time/current-month';
+import { currentWeekAction } from './lib/actions/date-and-time/current-week';
+import { currentWeekFromDateAction } from './lib/actions/date-and-time/current-week-from-date';
+import { currentWeekFromUnixTimestampAction } from './lib/actions/date-and-time/current-week-from-unix-timestamp';
+import { currentWeekWithWeekNumberAction } from './lib/actions/date-and-time/current-week-with-week-number';
+import { currentWeekWithWeekNumberAndYearAction } from './lib/actions/date-and-time/current-week-with-week-number-and-year';
+import { getHolidaysAction } from './lib/actions/date-and-time/get-holidays';
+import { isWeekendAction } from './lib/actions/date-and-time/is-weekend';
+import { isWeekendWithFormatAction } from './lib/actions/date-and-time/is-weekend-with-format';
+import { specificMonthAndYearAction } from './lib/actions/date-and-time/specific-month-and-year';
+import { getANumberAction } from './lib/actions/generate/get-a-number';
+import { getRandomCityAction } from './lib/actions/generate/get-random-city';
+import { getRandomNameAction } from './lib/actions/generate/get-random-name';
+import { getRandomNameWithGenderAction } from './lib/actions/generate/get-random-name-with-gender';
+import { detectGenderAction } from './lib/actions/text/detect-gender';
+import { splitNameAction } from './lib/actions/text/split-name';
+import { textContainsAction } from './lib/actions/text/text-contains';
+import { zeroCodeKitAuth } from './lib/auth';
+import { ZEROCODEKIT_BASE_URL, zeroCodeKitApi } from './lib/common/client';
+
+export const zeroCodeKit = createPiece({
+ displayName: '0CodeKit',
+ description:
+ 'Ready-made utilities for automations: dates and calendar weeks, conversions and validation.',
+ minimumSupportedRelease: '0.82.0',
+ logoUrl: 'https://cdn.activepieces.com/pieces/0codekit.png',
+ categories: [PieceCategory.DEVELOPER_TOOLS, PieceCategory.PRODUCTIVITY],
+ auth: zeroCodeKitAuth,
+ authors: ['OdaiAhmed99'],
+ actions: [
+ currentMonthAction,
+ specificMonthAndYearAction,
+ currentWeekAction,
+ currentWeekFromDateAction,
+ currentWeekFromUnixTimestampAction,
+ currentWeekWithWeekNumberAction,
+ currentWeekWithWeekNumberAndYearAction,
+ isWeekendAction,
+ isWeekendWithFormatAction,
+ getHolidaysAction,
+ convertTimezoneWithDateAction,
+ convertTimezoneWithUnixTimestampAction,
+ convertCsvToJsonAction,
+ convertCurrencyAction,
+ convertIpToGeoAction,
+ convertIsoToNationAction,
+ convertNationToIsoAction,
+ calculateBmiAction,
+ calculateGeoDistanceAction,
+ validateBicAction,
+ validateEmailAction,
+ validateIbanAction,
+ validateVatWithCountryCodeAction,
+ validateVatIdAction,
+ lookupVatRatesAction,
+ verifyDomainAction,
+ detectGenderAction,
+ splitNameAction,
+ textContainsAction,
+ getRandomCityAction,
+ getRandomNameAction,
+ getRandomNameWithGenderAction,
+ getANumberAction,
+ createCustomApiCallAction({
+ baseUrl: () => ZEROCODEKIT_BASE_URL,
+ auth: zeroCodeKitAuth,
+ authMapping: async (auth, propsValue) => {
+ zeroCodeKitApi.assertProviderUrl(propsValue['url']?.['url']);
+ return { auth: auth.secret_text };
+ },
+ }),
+ ],
+ triggers: [],
+});
diff --git a/packages/pieces/community/0codekit/src/lib/actions/business/lookup-vat-rates.ts b/packages/pieces/community/0codekit/src/lib/actions/business/lookup-vat-rates.ts
new file mode 100644
index 00000000000..c3708c8726d
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/actions/business/lookup-vat-rates.ts
@@ -0,0 +1,55 @@
+import { createAction } from '@activepieces/pieces-framework';
+import { zeroCodeKitAuth } from '../../auth';
+import { zeroCodeKitApi } from '../../common/client';
+import { zeroCodeKitProps } from '../../common/props';
+import { businessAiOutputSchemas } from '../../common/output-schemas/business-ai';
+
+export const lookupVatRatesAction = createAction({
+ auth: zeroCodeKitAuth,
+ name: 'lookup_vat_rates',
+ classification: 'READ',
+ displayName: 'Lookup VAT Rates',
+ description: 'Get the standard and reduced VAT rates of an EU country.',
+ audience: 'both',
+ aiMetadata: {
+ description:
+ 'Return the standard, reduced, super-reduced and parking VAT rates (in percent) of an EU member state. Rates a country does not have are returned as null. Read-only and safe to retry.',
+ idempotent: true,
+ },
+ props: {
+ countryCode: zeroCodeKitProps.euCountry(),
+ },
+ outputSchema: businessAiOutputSchemas.lookupVatRates,
+ async run({ auth, propsValue }) {
+ const response = await zeroCodeKitApi.post<VatRatesResponse>({
+ apiKey: auth.secret_text,
+ path: '/business/lookupvatrates',
+ body: { countryCode: propsValue.countryCode },
+ });
+ return {
+ country: response.country ?? null,
+ vat_name: response.vat_name ?? null,
+ vat_abbreviation: response.vat_abbr ?? null,
+ standard_rate: response.standard_rate ?? null,
+ reduced_rate: rateOrNull(response.reduced_rate),
+ reduced_rate_alternative: rateOrNull(response.reduced_rate_alt),
+ super_reduced_rate: rateOrNull(response.super_reduced_rate),
+ parking_rate: rateOrNull(response.parking_rate),
+ };
+ },
+});
+
+function rateOrNull(rate: number | boolean | undefined): number | null {
+ return typeof rate === 'number' ? rate : null;
+}
+
+type VatRatesResponse = {
+ country?: string;
+ vat_name?: string;
+ vat_abbr?: string;
+ standard_rate?: number;
+ reduced_rate?: number | boolean;
+ reduced_rate_alt?: number | boolean;
+ super_reduced_rate?: number | boolean;
+ parking_rate?: number | boolean;
+};
diff --git a/packages/pieces/community/0codekit/src/lib/actions/business/validate-bic.ts b/packages/pieces/community/0codekit/src/lib/actions/business/validate-bic.ts
new file mode 100644
index 00000000000..f416c8432d2
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/actions/business/validate-bic.ts
@@ -0,0 +1,39 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { zeroCodeKitAuth } from '../../auth';
+import { zeroCodeKitApi } from '../../common/client';
+import { businessAiOutputSchemas } from '../../common/output-schemas/business-ai';
+
+export const validateBicAction = createAction({
+ auth: zeroCodeKitAuth,
+ name: 'validate_bic',
+ classification: 'READ',
+ displayName: 'Validate a bic',
+ description: 'Check whether a BIC (SWIFT code) is valid.',
+ audience: 'both',
+ aiMetadata: {
+ description:
+ 'Check whether a BIC / SWIFT bank identifier code (8 or 11 characters) is valid. Returns only a true/false result. Read-only and safe to retry.',
+ idempotent: true,
+ },
+ props: {
+ bic: Property.ShortText({
+ displayName: 'BIC',
+ description: 'The BIC or SWIFT code to check.',
+ required: true,
+ placeholder: 'DEUTDEFF',
+ }),
+ },
+ outputSchema: businessAiOutputSchemas.validateBic,
+ async run({ auth, propsValue }) {
+ const response = await zeroCodeKitApi.post<ValidityResponse>({
+ apiKey: auth.secret_text,
+ path: '/business/validate/bic',
+ body: { bic: propsValue.bic.trim() },
+ });
+ return { valid: response.valid ?? null };
+ },
+});
+
+type ValidityResponse = {
+ valid?: boolean;
+};
diff --git a/packages/pieces/community/0codekit/src/lib/actions/business/validate-email.ts b/packages/pieces/community/0codekit/src/lib/actions/business/validate-email.ts
new file mode 100644
index 00000000000..011e864ba56
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/actions/business/validate-email.ts
@@ -0,0 +1,43 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { zeroCodeKitAuth } from '../../auth';
+import { zeroCodeKitApi } from '../../common/client';
+import { businessAiOutputSchemas } from '../../common/output-schemas/business-ai';
+
+export const validateEmailAction = createAction({
+ auth: zeroCodeKitAuth,
+ name: 'validate_email',
+ classification: 'READ',
+ displayName: 'Validates an email and correct it',
+ description: 'Check whether an email address is valid and get a corrected version of it.',
+ audience: 'both',
+ aiMetadata: {
+ description:
+ 'Check whether an email address is valid and return a corrected address when a typo can be fixed (for example gmial.com to gmail.com). Does not send any email. Read-only and safe to retry.',
+ idempotent: true,
+ },
+ props: {
+ email: Property.ShortText({
+ displayName: 'Email',
+ description: 'The email address to check.',
+ required: true,
+ placeholder: '[email protected]',
+ }),
+ },
+ outputSchema: businessAiOutputSchemas.validateEmail,
+ async run({ auth, propsValue }) {
+ const response = await zeroCodeKitApi.post<EmailResponse>({
+ apiKey: auth.secret_text,
+ path: '/business/validate/email',
+ body: { email: propsValue.email.trim() },
+ });
+ return {
+ valid: response.valid ?? null,
+ corrected_email: response.emailCorrected ?? null,
+ };
+ },
+});
+
+type EmailResponse = {
+ valid?: boolean;
+ emailCorrected?: string;
+};
diff --git a/packages/pieces/community/0codekit/src/lib/actions/business/validate-iban.ts b/packages/pieces/community/0codekit/src/lib/actions/business/validate-iban.ts
new file mode 100644
index 00000000000..d2d097d227e
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/actions/business/validate-iban.ts
@@ -0,0 +1,39 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { zeroCodeKitAuth } from '../../auth';
+import { zeroCodeKitApi } from '../../common/client';
+import { businessAiOutputSchemas } from '../../common/output-schemas/business-ai';
+
+export const validateIbanAction = createAction({
+ auth: zeroCodeKitAuth,
+ name: 'validate_iban',
+ classification: 'READ',
+ displayName: 'Validate an IBAN',
+ description: 'Check whether an IBAN bank account number is valid.',
+ audience: 'both',
+ aiMetadata: {
+ description:
+ 'Check whether an IBAN (International Bank Account Number) is valid. Returns only a true/false result. Read-only and safe to retry.',
+ idempotent: true,
+ },
+ props: {
+ iban: Property.ShortText({
+ displayName: 'IBAN',
+ description: 'The IBAN to check.',
+ required: true,
+ placeholder: 'DE02120300000000202051',
+ }),
+ },
+ outputSchema: businessAiOutputSchemas.validateIban,
+ async run({ auth, propsValue }) {
+ const response = await zeroCodeKitApi.post<ValidityResponse>({
+ apiKey: auth.secret_text,
+ path: '/business/validate/iban',
+ body: { iban: propsValue.iban.trim() },
+ });
+ return { valid: response.valid ?? null };
+ },
+});
+
+type ValidityResponse = {
+ valid?: boolean;
+};
diff --git a/packages/pieces/community/0codekit/src/lib/actions/business/validate-vat-id.ts b/packages/pieces/community/0codekit/src/lib/actions/business/validate-vat-id.ts
new file mode 100644
index 00000000000..306c1cc3715
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/actions/business/validate-vat-id.ts
@@ -0,0 +1,35 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { zeroCodeKitAuth } from '../../auth';
+import { vatApi } from '../../common/vat';
+import { businessAiOutputSchemas } from '../../common/output-schemas/business-ai';
+
+export const validateVatIdAction = createAction({
+ auth: zeroCodeKitAuth,
+ name: 'validate_vat_id',
+ classification: 'READ',
+ displayName: 'Checks validity of a VAT ID',
+ description: 'Check a full EU VAT ID, including its country prefix, against VIES.',
+ audience: 'both',
+ aiMetadata: {
+ description:
+ 'Validate a full EU VAT ID that starts with its two-letter country prefix (for example DE123456789) against the VIES service, and return the registered company name and address when available. Use "Validate vat with Countrycode and plain ID" when the country and number are separate. Read-only and safe to retry.',
+ idempotent: true,
+ },
+ props: {
+ vatId: Property.ShortText({
+ displayName: 'VAT ID',
+ description: 'The full VAT ID, starting with the two-letter country code.',
+ required: true,
+ placeholder: 'DE123456789',
+ }),
+ },
+ outputSchema: businessAiOutputSchemas.validateVatId,
+ async run({ auth, propsValue }) {
+ return vatApi.validate({
+ apiKey: auth.secret_text,
+ body: {
+ vatId: propsValue.vatId.replace(/\s+/g, '').toUpperCase(),
+ },
+ });
+ },
+});
diff --git a/packages/pieces/community/0codekit/src/lib/actions/business/validate-vat-with-country-code.ts b/packages/pieces/community/0codekit/src/lib/actions/business/validate-vat-with-country-code.ts
new file mode 100644
index 00000000000..e567b57a3e4
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/actions/business/validate-vat-with-country-code.ts
@@ -0,0 +1,38 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { zeroCodeKitAuth } from '../../auth';
+import { zeroCodeKitProps } from '../../common/props';
+import { vatApi } from '../../common/vat';
+import { businessAiOutputSchemas } from '../../common/output-schemas/business-ai';
+
+export const validateVatWithCountryCodeAction = createAction({
+ auth: zeroCodeKitAuth,
+ name: 'validate_vat_with_country_code',
+ classification: 'READ',
+ displayName: 'Validate vat with Countrycode and plain ID',
+ description: 'Check an EU VAT number against VIES, with the country and the number given separately.',
+ audience: 'both',
+ aiMetadata: {
+ description:
+ 'Validate an EU VAT number against the VIES service when the country code and the number part are separate values, and return the registered company name and address when available. Use "Checks validity of a VAT ID" when you have the full ID with its country prefix. Read-only and safe to retry.',
+ idempotent: true,
+ },
+ props: {
+ countryCode: zeroCodeKitProps.viesCountry(),
+ id: Property.ShortText({
+ displayName: 'VAT Number',
+ description: 'The VAT number without the country prefix, for example `07643520567`.',
+ required: true,
+ placeholder: '07643520567',
+ }),
+ },
+ outputSchema: businessAiOutputSchemas.validateVatWithCountryCode,
+ async run({ auth, propsValue }) {
+ return vatApi.validate({
+ apiKey: auth.secret_text,
+ body: {
+ countryCode: propsValue.countryCode,
+ id: propsValue.id.replace(/\s+/g, ''),
+ },
+ });
+ },
+});
diff --git a/packages/pieces/community/0codekit/src/lib/actions/business/verify-domain.ts b/packages/pieces/community/0codekit/src/lib/actions/business/verify-domain.ts
new file mode 100644
index 00000000000..8c2b3b1fdc8
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/actions/business/verify-domain.ts
@@ -0,0 +1,43 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { zeroCodeKitAuth } from '../../auth';
+import { zeroCodeKitApi } from '../../common/client';
+import { businessAiOutputSchemas } from '../../common/output-schemas/business-ai';
+
+export const verifyDomainAction = createAction({
+ auth: zeroCodeKitAuth,
+ name: 'verify_domain',
+ classification: 'READ',
+ displayName: 'Verify a Domain',
+ description: 'Check whether a domain or website is reachable and get its main domain.',
+ audience: 'both',
+ aiMetadata: {
+ description:
+ 'Check whether a domain or website URL is valid by requesting it, and return the main domain without subdomains. Read-only and safe to retry.',
+ idempotent: true,
+ },
+ props: {
+ domain: Property.ShortText({
+ displayName: 'Domain',
+ description: 'The domain or website to check, for example `https://www.example.com`.',
+ required: true,
+ placeholder: 'https://www.example.com',
+ }),
+ },
+ outputSchema: businessAiOutputSchemas.verifyDomain,
+ async run({ auth, propsValue }) {
+ const response = await zeroCodeKitApi.post<VerifyDomainResponse>({
+ apiKey: auth.secret_text,
+ path: '/business/verify/domain',
+ body: { domain: propsValue.domain.trim() },
+ });
+ return {
+ is_valid: response.isValid ?? null,
+ main_domain: response.mainDomain ?? null,
+ };
+ },
+});
+
+type VerifyDomainResponse = {
+ mainDomain?: string;
+ isValid?: boolean;
+};
diff --git a/packages/pieces/community/0codekit/src/lib/actions/calculate/calculate-bmi.ts b/packages/pieces/community/0codekit/src/lib/actions/calculate/calculate-bmi.ts
new file mode 100644
index 00000000000..4dc7d50a82a
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/actions/calculate/calculate-bmi.ts
@@ -0,0 +1,62 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { zeroCodeKitAuth } from '../../auth';
+import { zeroCodeKitApi } from '../../common/client';
+import { dateConvertSchemas } from '../../common/output-schemas/date-convert';
+
+export const calculateBmiAction = createAction({
+ auth: zeroCodeKitAuth,
+ name: 'calculate_bmi',
+ classification: 'READ',
+ displayName: 'Calculate BMI',
+ description: 'Calculate body mass index, desirable weight and daily nutrient needs from height and weight.',
+ audience: 'both',
+ aiMetadata: {
+ description:
+ 'Calculate BMI and its classification from weight in kilograms and height in centimetres, plus desirable body weight, daily calories and daily carbohydrate, protein and fat in grams. Convert pounds or inches first. Read-only and safe to retry.',
+ idempotent: true,
+ },
+ props: {
+ weight: Property.Number({
+ displayName: 'Weight (kg)',
+ description: 'Body weight in kilograms.',
+ required: true,
+ }),
+ height: Property.Number({
+ displayName: 'Height (cm)',
+ description: 'Body height in centimetres.',
+ required: true,
+ }),
+ },
+ outputSchema: dateConvertSchemas.bmi,
+ async run({ auth, propsValue }) {
+ const response = await zeroCodeKitApi.post<BmiResponse>({
+ apiKey: auth.secret_text,
+ path: '/calculate/bmi',
+ body: {
+ weight: propsValue.weight,
+ height: propsValue.height,
+ },
+ });
+ return {
+ bmi: response.bmi ?? null,
+ classification: response.bmiClassification ?? null,
+ desirable_body_weight_kg: response.dbw ?? null,
+ daily_calories_kcal: response.kcal ?? null,
+ daily_carbohydrates_g: response.nutrients?.carbohydrates ?? null,
+ daily_protein_g: response.nutrients?.protein ?? null,
+ daily_fat_g: response.nutrients?.fat ?? null,
+ };
+ },
+});
+
+type BmiResponse = {
+ bmi?: number;
+ bmiClassification?: string;
+ dbw?: number;
+ kcal?: number;
+ nutrients?: {
+ carbohydrates?: number;
+ protein?: number;
+ fat?: number;
+ };
+};
diff --git a/packages/pieces/community/0codekit/src/lib/actions/calculate/calculate-geo-distance.ts b/packages/pieces/community/0codekit/src/lib/actions/calculate/calculate-geo-distance.ts
new file mode 100644
index 00000000000..b0e71ef789d
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/actions/calculate/calculate-geo-distance.ts
@@ -0,0 +1,71 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { zeroCodeKitAuth } from '../../auth';
+import { zeroCodeKitApi } from '../../common/client';
+import { dateConvertSchemas } from '../../common/output-schemas/date-convert';
+
+export const calculateGeoDistanceAction = createAction({
+ auth: zeroCodeKitAuth,
+ name: 'calculate_geo_distance',
+ classification: 'READ',
+ displayName: 'Calculate Geo Distance',
+ description: 'Get the travel distance and time between two addresses.',
+ audience: 'both',
+ aiMetadata: {
+ description:
+ 'Return the route distance in kilometres and the estimated travel time between two addresses or places for a travel mode (driving, walking, bicycling, transit). This is a route distance, not a straight line. Read-only and safe to retry.',
+ idempotent: true,
+ },
+ props: {
+ startPoint: Property.ShortText({
+ displayName: 'Start Address',
+ description: 'Where the trip starts. An address, city or place name.',
+ required: true,
+ placeholder: 'Berlin',
+ }),
+ endPoint: Property.ShortText({
+ displayName: 'End Address',
+ description: 'Where the trip ends. An address, city or place name.',
+ required: true,
+ placeholder: 'Munich',
+ }),
+ mode: Property.StaticDropdown({
+ displayName: 'Travel Mode',
+ description: 'How the trip is made. This changes the route and the travel time.',
+ required: true,
+ defaultValue: 'driving',
+ options: {
+ options: [
+ { label: 'Driving', value: 'driving' },
+ { label: 'Walking', value: 'walking' },
+ { label: 'Bicycling', value: 'bicycling' },
+ { label: 'Public transit', value: 'transit' },
+ ],
+ },
+ }),
+ },
+ outputSchema: dateConvertSchemas.geoDistance,
+ async run({ auth, propsValue }) {
+ const response = await zeroCodeKitApi.post<GeoDistanceResponse>({
+ apiKey: auth.secret_text,
+ path: '/calculate/geodistance-v2',
+ body: {
+ startPoint: propsValue.startPoint,
+ endPoint: propsValue.endPoint,
+ mode: propsValue.mode,
+ },
+ });
+ return {
+ distance_km: response.distanceInKM ?? null,
+ duration_hours: response.duration?.hours ?? null,
+ duration_minutes: response.duration?.minutes ?? null,
+ };
+ },
+});
+
+type GeoDistanceResponse = {
+ distanceInKM?: number;
+ duration?: {
+ hours?: number;
+ minutes?: number;
+ };
+};
diff --git a/packages/pieces/community/0codekit/src/lib/actions/convert/convert-csv-to-json.ts b/packages/pieces/community/0codekit/src/lib/actions/convert/convert-csv-to-json.ts
new file mode 100644
index 00000000000..6f9077a3f7d
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/actions/convert/convert-csv-to-json.ts
@@ -0,0 +1,77 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { zeroCodeKitAuth } from '../../auth';
+import { zeroCodeKitApi } from '../../common/client';
+import { dateConvertSchemas } from '../../common/output-schemas/date-convert';
+
+export const convertCsvToJsonAction = createAction({
+ auth: zeroCodeKitAuth,
+ name: 'convert_csv_to_json',
+ classification: 'READ',
+ displayName: 'Convert CSV to JSON',
+ description: 'Turn CSV text into a list of rows you can loop over.',
+ audience: 'both',
+ aiMetadata: {
+ description:
+ 'Parse CSV text into a list of JSON objects, one per row, keyed by the header row unless the first row is data. Pass the CSV content itself, not a file or URL. Read-only and safe to retry.',
+ idempotent: true,
+ },
+ props: {
+ csv: Property.LongText({
+ displayName: 'CSV',
+ description: 'The CSV content to convert, including the header row.',
+ required: true,
+ }),
+ delimiter: Property.StaticDropdown({
+ displayName: 'Delimiter',
+ description: 'The character that separates columns.',
+ required: true,
+ defaultValue: 'auto',
+ options: {
+ options: [
+ { label: 'Detect automatically', value: 'auto' },
+ { label: 'Comma (,)', value: ',' },
+ { label: 'Semicolon (;)', value: ';' },
+ { label: 'Tab', value: '\t' },
+ { label: 'Pipe (|)', value: '|' },
+ ],
+ },
+ }),
+ noHeader: Property.Checkbox({
+ displayName: 'First Row Is Data',
+ description: 'Turn on when the CSV has no header row; columns become field1, field2.',
+ required: false,
+ defaultValue: false,
+ }),
+ trim: Property.Checkbox({
+ displayName: 'Trim Spaces',
+ description: 'Remove spaces around each value.',
+ required: false,
+ defaultValue: true,
+ }),
+ ignoreEmpty: Property.Checkbox({
+ displayName: 'Skip Empty Values',
+ description: 'Leave empty cells out of each row instead of returning empty text.',
+ required: false,
+ defaultValue: false,
+ }),
+ },
+ outputSchema: dateConvertSchemas.csvToJson,
+ async run({ auth, propsValue }) {
+ const response = await zeroCodeKitApi.post<CsvToJsonResponse>({
+ apiKey: auth.secret_text,
+ path: '/convert/csv/json',
+ body: {
+ csv: propsValue.csv,
+ delimiter: propsValue.delimiter === 'auto' ? 'auto' : [propsValue.delimiter],
+ noheader: propsValue.noHeader ?? false,
+ trim: propsValue.trim ?? true,
+ ignoreEmpty: propsValue.ignoreEmpty ?? false,
+ },
+ });
+ return response.json ?? [];
+ },
+});
+
+type CsvToJsonResponse = {
+ json?: unknown[];
+};
diff --git a/packages/pieces/community/0codekit/src/lib/actions/convert/convert-currency.ts b/packages/pieces/community/0codekit/src/lib/actions/convert/convert-currency.ts
new file mode 100644
index 00000000000..b7c40ef4f96
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/actions/convert/convert-currency.ts
@@ -0,0 +1,71 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { zeroCodeKitAuth } from '../../auth';
+import { zeroCodeKitApi } from '../../common/client';
+import { dateConvertSchemas } from '../../common/output-schemas/date-convert';
+
+export const convertCurrencyAction = createAction({
+ auth: zeroCodeKitAuth,
+ name: 'convert_currency',
+ classification: 'READ',
+ displayName: 'Convert Currency',
+ description: 'Convert an amount from one currency to another at the latest exchange rate.',
+ audience: 'both',
+ aiMetadata: {
+ description:
+ 'Convert an amount between two currencies given as ISO 4217 codes (USD, EUR, GBP) using the most recent exchange rate 0CodeKit has, and return the date of that rate. Read-only and safe to retry, though the rate can change between calls.',
+ idempotent: true,
+ },
+ props: {
+ amount: Property.Number({
+ displayName: 'Amount',
+ description: 'The amount to convert.',
+ required: true,
+ }),
+ sourceCurrency: Property.ShortText({
+ displayName: 'From Currency',
+ description: 'The three-letter currency code of the amount, for example `USD`.',
+ required: true,
+ placeholder: 'USD',
+ }),
+ targetCurrency: Property.ShortText({
+ displayName: 'To Currency',
+ description: 'The three-letter currency code to convert to, for example `EUR`.',
+ required: true,
+ placeholder: 'EUR',
+ }),
+ dateFormat: Property.ShortText({
+ displayName: 'Rate Date Format',
+ description: 'How the rate date is written, using `DD`, `MM` and `YYYY` tokens.',
+ required: false,
+ placeholder: 'DD.MM.YYYY',
+ }),
+ },
+ outputSchema: dateConvertSchemas.currency,
+ async run({ auth, propsValue }) {
+ const response = await zeroCodeKitApi.post<CurrencyResponse>({
+ apiKey: auth.secret_text,
+ path: '/convert/currency',
+ body: {
+ amount: propsValue.amount,
+ sourceCurrency: propsValue.sourceCurrency.trim().toUpperCase(),
+ targetCurrency: propsValue.targetCurrency.trim().toUpperCase(),
+ dateFormat: propsValue.dateFormat,
+ },
+ });
+ return {
+ converted_amount: response.convertedAmount ?? null,
+ converted_currency: response.currency ?? null,
+ original_amount: response.oldAmount ?? null,
+ original_currency: response.oldCurrency ?? null,
+ rate_date: response.dataDate ?? null,
+ };
+ },
+});
+
+type CurrencyResponse = {
+ oldAmount?: number;
+ oldCurrency?: string;
+ convertedAmount?: number;
+ currency?: string;
+ dataDate?: string;
+};
diff --git a/packages/pieces/community/0codekit/src/lib/actions/convert/convert-ip-to-geo.ts b/packages/pieces/community/0codekit/src/lib/actions/convert/convert-ip-to-geo.ts
new file mode 100644
index 00000000000..c7dd9a33a34
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/actions/convert/convert-ip-to-geo.ts
@@ -0,0 +1,66 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { zeroCodeKitAuth } from '../../auth';
+import { zeroCodeKitApi } from '../../common/client';
+import { dateConvertSchemas } from '../../common/output-schemas/date-convert';
+
+export const convertIpToGeoAction = createAction({
+ auth: zeroCodeKitAuth,
+ name: 'convert_ip_to_geo',
+ classification: 'READ',
+ displayName: 'Convert IP to Geo',
+ description: 'Look up the country, city, coordinates and provider of an IP address.',
+ audience: 'both',
+ aiMetadata: {
+ description:
+ 'Geolocate a public IPv4 or IPv6 address and return its country, region, city, postal code, latitude/longitude, time zone and internet provider. Private or local addresses cannot be located. Read-only and safe to retry.',
+ idempotent: true,
+ },
+ props: {
+ ip: Property.ShortText({
+ displayName: 'IP Address',
+ description: 'The public IP address to look up.',
+ required: true,
+ placeholder: '87.155.190.147',
+ }),
+ },
+ outputSchema: dateConvertSchemas.ipToGeo,
+ async run({ auth, propsValue }) {
+ const response = await zeroCodeKitApi.post<IpToGeoResponse>({
+ apiKey: auth.secret_text,
+ path: '/convert/iptogeo',
+ body: { ip: propsValue.ip.trim() },
+ });
+ return {
+ ip: response.query ?? null,
+ country: response.country ?? null,
+ country_code: response.countryCode ?? null,
+ region_code: response.region ?? null,
+ region_name: response.regionName ?? null,
+ city: response.city ?? null,
+ zip: response.zip ?? null,
+ latitude: response.lat ?? null,
+ longitude: response.lon ?? null,
+ time_zone: response.timezone ?? null,
+ isp: response.isp ?? null,
+ organization: response.org ?? null,
+ autonomous_system: response.as ?? null,
+ };
+ },
+});
+
+type IpToGeoResponse = {
+ status?: string;
+ country?: string;
+ countryCode?: string;
+ region?: string;
+ regionName?: string;
+ city?: string;
+ zip?: string;
+ lat?: number;
+ lon?: number;
+ timezone?: string;
+ isp?: string;
+ org?: string;
+ as?: string;
+ query?: string;
+};
diff --git a/packages/pieces/community/0codekit/src/lib/actions/convert/convert-iso-to-nation.ts b/packages/pieces/community/0codekit/src/lib/actions/convert/convert-iso-to-nation.ts
new file mode 100644
index 00000000000..095ee739b4c
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/actions/convert/convert-iso-to-nation.ts
@@ -0,0 +1,33 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { zeroCodeKitAuth } from '../../auth';
+import { nationIsoApi } from '../../common/nation-iso';
+import { dateConvertSchemas } from '../../common/output-schemas/date-convert';
+
+export const convertIsoToNationAction = createAction({
+ auth: zeroCodeKitAuth,
+ name: 'convert_iso_to_nation',
+ classification: 'READ',
+ displayName: 'Convert ISO to Nation',
+ description: 'Get the English country name for an ISO country code.',
+ audience: 'both',
+ aiMetadata: {
+ description:
+ 'Return the English country name for an ISO country code such as DE. Use "Convert Nation to ISO" for the reverse direction. Read-only and safe to retry.',
+ idempotent: true,
+ },
+ props: {
+ iso: Property.ShortText({
+ displayName: 'ISO Country Code',
+ description: 'The ISO country code, for example `DE`.',
+ required: true,
+ placeholder: 'DE',
+ }),
+ },
+ outputSchema: dateConvertSchemas.nationIso,
+ async run({ auth, propsValue }) {
+ return nationIsoApi.convert({
+ apiKey: auth.secret_text,
+ body: { iso: propsValue.iso.trim() },
+ });
+ },
+});
diff --git a/packages/pieces/community/0codekit/src/lib/actions/convert/convert-nation-to-iso.ts b/packages/pieces/community/0codekit/src/lib/actions/convert/convert-nation-to-iso.ts
new file mode 100644
index 00000000000..da9c249ad88
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/actions/convert/convert-nation-to-iso.ts
@@ -0,0 +1,33 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { zeroCodeKitAuth } from '../../auth';
+import { nationIsoApi } from '../../common/nation-iso';
+import { dateConvertSchemas } from '../../common/output-schemas/date-convert';
+
+export const convertNationToIsoAction = createAction({
+ auth: zeroCodeKitAuth,
+ name: 'convert_nation_to_iso',
+ classification: 'READ',
+ displayName: 'Convert Nation to ISO',
+ description: 'Get the ISO country code for an English country name.',
+ audience: 'both',
+ aiMetadata: {
+ description:
+ 'Return the ISO country code for a country name written in English, such as Germany. Use "Convert ISO to Nation" for the reverse direction. Read-only and safe to retry.',
+ idempotent: true,
+ },
+ props: {
+ nation: Property.ShortText({
+ displayName: 'Country Name',
+ description: 'The country name in English, for example `Germany`.',
+ required: true,
+ placeholder: 'Germany',
+ }),
+ },
+ outputSchema: dateConvertSchemas.nationIso,
+ async run({ auth, propsValue }) {
+ return nationIsoApi.convert({
+ apiKey: auth.secret_text,
+ body: { nation: propsValue.nation.trim() },
+ });
+ },
+});
diff --git a/packages/pieces/community/0codekit/src/lib/actions/date-and-time/convert-timezone-with-date.ts b/packages/pieces/community/0codekit/src/lib/actions/date-and-time/convert-timezone-with-date.ts
new file mode 100644
index 00000000000..20e08afa2c8
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/actions/date-and-time/convert-timezone-with-date.ts
@@ -0,0 +1,55 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { zeroCodeKitAuth } from '../../auth';
+import { dateAndTimeApi } from '../../common/date-and-time';
+import { zeroCodeKitProps } from '../../common/props';
+import { dateConvertSchemas } from '../../common/output-schemas/date-convert';
+
+export const convertTimezoneWithDateAction = createAction({
+ auth: zeroCodeKitAuth,
+ name: 'convert_timezone_with_date',
+ classification: 'READ',
+ displayName: 'Convert Between Timezones with Date',
+ description: 'Convert a date and time from one time zone to another.',
+ audience: 'both',
+ aiMetadata: {
+ description:
+ 'Convert a date and time written as text from a source time zone to a destination time zone, optionally reformatting it. Use "Convert Between Timezones with Unix Timestamp" when the input is a numeric timestamp. Read-only and safe to retry.',
+ idempotent: true,
+ },
+ props: {
+ inputTime: Property.ShortText({
+ displayName: 'Date and Time',
+ description: 'The date and time to convert, for example `2025-01-20 14:30`.',
+ required: true,
+ placeholder: '2025-01-20 14:30',
+ }),
+ inputTimeZone: zeroCodeKitProps.timeZone({
+ displayName: 'From Time Zone',
+ description: 'The time zone the date and time above is in.',
+ required: true,
+ }),
+ destinationTimeZone: zeroCodeKitProps.timeZone({
+ displayName: 'To Time Zone',
+ description: 'The time zone to convert to.',
+ required: true,
+ }),
+ formatPattern: zeroCodeKitProps.dateFormat({
+ displayName: 'Output Format',
+ description:
+ 'How the converted time is written, using tokens such as `DD.MM.YYYY HH:mm`. Leave empty to use the 0CodeKit default.',
+ required: false,
+ }),
+ },
+ outputSchema: dateConvertSchemas.switchTimeZone,
+ async run({ auth, propsValue }) {
+ return dateAndTimeApi.switchTimeZone({
+ apiKey: auth.secret_text,
+ body: {
+ inputTime: propsValue.inputTime,
+ inputTimeZone: propsValue.inputTimeZone,
+ destinationTimeZone: propsValue.destinationTimeZone,
+ formatPattern: propsValue.formatPattern,
+ },
+ });
+ },
+});
diff --git a/packages/pieces/community/0codekit/src/lib/actions/date-and-time/convert-timezone-with-unix-timestamp.ts b/packages/pieces/community/0codekit/src/lib/actions/date-and-time/convert-timezone-with-unix-timestamp.ts
new file mode 100644
index 00000000000..67e944de9f5
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/actions/date-and-time/convert-timezone-with-unix-timestamp.ts
@@ -0,0 +1,55 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { zeroCodeKitAuth } from '../../auth';
+import { dateAndTimeApi } from '../../common/date-and-time';
+import { zeroCodeKitProps } from '../../common/props';
+import { dateConvertSchemas } from '../../common/output-schemas/date-convert';
+
+export const convertTimezoneWithUnixTimestampAction = createAction({
+ auth: zeroCodeKitAuth,
+ name: 'convert_timezone_with_unix_timestamp',
+ classification: 'READ',
+ displayName: 'Convert Between Timezones with Unix Timestamp',
+ description: 'Show a Unix timestamp as a date and time in another time zone.',
+ audience: 'both',
+ aiMetadata: {
+ description:
+ 'Convert a Unix timestamp in seconds into a formatted date and time in the destination time zone. Use "Convert Between Timezones with Date" when the input is a date written as text. Read-only and safe to retry.',
+ idempotent: true,
+ },
+ props: {
+ inputTime: Property.Number({
+ displayName: 'Unix Timestamp',
+ description: 'The moment to convert, in seconds since 1 January 1970.',
+ required: true,
+ placeholder: '1737331200',
+ }),
+ inputTimeZone: zeroCodeKitProps.timeZone({
+ displayName: 'From Time Zone',
+ description: 'The time zone of the timestamp. Unix timestamps are normally UTC.',
+ required: false,
+ }),
+ destinationTimeZone: zeroCodeKitProps.timeZone({
+ displayName: 'To Time Zone',
+ description: 'The time zone to convert to.',
+ required: true,
+ }),
+ formatPattern: zeroCodeKitProps.dateFormat({
+ displayName: 'Output Format',
+ description:
+ 'How the converted time is written, using tokens such as `DD.MM.YYYY HH:mm`. Leave empty to use the 0CodeKit default.',
+ required: false,
+ }),
+ },
+ outputSchema: dateConvertSchemas.switchTimeZone,
+ async run({ auth, propsValue }) {
+ return dateAndTimeApi.switchTimeZone({
+ apiKey: auth.secret_text,
+ body: {
+ inputTime: propsValue.inputTime,
+ inputTimeZone: propsValue.inputTimeZone ?? 'UTC',
+ destinationTimeZone: propsValue.destinationTimeZone,
+ formatPattern: propsValue.formatPattern,
+ },
+ });
+ },
+});
diff --git a/packages/pieces/community/0codekit/src/lib/actions/date-and-time/current-month.ts b/packages/pieces/community/0codekit/src/lib/actions/date-and-time/current-month.ts
new file mode 100644
index 00000000000..8a1d807b7fa
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/actions/date-and-time/current-month.ts
@@ -0,0 +1,33 @@
+import { createAction } from '@activepieces/pieces-framework';
+import { zeroCodeKitAuth } from '../../auth';
+import { dateAndTimeApi } from '../../common/date-and-time';
+import { zeroCodeKitProps } from '../../common/props';
+import { dateConvertSchemas } from '../../common/output-schemas/date-convert';
+
+export const currentMonthAction = createAction({
+ auth: zeroCodeKitAuth,
+ name: 'current_month',
+ classification: 'READ',
+ displayName: 'Current Month',
+ description: 'Get the days, workdays, Saturdays and Sundays of the current month.',
+ audience: 'both',
+ aiMetadata: {
+ description:
+ 'Return the number of days, first and last day, last workday, and the lists of workdays, Saturdays and Sundays for the month that is current right now. Use Specific Month and Year for any other month. Read-only and safe to retry.',
+ idempotent: true,
+ },
+ props: {
+ outputFormat: zeroCodeKitProps.outputFormat(),
+ returnTimestamps: zeroCodeKitProps.returnTimestamps(),
+ },
+ outputSchema: dateConvertSchemas.month,
+ async run({ auth, propsValue }) {
+ return dateAndTimeApi.month({
+ apiKey: auth.secret_text,
+ body: {
+ outputFormat: propsValue.outputFormat,
+ options: dateAndTimeApi.monthOptions({ returnTimestamps: propsValue.returnTimestamps }),
+ },
+ });
+ },
+});
diff --git a/packages/pieces/community/0codekit/src/lib/actions/date-and-time/current-week-from-date.ts b/packages/pieces/community/0codekit/src/lib/actions/date-and-time/current-week-from-date.ts
new file mode 100644
index 00000000000..a35634f89c6
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/actions/date-and-time/current-week-from-date.ts
@@ -0,0 +1,45 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { zeroCodeKitAuth } from '../../auth';
+import { dateAndTimeApi } from '../../common/date-and-time';
+import { zeroCodeKitProps } from '../../common/props';
+import { dateConvertSchemas } from '../../common/output-schemas/date-convert';
+
+export const currentWeekFromDateAction = createAction({
+ auth: zeroCodeKitAuth,
+ name: 'current_week_from_date',
+ classification: 'READ',
+ displayName: 'Current Week from Date',
+ description: 'Get the calendar week number and the first and last day of the week a date falls in.',
+ audience: 'both',
+ aiMetadata: {
+ description:
+ 'Return the calendar week number of a date written as text, plus the first and last day of that week. The Date Format must describe how the date is written. Use "Current Week from Unix Timestamp" for numeric timestamps. Read-only and safe to retry.',
+ idempotent: true,
+ },
+ props: {
+ date: Property.ShortText({
+ displayName: 'Date',
+ description: 'The date to look up, written in the format below.',
+ required: true,
+ placeholder: '20.01.2025',
+ }),
+ dateFormat: zeroCodeKitProps.dateFormat({
+ displayName: 'Date Format',
+ description:
+ 'How the date above is written, using tokens such as `DD` (day), `MM` (month) and `YYYY` (year). For example `DD.MM.YYYY` for 20.01.2025 or `YYYY-MM-DD` for 2025-01-20.',
+ required: true,
+ }),
+ outputFormat: zeroCodeKitProps.outputFormat(),
+ },
+ outputSchema: dateConvertSchemas.calendarWeek,
+ async run({ auth, propsValue }) {
+ return dateAndTimeApi.calendarWeek({
+ apiKey: auth.secret_text,
+ body: {
+ date: propsValue.date,
+ dateFormat: propsValue.dateFormat,
+ outputFormat: propsValue.outputFormat,
+ },
+ });
+ },
+});
diff --git a/packages/pieces/community/0codekit/src/lib/actions/date-and-time/current-week-from-unix-timestamp.ts b/packages/pieces/community/0codekit/src/lib/actions/date-and-time/current-week-from-unix-timestamp.ts
new file mode 100644
index 00000000000..abc810fda0c
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/actions/date-and-time/current-week-from-unix-timestamp.ts
@@ -0,0 +1,38 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { zeroCodeKitAuth } from '../../auth';
+import { dateAndTimeApi } from '../../common/date-and-time';
+import { zeroCodeKitProps } from '../../common/props';
+import { dateConvertSchemas } from '../../common/output-schemas/date-convert';
+
+export const currentWeekFromUnixTimestampAction = createAction({
+ auth: zeroCodeKitAuth,
+ name: 'current_week_from_unix_timestamp',
+ classification: 'READ',
+ displayName: 'Current Week from Unix Timestamp',
+ description: 'Get the calendar week number and the first and last day of the week a Unix timestamp falls in.',
+ audience: 'both',
+ aiMetadata: {
+ description:
+ 'Return the calendar week number of a Unix timestamp in seconds, plus the first and last day of that week. Use "Current Week from Date" when the date is text. Read-only and safe to retry.',
+ idempotent: true,
+ },
+ props: {
+ unixTimestamp: Property.Number({
+ displayName: 'Unix Timestamp',
+ description: 'The moment to look up, in seconds since 1 January 1970.',
+ required: true,
+ placeholder: '1737331200',
+ }),
+ outputFormat: zeroCodeKitProps.outputFormat(),
+ },
+ outputSchema: dateConvertSchemas.calendarWeek,
+ async run({ auth, propsValue }) {
+ return dateAndTimeApi.calendarWeek({
+ apiKey: auth.secret_text,
+ body: {
+ unixTimestamp: propsValue.unixTimestamp,
+ outputFormat: propsValue.outputFormat,
+ },
+ });
+ },
+});
diff --git a/packages/pieces/community/0codekit/src/lib/actions/date-and-time/current-week-with-week-number-and-year.ts b/packages/pieces/community/0codekit/src/lib/actions/date-and-time/current-week-with-week-number-and-year.ts
new file mode 100644
index 00000000000..6bbe0f0398e
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/actions/date-and-time/current-week-with-week-number-and-year.ts
@@ -0,0 +1,44 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { zeroCodeKitAuth } from '../../auth';
+import { dateAndTimeApi } from '../../common/date-and-time';
+import { dateInput } from '../../common/date-input';
+import { zeroCodeKitProps } from '../../common/props';
+import { dateConvertSchemas } from '../../common/output-schemas/date-convert';
+
+export const currentWeekWithWeekNumberAndYearAction = createAction({
+ auth: zeroCodeKitAuth,
+ name: 'current_week_with_week_number_and_year',
+ classification: 'READ',
+ displayName: 'Current Week with Week Number and Year',
+ description: 'Get the first and last day of a calendar week in a chosen year.',
+ audience: 'both',
+ aiMetadata: {
+ description:
+ 'Return the first and last day of a calendar week number in a given year. Use "Current Week only with Week Number" when the year is the current one. Read-only and safe to retry.',
+ idempotent: true,
+ },
+ props: {
+ weekNumber: Property.Number({
+ displayName: 'Week Number',
+ description: 'The calendar week number, from 1 to 53.',
+ required: true,
+ }),
+ year: Property.Number({
+ displayName: 'Year',
+ description: 'The four-digit year, for example 2025.',
+ required: true,
+ }),
+ outputFormat: zeroCodeKitProps.outputFormat(),
+ },
+ outputSchema: dateConvertSchemas.calendarWeek,
+ async run({ auth, propsValue }) {
+ return dateAndTimeApi.calendarWeek({
+ apiKey: auth.secret_text,
+ body: {
+ date: dateInput.isoWeekMonday({ weekNumber: propsValue.weekNumber, year: propsValue.year }),
+ dateFormat: 'DD.MM.YYYY',
+ outputFormat: propsValue.outputFormat,
+ },
+ });
+ },
+});
diff --git a/packages/pieces/community/0codekit/src/lib/actions/date-and-time/current-week-with-week-number.ts b/packages/pieces/community/0codekit/src/lib/actions/date-and-time/current-week-with-week-number.ts
new file mode 100644
index 00000000000..64ddfc7a666
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/actions/date-and-time/current-week-with-week-number.ts
@@ -0,0 +1,39 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { zeroCodeKitAuth } from '../../auth';
+import { dateAndTimeApi } from '../../common/date-and-time';
+import { dateInput } from '../../common/date-input';
+import { zeroCodeKitProps } from '../../common/props';
+import { dateConvertSchemas } from '../../common/output-schemas/date-convert';
+
+export const currentWeekWithWeekNumberAction = createAction({
+ auth: zeroCodeKitAuth,
+ name: 'current_week_with_week_number',
+ classification: 'READ',
+ displayName: 'Current Week only with Week Number',
+ description: 'Get the first and last day of a calendar week in the current year.',
+ audience: 'both',
+ aiMetadata: {
+ description:
+ 'Return the first and last day of a calendar week number in the current year. Use "Current Week with Week Number and Year" to pick a different year. Read-only and safe to retry.',
+ idempotent: true,
+ },
+ props: {
+ weekNumber: Property.Number({
+ displayName: 'Week Number',
+ description: 'The calendar week number, from 1 to 53.',
+ required: true,
+ }),
+ outputFormat: zeroCodeKitProps.outputFormat(),
+ },
+ outputSchema: dateConvertSchemas.calendarWeek,
+ async run({ auth, propsValue }) {
+ return dateAndTimeApi.calendarWeek({
+ apiKey: auth.secret_text,
+ body: {
+ date: dateInput.isoWeekMonday({ weekNumber: propsValue.weekNumber, year: new Date().getUTCFullYear() }),
+ dateFormat: 'DD.MM.YYYY',
+ outputFormat: propsValue.outputFormat,
+ },
+ });
+ },
+});
diff --git a/packages/pieces/community/0codekit/src/lib/actions/date-and-time/current-week.ts b/packages/pieces/community/0codekit/src/lib/actions/date-and-time/current-week.ts
new file mode 100644
index 00000000000..35e11912525
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/actions/date-and-time/current-week.ts
@@ -0,0 +1,31 @@
+import { createAction } from '@activepieces/pieces-framework';
+import { zeroCodeKitAuth } from '../../auth';
+import { dateAndTimeApi } from '../../common/date-and-time';
+import { zeroCodeKitProps } from '../../common/props';
+import { dateConvertSchemas } from '../../common/output-schemas/date-convert';
+
+export const currentWeekAction = createAction({
+ auth: zeroCodeKitAuth,
+ name: 'current_week',
+ classification: 'READ',
+ displayName: 'Current Week',
+ description: 'Get the calendar week number and the first and last day of the current week.',
+ audience: 'both',
+ aiMetadata: {
+ description:
+ 'Return the calendar week number of today plus the first and last day of this week. Use the "Current Week from Date" or "from Unix Timestamp" actions for another day. Read-only and safe to retry.',
+ idempotent: true,
+ },
+ props: {
+ outputFormat: zeroCodeKitProps.outputFormat(),
+ },
+ outputSchema: dateConvertSchemas.calendarWeek,
+ async run({ auth, propsValue }) {
+ return dateAndTimeApi.calendarWeek({
+ apiKey: auth.secret_text,
+ body: {
+ outputFormat: propsValue.outputFormat,
+ },
+ });
+ },
+});
diff --git a/packages/pieces/community/0codekit/src/lib/actions/date-and-time/get-holidays.ts b/packages/pieces/community/0codekit/src/lib/actions/date-and-time/get-holidays.ts
new file mode 100644
index 00000000000..a299cd20672
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/actions/date-and-time/get-holidays.ts
@@ -0,0 +1,68 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { zeroCodeKitAuth } from '../../auth';
+import { zeroCodeKitApi } from '../../common/client';
+import { dateConvertSchemas } from '../../common/output-schemas/date-convert';
+
+export const getHolidaysAction = createAction({
+ auth: zeroCodeKitAuth,
+ name: 'get_holidays',
+ classification: 'SEARCH',
+ displayName: 'Holidays in Specific Country and Year',
+ description: 'List the public holidays of a country, and optionally a state, for a year.',
+ audience: 'both',
+ aiMetadata: {
+ description:
+ 'List public holidays for a country (ISO 3166-1 alpha-2 code) and year, optionally narrowed to a state or region. Returns one row per holiday. Read-only and safe to retry.',
+ idempotent: true,
+ },
+ props: {
+ countryCode: Property.ShortText({
+ displayName: 'Country Code',
+ description: 'The two-letter ISO country code of the country.',
+ required: true,
+ placeholder: 'DE',
+ }),
+ year: Property.Number({
+ displayName: 'Year',
+ description: 'The four-digit year, for example 2025.',
+ required: true,
+ }),
+ state: Property.ShortText({
+ displayName: 'State',
+ description: 'A state or region code to add regional holidays. Empty: national only.',
+ required: false,
+ placeholder: 'BY',
+ }),
+ },
+ outputSchema: dateConvertSchemas.holidays,
+ async run({ auth, propsValue }) {
+ const response = await zeroCodeKitApi.post<HolidaysResponse>({
+ apiKey: auth.secret_text,
+ path: '/dateandtime/holidays',
+ body: {
+ year: propsValue.year,
+ countryCode: propsValue.countryCode.trim().toUpperCase(),
+ state: propsValue.state?.trim(),
+ },
+ });
+ return (response.holidays ?? []).map((holiday) => ({
+ name: holiday.name ?? null,
+ date: holiday.date ?? null,
+ type: holiday.type ?? null,
+ start: holiday.start ?? null,
+ end: holiday.end ?? null,
+ rule: holiday.rule ?? null,
+ }));
+ },
+});
+
+type HolidaysResponse = {
+ holidays?: {
+ date?: string;
+ start?: string;
+ end?: string;
+ name?: string;
+ type?: string;
+ rule?: string;
+ }[];
+};
diff --git a/packages/pieces/community/0codekit/src/lib/actions/date-and-time/is-weekend-with-format.ts b/packages/pieces/community/0codekit/src/lib/actions/date-and-time/is-weekend-with-format.ts
new file mode 100644
index 00000000000..d45cf506531
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/actions/date-and-time/is-weekend-with-format.ts
@@ -0,0 +1,49 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { zeroCodeKitAuth } from '../../auth';
+import { dateAndTimeApi } from '../../common/date-and-time';
+import { dateInput } from '../../common/date-input';
+import { zeroCodeKitProps } from '../../common/props';
+import { dateConvertSchemas } from '../../common/output-schemas/date-convert';
+
+export const isWeekendWithFormatAction = createAction({
+ auth: zeroCodeKitAuth,
+ name: 'is_weekend_with_format',
+ classification: 'READ',
+ displayName: 'Is Given Date is Weekend, with Format',
+ description: 'Check whether a date written in a custom format falls on a weekend, and get its weekday.',
+ audience: 'both',
+ aiMetadata: {
+ description:
+ 'Check whether a date is on a weekend and return its weekday name and number, parsing the date with the given Date Format (for example DD.MM.YYYY). Use "Is Given Date is Weekend" for standard ISO dates. Read-only and safe to retry.',
+ idempotent: true,
+ },
+ props: {
+ date: Property.ShortText({
+ displayName: 'Date',
+ description: 'The date to check, written in the format below.',
+ required: true,
+ placeholder: '20.01.2025',
+ }),
+ dateFormat: zeroCodeKitProps.dateFormat({
+ displayName: 'Date Format',
+ description:
+ 'How the date above is written, using `YYYY` or `YY` (year), `MM` or `M` (month) and `DD` or `D` (day), with any separators. For example `DD.MM.YYYY` for 20.01.2025.',
+ required: true,
+ }),
+ timeZone: zeroCodeKitProps.timeZone({
+ displayName: 'Time Zone',
+ description: 'The time zone the date belongs to. Leave empty to use the 0CodeKit default.',
+ required: false,
+ }),
+ },
+ outputSchema: dateConvertSchemas.isWeekend,
+ async run({ auth, propsValue }) {
+ return dateAndTimeApi.isWeekend({
+ apiKey: auth.secret_text,
+ body: {
+ date: dateInput.toIsoDate({ date: propsValue.date, format: propsValue.dateFormat ?? '' }),
+ timeZone: propsValue.timeZone,
+ },
+ });
+ },
+});
diff --git a/packages/pieces/community/0codekit/src/lib/actions/date-and-time/is-weekend.ts b/packages/pieces/community/0codekit/src/lib/actions/date-and-time/is-weekend.ts
new file mode 100644
index 00000000000..9350dc23cfb
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/actions/date-and-time/is-weekend.ts
@@ -0,0 +1,42 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { zeroCodeKitAuth } from '../../auth';
+import { dateAndTimeApi } from '../../common/date-and-time';
+import { zeroCodeKitProps } from '../../common/props';
+import { dateConvertSchemas } from '../../common/output-schemas/date-convert';
+
+export const isWeekendAction = createAction({
+ auth: zeroCodeKitAuth,
+ name: 'is_weekend',
+ classification: 'READ',
+ displayName: 'Is Given Date is Weekend',
+ description: 'Check whether a date falls on a Saturday or Sunday, and get its weekday.',
+ audience: 'both',
+ aiMetadata: {
+ description:
+ 'Check whether a date is on a weekend and return its weekday name and number. Pass the date in a standard form such as 2025-01-20; use "Is Given Date is Weekend, with Format" when the date is written in a custom format. Read-only and safe to retry.',
+ idempotent: true,
+ },
+ props: {
+ date: Property.ShortText({
+ displayName: 'Date',
+ description: 'The date to check, for example 2025-01-20.',
+ required: true,
+ placeholder: '2025-01-20',
+ }),
+ timeZone: zeroCodeKitProps.timeZone({
+ displayName: 'Time Zone',
+ description: 'The time zone the date belongs to. Leave empty to use the 0CodeKit default.',
+ required: false,
+ }),
+ },
+ outputSchema: dateConvertSchemas.isWeekend,
+ async run({ auth, propsValue }) {
+ return dateAndTimeApi.isWeekend({
+ apiKey: auth.secret_text,
+ body: {
+ date: propsValue.date,
+ timeZone: propsValue.timeZone,
+ },
+ });
+ },
+});
diff --git a/packages/pieces/community/0codekit/src/lib/actions/date-and-time/specific-month-and-year.ts b/packages/pieces/community/0codekit/src/lib/actions/date-and-time/specific-month-and-year.ts
new file mode 100644
index 00000000000..ebaf0a8e136
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/actions/date-and-time/specific-month-and-year.ts
@@ -0,0 +1,65 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { zeroCodeKitAuth } from '../../auth';
+import { dateAndTimeApi } from '../../common/date-and-time';
+import { zeroCodeKitProps } from '../../common/props';
+import { dateConvertSchemas } from '../../common/output-schemas/date-convert';
+
+export const specificMonthAndYearAction = createAction({
+ auth: zeroCodeKitAuth,
+ name: 'specific_month_and_year',
+ classification: 'READ',
+ displayName: 'Specific Month and Year',
+ description: 'Get the days, workdays, Saturdays and Sundays of a chosen month.',
+ audience: 'both',
+ aiMetadata: {
+ description:
+ 'Return the number of days, first and last day, last workday, and the lists of workdays, Saturdays and Sundays for a given month and year. Use Current Month when you only need the month that is current now. Read-only and safe to retry.',
+ idempotent: true,
+ },
+ props: {
+ month: Property.StaticDropdown({
+ displayName: 'Month',
+ description: 'The month to describe.',
+ required: true,
+ options: {
+ options: monthOptions(),
+ },
+ }),
+ year: Property.Number({
+ displayName: 'Year',
+ description: 'The four-digit year, for example 2025.',
+ required: true,
+ }),
+ outputFormat: zeroCodeKitProps.outputFormat(),
+ returnTimestamps: zeroCodeKitProps.returnTimestamps(),
+ },
+ outputSchema: dateConvertSchemas.month,
+ async run({ auth, propsValue }) {
+ return dateAndTimeApi.month({
+ apiKey: auth.secret_text,
+ body: {
+ month: propsValue.month,
+ year: propsValue.year,
+ outputFormat: propsValue.outputFormat,
+ options: dateAndTimeApi.monthOptions({ returnTimestamps: propsValue.returnTimestamps }),
+ },
+ });
+ },
+});
+
+function monthOptions() {
+ return [
+ 'January',
+ 'February',
+ 'March',
+ 'April',
+ 'May',
+ 'June',
+ 'July',
+ 'August',
+ 'September',
+ 'October',
+ 'November',
+ 'December',
+ ].map((name, index) => ({ label: name, value: index + 1 }));
+}
diff --git a/packages/pieces/community/0codekit/src/lib/actions/generate/get-a-number.ts b/packages/pieces/community/0codekit/src/lib/actions/generate/get-a-number.ts
new file mode 100644
index 00000000000..66a99425ceb
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/actions/generate/get-a-number.ts
@@ -0,0 +1,70 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { zeroCodeKitAuth } from '../../auth';
+import { zeroCodeKitApi } from '../../common/client';
+import { dateConvertSchemas } from '../../common/output-schemas/date-convert';
+
+export const getANumberAction = createAction({
+ auth: zeroCodeKitAuth,
+ name: 'get_a_number',
+ classification: 'READ',
+ displayName: 'Get a Number',
+ description: 'Generate a random number between a minimum and a maximum.',
+ audience: 'both',
+ aiMetadata: {
+ description:
+ 'Generate a random whole or decimal number between a minimum and a maximum, with a chosen number of decimal places for decimals. Each call returns a different value and has no side effects.',
+ idempotent: true,
+ },
+ props: {
+ min: Property.Number({
+ displayName: 'Minimum',
+ description: 'The smallest number that can be returned.',
+ required: true,
+ defaultValue: 1,
+ }),
+ max: Property.Number({
+ displayName: 'Maximum',
+ description: 'The largest number that can be returned.',
+ required: true,
+ defaultValue: 100,
+ }),
+ type: Property.StaticDropdown({
+ displayName: 'Number Type',
+ description: 'Whether to return a whole number or a decimal number.',
+ required: true,
+ defaultValue: 'integer',
+ options: {
+ options: [
+ { label: 'Whole number', value: 'integer' },
+ { label: 'Decimal number', value: 'decimal' },
+ ],
+ },
+ }),
+ round: Property.Number({
+ displayName: 'Decimal Places',
+ description: 'Digits after the decimal point. Only used for decimal numbers.',
+ required: false,
+ defaultValue: 2,
+ }),
+ },
+ outputSchema: dateConvertSchemas.randomNumber,
+ async run({ auth, propsValue }) {
+ if (propsValue.min > propsValue.max) {
+ throw new Error('Minimum must be less than or equal to Maximum.');
+ }
+ const response = await zeroCodeKitApi.post<RandomNumberResponse>({
+ apiKey: auth.secret_text,
+ path: '/generate/number',
+ body: {
+ range: [propsValue.min, propsValue.max],
+ type: propsValue.type,
+ round: propsValue.type === 'integer' ? undefined : propsValue.round,
+ },
+ });
+ return { number: response.randomNumber ?? null };
+ },
+});
+
+type RandomNumberResponse = {
+ randomNumber?: number;
+};
diff --git a/packages/pieces/community/0codekit/src/lib/actions/generate/get-random-city.ts b/packages/pieces/community/0codekit/src/lib/actions/generate/get-random-city.ts
new file mode 100644
index 00000000000..5988717d711
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/actions/generate/get-random-city.ts
@@ -0,0 +1,35 @@
+import { createAction } from '@activepieces/pieces-framework';
+import { zeroCodeKitAuth } from '../../auth';
+import { zeroCodeKitApi } from '../../common/client';
+import { dateConvertSchemas } from '../../common/output-schemas/date-convert';
+
+export const getRandomCityAction = createAction({
+ auth: zeroCodeKitAuth,
+ name: 'get_random_city',
+ classification: 'READ',
+ displayName: 'Get a Random City',
+ description: 'Generate a random, fictional city and country name for test data.',
+ audience: 'both',
+ aiMetadata: {
+ description:
+ 'Generate a random fictional city name with a country, for mock or test data. Each call returns a different value and has no side effects.',
+ idempotent: true,
+ },
+ props: {},
+ outputSchema: dateConvertSchemas.randomCity,
+ async run({ auth }) {
+ const response = await zeroCodeKitApi.post<RandomCityResponse>({
+ apiKey: auth.secret_text,
+ path: '/generate/city',
+ });
+ return {
+ city: response.city ?? null,
+ country: response.country ?? null,
+ };
+ },
+});
+
+type RandomCityResponse = {
+ city?: string;
+ country?: string;
+};
diff --git a/packages/pieces/community/0codekit/src/lib/actions/generate/get-random-name-with-gender.ts b/packages/pieces/community/0codekit/src/lib/actions/generate/get-random-name-with-gender.ts
new file mode 100644
index 00000000000..f41be56ba92
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/actions/generate/get-random-name-with-gender.ts
@@ -0,0 +1,39 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { zeroCodeKitAuth } from '../../auth';
+import { randomNameApi } from '../../common/random-name';
+import { dateConvertSchemas } from '../../common/output-schemas/date-convert';
+
+export const getRandomNameWithGenderAction = createAction({
+ auth: zeroCodeKitAuth,
+ name: 'get_random_name_with_gender',
+ classification: 'READ',
+ displayName: 'Get Random Name with Gender',
+ description: 'Generate a random male or female person name for test data.',
+ audience: 'both',
+ aiMetadata: {
+ description:
+ 'Generate a random first, middle and last name of the chosen gender for mock or test data. Use "Get Random Name" when gender does not matter. Each call returns a different value and has no side effects.',
+ idempotent: true,
+ },
+ props: {
+ gender: Property.StaticDropdown({
+ displayName: 'Gender',
+ description: 'The gender of the generated name.',
+ required: true,
+ defaultValue: 'female',
+ options: {
+ options: [
+ { label: 'Female', value: 'female' },
+ { label: 'Male', value: 'male' },
+ ],
+ },
+ }),
+ },
+ outputSchema: dateConvertSchemas.randomName,
+ async run({ auth, propsValue }) {
+ return randomNameApi.generate({
+ apiKey: auth.secret_text,
+ body: { gender: propsValue.gender },
+ });
+ },
+});
diff --git a/packages/pieces/community/0codekit/src/lib/actions/generate/get-random-name.ts b/packages/pieces/community/0codekit/src/lib/actions/generate/get-random-name.ts
new file mode 100644
index 00000000000..8f404ebb650
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/actions/generate/get-random-name.ts
@@ -0,0 +1,26 @@
+import { createAction } from '@activepieces/pieces-framework';
+import { zeroCodeKitAuth } from '../../auth';
+import { randomNameApi } from '../../common/random-name';
+import { dateConvertSchemas } from '../../common/output-schemas/date-convert';
+
+export const getRandomNameAction = createAction({
+ auth: zeroCodeKitAuth,
+ name: 'get_random_name',
+ classification: 'READ',
+ displayName: 'Get Random Name',
+ description: 'Generate a random person name for test data.',
+ audience: 'both',
+ aiMetadata: {
+ description:
+ 'Generate a random first, middle and last name for mock or test data. Use "Get Random Name with Gender" to force a male or female name. Each call returns a different value and has no side effects.',
+ idempotent: true,
+ },
+ props: {},
+ outputSchema: dateConvertSchemas.randomName,
+ async run({ auth }) {
+ return randomNameApi.generate({
+ apiKey: auth.secret_text,
+ body: {},
+ });
+ },
+});
diff --git a/packages/pieces/community/0codekit/src/lib/actions/text/detect-gender.ts b/packages/pieces/community/0codekit/src/lib/actions/text/detect-gender.ts
new file mode 100644
index 00000000000..f27c10eb9a1
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/actions/text/detect-gender.ts
@@ -0,0 +1,59 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { zeroCodeKitAuth } from '../../auth';
+import { zeroCodeKitApi } from '../../common/client';
+import { businessAiOutputSchemas } from '../../common/output-schemas/business-ai';
+
+export const detectGenderAction = createAction({
+ auth: zeroCodeKitAuth,
+ name: 'detect_gender',
+ classification: 'READ',
+ displayName: 'Detect Gender',
+ description: 'Guess whether a first name is male, female or unisex.',
+ audience: 'both',
+ aiMetadata: {
+ description:
+ 'Guess the gender (male, female or unisex) most associated with a first name. Accepts a first name or a full name; when both are given the first name wins. Read-only and safe to retry.',
+ idempotent: true,
+ },
+ props: {
+ firstName: Property.ShortText({
+ displayName: 'First Name',
+ description: 'The first name to check. Fill this or Full Name.',
+ required: false,
+ placeholder: 'Jane',
+ }),
+ fullName: Property.ShortText({
+ displayName: 'Full Name',
+ description: 'Used when First Name is empty; its first word is the first name.',
+ required: false,
+ placeholder: 'Jane Doe',
+ }),
+ },
+ outputSchema: businessAiOutputSchemas.detectGender,
+ async run({ auth, propsValue }) {
+ const firstName = propsValue.firstName?.trim();
+ const fullName = propsValue.fullName?.trim();
+ if (!firstName && !fullName) {
+ throw new Error('Fill in First Name or Full Name.');
+ }
+ const response = await zeroCodeKitApi.post<GenderResponse>({
+ apiKey: auth.secret_text,
+ path: '/operator/gender',
+ body: {
+ firstname: firstName,
+ fullname: fullName,
+ },
+ });
+ return {
+ gender: response.detectedGender ?? null,
+ first_name: response.firstname ?? null,
+ last_name: response.lastname ?? null,
+ };
+ },
+});
+
+type GenderResponse = {
+ firstname?: string;
+ lastname?: string;
+ detectedGender?: string;
+};
diff --git a/packages/pieces/community/0codekit/src/lib/actions/text/split-name.ts b/packages/pieces/community/0codekit/src/lib/actions/text/split-name.ts
new file mode 100644
index 00000000000..e74511eabaa
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/actions/text/split-name.ts
@@ -0,0 +1,52 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { zeroCodeKitAuth } from '../../auth';
+import { zeroCodeKitApi } from '../../common/client';
+import { businessAiOutputSchemas } from '../../common/output-schemas/business-ai';
+
+export const splitNameAction = createAction({
+ auth: zeroCodeKitAuth,
+ name: 'split_name',
+ classification: 'READ',
+ displayName: 'Split Name',
+ description: 'Split a full name into first name and last name.',
+ audience: 'both',
+ aiMetadata: {
+ description:
+ 'Split a full name into first name(s) and last name. Turn on Last Name First for names written family name first, such as many Chinese names. Read-only and safe to retry.',
+ idempotent: true,
+ },
+ props: {
+ name: Property.ShortText({
+ displayName: 'Full Name',
+ description: 'The full name to split.',
+ required: true,
+ placeholder: 'Jane Mary Doe',
+ }),
+ reversed: Property.Checkbox({
+ displayName: 'Last Name First',
+ description: 'Turn on when the name is written with the last name first.',
+ required: false,
+ defaultValue: false,
+ }),
+ },
+ outputSchema: businessAiOutputSchemas.splitName,
+ async run({ auth, propsValue }) {
+ const response = await zeroCodeKitApi.post<SplitNameResponse>({
+ apiKey: auth.secret_text,
+ path: '/operator/splitname',
+ body: {
+ name: propsValue.name,
+ reversed: propsValue.reversed ?? false,
+ },
+ });
+ return {
+ first_name: response.firstName ?? null,
+ last_name: response.lastName ?? null,
+ };
+ },
+});
+
+type SplitNameResponse = {
+ firstName?: string;
+ lastName?: string;
+};
diff --git a/packages/pieces/community/0codekit/src/lib/actions/text/text-contains.ts b/packages/pieces/community/0codekit/src/lib/actions/text/text-contains.ts
new file mode 100644
index 00000000000..de7d563aec9
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/actions/text/text-contains.ts
@@ -0,0 +1,88 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { zeroCodeKitAuth } from '../../auth';
+import { zeroCodeKitApi } from '../../common/client';
+import { businessAiOutputSchemas } from '../../common/output-schemas/business-ai';
+
+export const textContainsAction = createAction({
+ auth: zeroCodeKitAuth,
+ name: 'text_contains',
+ classification: 'READ',
+ displayName: 'Text Contains',
+ description: 'Check whether a text contains one or more keywords, and where.',
+ audience: 'both',
+ aiMetadata: {
+ description:
+ 'Search a text for one or more keywords and report, per keyword, whether it was found and at which character positions, plus whether any or all keywords matched. Optionally case-sensitive or whole-word only. Read-only and safe to retry.',
+ idempotent: true,
+ },
+ props: {
+ text: Property.LongText({
+ displayName: 'Text',
+ description: 'The text to search in.',
+ required: true,
+ }),
+ keywords: Property.Array({
+ displayName: 'Keywords',
+ description: 'The words or phrases to look for.',
+ required: true,
+ }),
+ caseSensitive: Property.Checkbox({
+ displayName: 'Case Sensitive',
+ description: 'Turn on to treat "Apple" and "apple" as different words.',
+ required: false,
+ defaultValue: false,
+ }),
+ onlyCompleteWords: Property.Checkbox({
+ displayName: 'Whole Words Only',
+ description: 'Turn on so that "cat" does not match inside "category".',
+ required: false,
+ defaultValue: false,
+ }),
+ },
+ outputSchema: businessAiOutputSchemas.textContains,
+ async run({ auth, propsValue }) {
+ const keywords = normalizeKeywords(propsValue.keywords);
+ if (keywords.length === 0) {
+ throw new Error('Add at least one keyword to search for.');
+ }
+ const response = await zeroCodeKitApi.post<TextContainsResponse>({
+ apiKey: auth.secret_text,
+ path: '/text/contains',
+ body: {
+ text: propsValue.text,
+ keywordList: keywords,
+ options: {
+ caseSensitive: propsValue.caseSensitive ?? false,
+ onlyCompleteWords: propsValue.onlyCompleteWords ?? false,
+ },
+ },
+ });
+ const findings = (response.findings ?? []).map((finding) => ({
+ keyword: finding.keyword ?? null,
+ contains: finding.contains ?? false,
+ match_count: finding.foundPositions?.length ?? 0,
+ found_positions: (finding.foundPositions ?? []).join(', '),
+ }));
+ return {
+ contains_any: findings.some((finding) => finding.contains),
+ contains_all: findings.length > 0 && findings.every((finding) => finding.contains),
+ findings,
+ };
+ },
+});
+
+function normalizeKeywords(keywords: unknown[]): string[] {
+ return keywords
+ .flat()
+ .filter((keyword): keyword is string | number => typeof keyword === 'string' || typeof keyword === 'number')
+ .map((keyword) => String(keyword).trim())
+ .filter((keyword) => keyword.length > 0);
+}
+
+type TextContainsResponse = {
+ findings?: {
+ keyword?: string;
+ contains?: boolean;
+ foundPositions?: number[];
+ }[];
+};
diff --git a/packages/pieces/community/0codekit/src/lib/auth.ts b/packages/pieces/community/0codekit/src/lib/auth.ts
new file mode 100644
index 00000000000..070c9927eba
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/auth.ts
@@ -0,0 +1,35 @@
+import { PieceAuth } from '@activepieces/pieces-framework';
+import { zeroCodeKitApi } from './common/client';
+
+export const zeroCodeKitAuth = PieceAuth.SecretText({
+ displayName: 'API Key',
+ description: `To get your API key:
+1. Log in to your [0CodeKit](https://0codekit.com) account.
+2. Open the **Account** tab. Your API key is shown there.
+3. Copy the key and paste it here.`,
+ required: true,
+ validate: async ({ auth }) => {
+ try {
+ await zeroCodeKitApi.request({
+ apiKey: auth,
+ path: '/1saas/auth',
+ });
+ return { valid: true };
+ } catch (error) {
+ const status = zeroCodeKitApi.statusOf(error);
+ if (status === 401 || status === 403) {
+ return {
+ valid: false,
+ error: '0CodeKit rejected this API key. Copy it again from your 0CodeKit settings.',
+ };
+ }
+ return {
+ valid: false,
+ error: `Could not reach 0CodeKit to check this key: ${zeroCodeKitApi.describe({
+ error,
+ fallback: 'unknown error',
+ })}`,
+ };
+ }
+ },
+});
diff --git a/packages/pieces/community/0codekit/src/lib/common/client.ts b/packages/pieces/community/0codekit/src/lib/common/client.ts
new file mode 100644
index 00000000000..d7c2e94c08b
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/common/client.ts
@@ -0,0 +1,121 @@
+import { httpClient, HttpError, HttpMethod } from '@activepieces/pieces-common';
+
+export const zeroCodeKitApi = {
+ request,
+ post,
+ statusOf,
+ describe,
+ timeoutFor,
+ assertProviderUrl,
+};
+
+export const ZEROCODEKIT_BASE_URL = 'https://v2.1saas.co';
+
+export const ZEROCODEKIT_TIMEOUT_MS = {
+ lookup: 30_000,
+ slow: 60_000,
+ file: 120_000,
+};
+
+async function request<T>({ apiKey, path, body, timeoutMs }: ZeroCodeKitRequest): Promise<T> {
+ const response = await httpClient.sendRequest<T>({
+ method: HttpMethod.POST,
+ url: `${ZEROCODEKIT_BASE_URL}${path}`,
+ headers: {
+ auth: apiKey,
+ },
+ body: compact(body ?? {}),
+ timeout: timeoutMs ?? timeoutFor(path),
+ });
+ return response.body;
+}
+
+async function post<T>(params: ZeroCodeKitRequest): Promise<T> {
+ try {
+ return await request<T>(params);
+ } catch (error) {
+ throw new Error(describe({ error, fallback: 'The request to 0CodeKit failed.' }));
+ }
+}
+
+function assertProviderUrl(url: unknown): void {
+ if (typeof url !== 'string' || !(url.startsWith('http://') || url.startsWith('https://'))) {
+ return;
+ }
+ const origin = parseOrigin(url);
+ if (origin !== new URL(ZEROCODEKIT_BASE_URL).origin) {
+ throw new Error(
+ `Custom API Call only sends your 0CodeKit API key to ${ZEROCODEKIT_BASE_URL}. Use a path such as /1saas/auth, or a full URL on that host.`,
+ );
+ }
+}
+
+function parseOrigin(url: string): string | undefined {
+ try {
+ return new URL(url).origin;
+ } catch {
+ return undefined;
+ }
+}
+
+function timeoutFor(path: string): number {
+ if (FILE_PATH_PREFIXES.some((prefix) => path.startsWith(prefix))) {
+ return ZEROCODEKIT_TIMEOUT_MS.file;
+ }
+ if (SLOW_PATH_PREFIXES.some((prefix) => path.startsWith(prefix))) {
+ return ZEROCODEKIT_TIMEOUT_MS.slow;
+ }
+ return ZEROCODEKIT_TIMEOUT_MS.lookup;
+}
+
+function statusOf(error: unknown): number | undefined {
+ if (error instanceof HttpError) {
+ return error.response.status;
+ }
+ return undefined;
+}
+
+function describe({ error, fallback }: { error: unknown; fallback: string }): string {
+ if (isTimeout(error)) {
+ return `0CodeKit did not answer in time. ${fallback}`;
+ }
+ if (!(error instanceof HttpError)) {
+ return error instanceof Error ? error.message : fallback;
+ }
+ const status = error.response.status;
+ const body = error.response.body;
+ const message = isRecord(body) ? asString(body['errorMessage']) ?? asString(body['message']) : undefined;
+ const code = isRecord(body) ? asString(body['code']) : undefined;
+ const detail = message ?? fallback;
+ const suffix = code === undefined ? '' : ` (${code})`;
+ return `0CodeKit returned ${status}: ${detail}${suffix}`;
+}
+
+function isTimeout(error: unknown): boolean {
+ return error instanceof Error && (error.name === 'AbortError' || error.name === 'TimeoutError');
+}
+
+function compact(body: Record<string, unknown>): Record<string, unknown> {
+ return Object.fromEntries(
+ Object.entries(body).filter(([, value]) => value !== undefined && value !== null && value !== ''),
+ );
+}
+
+function isRecord(value: unknown): value is Record<string, unknown> {
+ return value !== null && typeof value === 'object' && !Array.isArray(value);
+}
+
+function asString(value: unknown): string | undefined {
+ return typeof value === 'string' ? value : undefined;
+}
+
+const FILE_PATH_PREFIXES = ['/pdf/', '/image/', '/generate/qrcode/', '/storage/temp', '/storage/perm/add', '/storage/perm/get'];
+
+const SLOW_PATH_PREFIXES = ['/ai/', '/operator/urlexpander', '/business/verify/', '/business/validate/email', '/convert/csv/'];
+
+export type ZeroCodeKitRequest = {
+ apiKey: string;
+ path: string;
+ body?: Record<string, unknown>;
+ timeoutMs?: number;
+};
diff --git a/packages/pieces/community/0codekit/src/lib/common/date-and-time.ts b/packages/pieces/community/0codekit/src/lib/common/date-and-time.ts
new file mode 100644
index 00000000000..8ac27dcee97
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/common/date-and-time.ts
@@ -0,0 +1,137 @@
+import { zeroCodeKitApi } from './client';
+
+export const dateAndTimeApi = {
+ calendarWeek,
+ month,
+ isWeekend,
+ switchTimeZone,
+ monthOptions,
+};
+
+async function calendarWeek({ apiKey, body }: DateAndTimeCall): Promise<CalendarWeekOutput> {
+ const response = await zeroCodeKitApi.post<CalendarWeekResponse>({
+ apiKey,
+ path: '/dateandtime/calendarweek',
+ body,
+ });
+ return {
+ week_number: response.weekNumber ?? null,
+ working_date: response.workingDate ?? null,
+ first_day_of_week: response.firstDayOfWeek ?? null,
+ last_day_of_week: response.lastDayOfWeek ?? null,
+ };
+}
+
+async function month({ apiKey, body }: DateAndTimeCall): Promise<MonthOutput> {
+ const response = await zeroCodeKitApi.post<MonthResponse>({
+ apiKey,
+ path: '/dateandtime/month',
+ body,
+ });
+ return {
+ days_in_month: response.daysInMonth ?? null,
+ first_day_of_month: response.firstDayOfMonth ?? null,
+ last_day_of_month: response.lastDayOfMonth ?? null,
+ last_workday_of_month: response.lastWorkdayOfMonth ?? null,
+ workday_count: response.workdays?.length ?? 0,
+ workdays: response.workdays ?? [],
+ workdays_reversed: response.workdaysReversed ?? [],
+ saturdays: response.saturdays ?? [],
+ sundays: response.sundays ?? [],
+ };
+}
+
+async function isWeekend({ apiKey, body }: DateAndTimeCall): Promise<IsWeekendOutput> {
+ const response = await zeroCodeKitApi.post<IsWeekendResponse>({
+ apiKey,
+ path: '/dateandtime/isweekend',
+ body,
+ });
+ return {
+ is_weekend: response.isWeekend ?? null,
+ weekday: response.weekDay ?? null,
+ day_number: response.dayNumber ?? null,
+ };
+}
+
+async function switchTimeZone({ apiKey, body }: DateAndTimeCall): Promise<SwitchTimeZoneOutput> {
+ const response = await zeroCodeKitApi.post<SwitchTimeZoneResponse>({
+ apiKey,
+ path: '/dateandtime/switchtimezone',
+ body,
+ });
+ return {
+ converted_time: response.convertedTime ?? null,
+ time_zone: response.timeZone ?? null,
+ };
+}
+
+function monthOptions({ returnTimestamps }: { returnTimestamps: boolean | undefined }) {
+ return returnTimestamps === true ? { timeStamp: true } : undefined;
+}
+
+type DateAndTimeCall = {
+ apiKey: string;
+ body: Record<string, unknown>;
+};
+
+type DateValue = string | number;
+
+type CalendarWeekResponse = {
+ workingDate?: string;
+ weekNumber?: number;
+ firstDayOfWeek?: string;
+ lastDayOfWeek?: string;
+};
+
+type MonthResponse = {
+ daysInMonth?: number;
+ firstDayOfMonth?: DateValue;
+ lastDayOfMonth?: DateValue;
+ lastWorkdayOfMonth?: DateValue;
+ workdays?: DateValue[];
+ workdaysReversed?: DateValue[];
+ saturdays?: DateValue[];
+ sundays?: DateValue[];
+};
+
+type IsWeekendResponse = {
+ dayNumber?: number;
+ weekDay?: string;
+ isWeekend?: boolean;
+};
+
+type SwitchTimeZoneResponse = {
+ convertedTime?: string;
+ timeZone?: string;
+};
+
+export type CalendarWeekOutput = {
+ week_number: number | null;
+ working_date: string | null;
+ first_day_of_week: string | null;
+ last_day_of_week: string | null;
+};
+
+export type MonthOutput = {
+ days_in_month: number | null;
+ first_day_of_month: DateValue | null;
+ last_day_of_month: DateValue | null;
+ last_workday_of_month: DateValue | null;
+ workday_count: number;
+ workdays: DateValue[];
+ workdays_reversed: DateValue[];
+ saturdays: DateValue[];
+ sundays: DateValue[];
+};
+
+export type IsWeekendOutput = {
+ is_weekend: boolean | null;
+ weekday: string | null;
+ day_number: number | null;
+};
+
+export type SwitchTimeZoneOutput = {
+ converted_time: string | null;
+ time_zone: string | null;
+};
diff --git a/packages/pieces/community/0codekit/src/lib/common/date-input.ts b/packages/pieces/community/0codekit/src/lib/common/date-input.ts
new file mode 100644
index 00000000000..9bd0ec89fae
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/common/date-input.ts
@@ -0,0 +1,88 @@
+export const dateInput = {
+ toIsoDate,
+ isoWeekMonday,
+};
+
+function toIsoDate({ date, format }: { date: string; format: string }): string {
+ const tokens = tokenize(format.trim());
+ assertEachPartOnce({ tokens, format });
+ const pattern = tokens.map((token) => TOKEN_PATTERNS[token] ?? escapeRegExp(token)).join('');
+ const match = new RegExp(`^${pattern}$`).exec(date.trim());
+ if (match === null) {
+ throw new Error(`The date "${date}" does not match the format "${format}".`);
+ }
+ const groups = tokens.filter((token) => token in TOKEN_PATTERNS);
+ const values = Object.fromEntries(groups.map((token, index) => [token, Number(match[index + 1])]));
+ const year = values['YYYY'] ?? (values['YY'] === undefined ? undefined : 2000 + values['YY']);
+ const month = values['MM'] ?? values['M'];
+ const day = values['DD'] ?? values['D'];
+ if (year === undefined || month === undefined || day === undefined) {
+ throw new Error(`The format "${format}" must include a year (YYYY or YY), a month (MM or M) and a day (DD or D).`);
+ }
+ return formatIso({ year, month, day });
+}
+
+function isoWeekMonday({ weekNumber, year }: { weekNumber: number; year: number }): string {
+ if (!Number.isInteger(weekNumber) || weekNumber < 1 || weekNumber > weeksInIsoYear(year)) {
+ throw new Error(`Week ${weekNumber} does not exist in ${year}. Use a week number from 1 to ${weeksInIsoYear(year)}.`);
+ }
+ const monday = new Date(firstIsoMonday(year) + (weekNumber - 1) * WEEK_MS);
+ const day = String(monday.getUTCDate()).padStart(2, '0');
+ const month = String(monday.getUTCMonth() + 1).padStart(2, '0');
+ return `${day}.${month}.${monday.getUTCFullYear()}`;
+}
+
+function assertEachPartOnce({ tokens, format }: { tokens: string[]; format: string }): void {
+ const parts = tokens.map((token) => DATE_PART_OF[token]).filter((part) => part !== undefined);
+ if (new Set(parts).size !== parts.length) {
+ throw new Error(`The format "${format}" uses the year, month or day more than once. Include each of them exactly once.`);
+ }
+}
+
+function tokenize(format: string): string[] {
+ return format.match(/YYYY|YY|MM|M|DD|D|[^YMD]+/g) ?? [];
+}
+
+function formatIso({ year, month, day }: { year: number; month: number; day: number }): string {
+ const candidate = new Date(Date.UTC(year, month - 1, day));
+ if (candidate.getUTCFullYear() !== year || candidate.getUTCMonth() !== month - 1 || candidate.getUTCDate() !== day) {
+ throw new Error(`${year}-${month}-${day} is not a real calendar date.`);
+ }
+ return `${year}-${String(month).padStart(2, '0')}-${String(day).padStart(2, '0')}`;
+}
+
+function firstIsoMonday(year: number): number {
+ const januaryFourth = Date.UTC(year, 0, 4);
+ const weekday = (new Date(januaryFourth).getUTCDay() + 6) % 7;
+ return januaryFourth - weekday * DAY_MS;
+}
+
+function weeksInIsoYear(year: number): number {
+ return Math.round((firstIsoMonday(year + 1) - firstIsoMonday(year)) / WEEK_MS);
+}
+
+function escapeRegExp(value: string): string {
+ return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
+}
+
+const DAY_MS = 24 * 60 * 60 * 1000;
+
+const WEEK_MS = 7 * DAY_MS;
+
+const TOKEN_PATTERNS: Record<string, string> = {
+ YYYY: '(\\d{4})',
+ YY: '(\\d{2})',
+ MM: '(\\d{2})',
+ M: '(\\d{1,2})',
+ DD: '(\\d{2})',
+ D: '(\\d{1,2})',
+};
+
+const DATE_PART_OF: Record<string, string> = {
+ YYYY: 'year',
+ YY: 'year',
+ MM: 'month',
+ M: 'month',
+ DD: 'day',
+ D: 'day',
+};
diff --git a/packages/pieces/community/0codekit/src/lib/common/nation-iso.ts b/packages/pieces/community/0codekit/src/lib/common/nation-iso.ts
new file mode 100644
index 00000000000..2f913da28c5
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/common/nation-iso.ts
@@ -0,0 +1,32 @@
+import { zeroCodeKitApi } from './client';
+
+export const nationIsoApi = {
+ convert,
+};
+
+async function convert({ apiKey, body }: NationIsoCall): Promise<NationIsoOutput> {
+ const response = await zeroCodeKitApi.post<NationIsoResponse>({
+ apiKey,
+ path: '/convert/nationiso',
+ body,
+ });
+ return {
+ iso_code: response.iso ?? null,
+ nation: response.nation ?? null,
+ };
+}
+
+type NationIsoCall = {
+ apiKey: string;
+ body: Record<string, unknown>;
+};
+
+type NationIsoResponse = {
+ iso?: string;
+ nation?: string;
+};
+
+export type NationIsoOutput = {
+ iso_code: string | null;
+ nation: string | null;
+};
diff --git a/packages/pieces/community/0codekit/src/lib/common/output-schemas/business-ai.ts b/packages/pieces/community/0codekit/src/lib/common/output-schemas/business-ai.ts
new file mode 100644
index 00000000000..fa44f0958cf
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/common/output-schemas/business-ai.ts
@@ -0,0 +1,78 @@
+import { OutputSchema } from '@activepieces/pieces-framework';
+
+export const businessAiOutputSchemas = {
+ validateBic: {
+ fields: [{ key: 'valid', label: 'Valid', format: 'boolean' }],
+ },
+ validateIban: {
+ fields: [{ key: 'valid', label: 'Valid', format: 'boolean' }],
+ },
+ validateEmail: {
+ fields: [
+ { key: 'valid', label: 'Valid', format: 'boolean' },
+ { key: 'corrected_email', label: 'Corrected Email', format: 'email', description: 'The address with any fixable typo corrected.' },
+ ],
+ },
+ validateVatId: { fields: vatValidationFields() },
+ validateVatWithCountryCode: { fields: vatValidationFields() },
+ lookupVatRates: {
+ fields: [
+ { key: 'country', label: 'Country' },
+ { key: 'vat_name', label: 'VAT Name' },
+ { key: 'vat_abbreviation', label: 'VAT Abbreviation' },
+ { key: 'standard_rate', label: 'Standard Rate (%)', format: 'number' },
+ { key: 'reduced_rate', label: 'Reduced Rate (%)', format: 'number', description: 'Null when the country has no reduced rate.' },
+ { key: 'reduced_rate_alternative', label: 'Alternative Reduced Rate (%)', format: 'number', description: 'Null when the country has no second reduced rate.' },
+ { key: 'super_reduced_rate', label: 'Super Reduced Rate (%)', format: 'number', description: 'Null when the country has no super-reduced rate.' },
+ { key: 'parking_rate', label: 'Parking Rate (%)', format: 'number', description: 'Null when the country has no parking rate.' },
+ ],
+ },
+ verifyDomain: {
+ fields: [
+ { key: 'is_valid', label: 'Is Valid', format: 'boolean' },
+ { key: 'main_domain', label: 'Main Domain', description: 'The domain without subdomains, for example example.com.' },
+ ],
+ },
+ detectGender: {
+ fields: [
+ { key: 'gender', label: 'Gender', description: 'male, female or unisex.' },
+ { key: 'first_name', label: 'First Name' },
+ { key: 'last_name', label: 'Last Name' },
+ ],
+ },
+ splitName: {
+ fields: [
+ { key: 'first_name', label: 'First Name' },
+ { key: 'last_name', label: 'Last Name' },
+ ],
+ },
+ textContains: {
+ fields: [
+ { key: 'contains_any', label: 'Contains Any Keyword', format: 'boolean' },
+ { key: 'contains_all', label: 'Contains All Keywords', format: 'boolean' },
+ {
+ key: 'findings',
+ label: 'Findings',
+ labelKey: 'keyword',
+ description: 'One entry per keyword searched.',
+ listItems: [
+ { key: 'keyword', label: 'Keyword' },
+ { key: 'contains', label: 'Contains', format: 'boolean' },
+ { key: 'match_count', label: 'Match Count', format: 'number' },
+ { key: 'found_positions', label: 'Found Positions', description: 'Comma-separated character positions of each match.' },
+ ],
+ },
+ ],
+ },
+} satisfies Record<string, OutputSchema>;
+
+function vatValidationFields(): OutputSchema['fields'] {
+ return [
+ { key: 'valid', label: 'Valid', format: 'boolean', description: 'True when VIES confirms the VAT number is registered and active.' },
+ { key: 'country_code', label: 'Country Code' },
+ { key: 'vat_number', label: 'VAT Number', description: 'The VAT number without its country prefix.' },
+ { key: 'company_name', label: 'Company Name', description: 'Registered company name, or null when the member state does not share it.' },
+ { key: 'company_address', label: 'Company Address', description: 'Registered company address, or null when the member state does not share it.' },
+ { key: 'request_date', label: 'Request Date', format: 'date', description: 'The date VIES answered the check.' },
+ ];
+}
diff --git a/packages/pieces/community/0codekit/src/lib/common/output-schemas/date-convert.ts b/packages/pieces/community/0codekit/src/lib/common/output-schemas/date-convert.ts
new file mode 100644
index 00000000000..1448ad67430
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/common/output-schemas/date-convert.ts
@@ -0,0 +1,184 @@
+import { OutputSchema } from '@activepieces/pieces-framework';
+
+export const dateConvertSchemas = {
+ calendarWeek: { fields: calendarWeekFields() },
+ month: { fields: monthFields() },
+ isWeekend: { fields: isWeekendFields() },
+ switchTimeZone: { fields: switchTimeZoneFields() },
+ holidays: {
+ itemLabel: '{name}',
+ fields: [
+ {
+ key: 'holidays',
+ label: 'Holidays',
+ value: '',
+ listItems: [
+ { key: 'name', label: 'Name' },
+ { key: 'date', label: 'Date', format: 'date' },
+ { key: 'type', label: 'Type', description: 'The holiday type, for example public.' },
+ { key: 'start', label: 'Start', format: 'datetime' },
+ { key: 'end', label: 'End', format: 'datetime' },
+ { key: 'rule', label: 'Rule', description: 'The rule that defines when the holiday falls.' },
+ ],
+ },
+ ],
+ },
+ bmi: {
+ fields: [
+ { key: 'bmi', label: 'BMI', format: 'number' },
+ { key: 'classification', label: 'Classification' },
+ { key: 'desirable_body_weight_kg', label: 'Desirable Body Weight (kg)', format: 'number' },
+ { key: 'daily_calories_kcal', label: 'Daily Calories (kcal)', format: 'number' },
+ { key: 'daily_carbohydrates_g', label: 'Daily Carbohydrates (g)', format: 'number' },
+ { key: 'daily_protein_g', label: 'Daily Protein (g)', format: 'number' },
+ { key: 'daily_fat_g', label: 'Daily Fat (g)', format: 'number' },
+ ],
+ },
+ geoDistance: {
+ fields: [
+ { key: 'distance_km', label: 'Distance (km)', format: 'number' },
+ { key: 'duration_hours', label: 'Duration Hours', format: 'number', description: 'Whole hours of the travel time.' },
+ {
+ key: 'duration_minutes',
+ label: 'Duration Minutes',
+ format: 'number',
+ description: 'Minutes of the travel time on top of the whole hours.',
+ },
+ ],
+ },
+ csvToJson: {
+ fields: [
+ {
+ key: 'rows',
+ label: 'Rows',
+ value: '',
+ description:
+ 'One object per CSV row, keyed by the header row, or field1, field2 and so on when the first row is data.',
+ },
+ ],
+ },
+ currency: {
+ fields: [
+ { key: 'converted_amount', label: 'Converted Amount', format: 'number' },
+ { key: 'converted_currency', label: 'Converted Currency' },
+ { key: 'original_amount', label: 'Original Amount', format: 'number' },
+ { key: 'original_currency', label: 'Original Currency' },
+ {
+ key: 'rate_date',
+ label: 'Rate Date',
+ description: 'The date of the exchange rate used, written in the chosen Rate Date Format.',
+ },
+ ],
+ },
+ ipToGeo: {
+ fields: [
+ { key: 'ip', label: 'IP Address' },
+ { key: 'country', label: 'Country' },
+ { key: 'country_code', label: 'Country Code' },
+ { key: 'region_code', label: 'Region Code' },
+ { key: 'region_name', label: 'Region Name' },
+ { key: 'city', label: 'City' },
+ { key: 'zip', label: 'Postal Code' },
+ { key: 'latitude', label: 'Latitude', format: 'number' },
+ { key: 'longitude', label: 'Longitude', format: 'number' },
+ { key: 'time_zone', label: 'Time Zone' },
+ { key: 'isp', label: 'Internet Provider' },
+ { key: 'organization', label: 'Organization' },
+ { key: 'autonomous_system', label: 'Autonomous System' },
+ ],
+ },
+ nationIso: { fields: nationIsoFields() },
+ randomNumber: {
+ fields: [{ key: 'number', label: 'Number', format: 'number' }],
+ },
+ randomCity: {
+ fields: [
+ { key: 'city', label: 'City' },
+ { key: 'country', label: 'Country' },
+ ],
+ },
+ randomName: { fields: randomNameFields() },
+} satisfies Record<string, OutputSchema>;
+
+function calendarWeekFields(): OutputSchema['fields'] {
+ return [
+ { key: 'week_number', label: 'Week Number', format: 'number', description: 'The ISO calendar week number, from 1 to 53.' },
+ {
+ key: 'working_date',
+ label: 'Working Date',
+ description: 'The date the week was calculated from, written in the chosen Output Format.',
+ },
+ {
+ key: 'first_day_of_week',
+ label: 'First Day of Week',
+ description: 'The Monday of the week, written in the chosen Output Format.',
+ },
+ {
+ key: 'last_day_of_week',
+ label: 'Last Day of Week',
+ description: 'The Sunday of the week, written in the chosen Output Format.',
+ },
+ ];
+}
+
+function monthFields(): OutputSchema['fields'] {
+ return [
+ { key: 'days_in_month', label: 'Days in Month', format: 'number' },
+ {
+ key: 'first_day_of_month',
+ label: 'First Day of Month',
+ description: 'Written in the chosen Output Format, or a Unix timestamp when Return Timestamps is on.',
+ },
+ {
+ key: 'last_day_of_month',
+ label: 'Last Day of Month',
+ description: 'Written in the chosen Output Format, or a Unix timestamp when Return Timestamps is on.',
+ },
+ {
+ key: 'last_workday_of_month',
+ label: 'Last Workday of Month',
+ description: 'The last Monday to Friday of the month.',
+ },
+ { key: 'workday_count', label: 'Workday Count', format: 'number', description: 'How many Monday to Friday days the month has.' },
+ { key: 'workdays', label: 'Workdays', description: 'Every Monday to Friday of the month, earliest first.' },
+ { key: 'workdays_reversed', label: 'Workdays (Latest First)', description: 'The same workdays, latest first.' },
+ { key: 'saturdays', label: 'Saturdays' },
+ { key: 'sundays', label: 'Sundays' },
+ ];
+}
+
+function isWeekendFields(): OutputSchema['fields'] {
+ return [
+ { key: 'is_weekend', label: 'Is Weekend', format: 'boolean' },
+ { key: 'weekday', label: 'Weekday', description: 'The English weekday name, for example Monday.' },
+ { key: 'day_number', label: 'Day Number', format: 'number', description: 'The weekday as a number.' },
+ ];
+}
+
+function switchTimeZoneFields(): OutputSchema['fields'] {
+ return [
+ {
+ key: 'converted_time',
+ label: 'Converted Time',
+ description: 'The date and time in the destination time zone, written in the chosen Output Format.',
+ },
+ { key: 'time_zone', label: 'Time Zone', description: 'The destination time zone.' },
+ ];
+}
+
+function nationIsoFields(): OutputSchema['fields'] {
+ return [
+ { key: 'iso_code', label: 'ISO Country Code' },
+ { key: 'nation', label: 'Country Name' },
+ ];
+}
+
+function randomNameFields(): OutputSchema['fields'] {
+ return [
+ { key: 'first_name', label: 'First Name' },
+ { key: 'middle_name', label: 'Middle Name' },
+ { key: 'last_name', label: 'Last Name' },
+ { key: 'full_name', label: 'Full Name', description: 'First and last name.' },
+ { key: 'full_name_with_middle_name', label: 'Full Name with Middle Name' },
+ ];
+}
diff --git a/packages/pieces/community/0codekit/src/lib/common/props.ts b/packages/pieces/community/0codekit/src/lib/common/props.ts
new file mode 100644
index 00000000000..08ac34a928e
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/common/props.ts
@@ -0,0 +1,130 @@
+import { Property } from '@activepieces/pieces-framework';
+
+export const zeroCodeKitProps = {
+ timeZone,
+ dateFormat,
+ outputFormat,
+ returnTimestamps,
+ viesCountry,
+ euCountry,
+};
+
+function timeZone({ displayName, description, required }: TimeZonePropParams) {
+ return Property.StaticDropdown({
+ displayName,
+ description,
+ required,
+ options: {
+ options: listTimeZones().map((zone) => ({ label: zone, value: zone })),
+ },
+ });
+}
+
+function dateFormat({ displayName, description, required }: FormatPropParams) {
+ return Property.ShortText({
+ displayName,
+ description,
+ required,
+ placeholder: 'DD.MM.YYYY',
+ });
+}
+
+function outputFormat() {
+ return Property.ShortText({
+ displayName: 'Output Date Format',
+ description: `How dates in the result are written, using tokens such as \`DD\` (day), \`MM\` (month), \`YYYY\` (year), \`HH:mm\` (time). ${DEFAULT_FORMAT_HINT}`,
+ required: false,
+ placeholder: 'DD.MM.YYYY',
+ });
+}
+
+function returnTimestamps() {
+ return Property.Checkbox({
+ displayName: 'Return Unix Timestamps',
+ description: 'Return every date as a Unix timestamp (seconds) instead of formatted text.',
+ required: false,
+ defaultValue: false,
+ });
+}
+
+function viesCountry() {
+ return Property.StaticDropdown({
+ displayName: 'Country',
+ description: 'The EU member state that issued the VAT ID.',
+ required: true,
+ options: {
+ options: VIES_COUNTRIES.map((country) => ({
+ label: `${country.name} (${country.code})`,
+ value: country.code,
+ })),
+ },
+ });
+}
+
+function euCountry() {
+ return Property.StaticDropdown({
+ displayName: 'Country',
+ description: 'The EU member state to look up.',
+ required: true,
+ options: {
+ options: EU_COUNTRIES.map((country) => ({
+ label: `${country.name} (${country.code})`,
+ value: country.code,
+ })),
+ },
+ });
+}
+
+function listTimeZones(): string[] {
+ const zones = Intl.supportedValuesOf('timeZone');
+ return zones.includes('UTC') ? zones : ['UTC', ...zones];
+}
+
+const DEFAULT_FORMAT_HINT = 'Leave empty to use the 0CodeKit default.';
+
+const EU_COUNTRIES = [
+ { code: 'AT', name: 'Austria' },
+ { code: 'BE', name: 'Belgium' },
+ { code: 'BG', name: 'Bulgaria' },
+ { code: 'HR', name: 'Croatia' },
+ { code: 'CY', name: 'Cyprus' },
+ { code: 'CZ', name: 'Czechia' },
+ { code: 'DK', name: 'Denmark' },
+ { code: 'EE', name: 'Estonia' },
+ { code: 'FI', name: 'Finland' },
+ { code: 'FR', name: 'France' },
+ { code: 'DE', name: 'Germany' },
+ { code: 'GR', name: 'Greece' },
+ { code: 'HU', name: 'Hungary' },
+ { code: 'IE', name: 'Ireland' },
+ { code: 'IT', name: 'Italy' },
+ { code: 'LV', name: 'Latvia' },
+ { code: 'LT', name: 'Lithuania' },
+ { code: 'LU', name: 'Luxembourg' },
+ { code: 'MT', name: 'Malta' },
+ { code: 'NL', name: 'Netherlands' },
+ { code: 'PL', name: 'Poland' },
+ { code: 'PT', name: 'Portugal' },
+ { code: 'RO', name: 'Romania' },
+ { code: 'SK', name: 'Slovakia' },
+ { code: 'SI', name: 'Slovenia' },
+ { code: 'ES', name: 'Spain' },
+ { code: 'SE', name: 'Sweden' },
+];
+
+const VIES_COUNTRIES = [
+ ...EU_COUNTRIES.map((country) => (country.code === 'GR' ? { code: 'EL', name: country.name } : country)),
+ { code: 'XI', name: 'Northern Ireland' },
+];
+
+type TimeZonePropParams = {
+ displayName: string;
+ description: string;
+ required: boolean;
+};
+
+type FormatPropParams = {
+ displayName: string;
+ description: string;
+ required: boolean;
+};
diff --git a/packages/pieces/community/0codekit/src/lib/common/random-name.ts b/packages/pieces/community/0codekit/src/lib/common/random-name.ts
new file mode 100644
index 00000000000..a349ff54f72
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/common/random-name.ts
@@ -0,0 +1,41 @@
+import { zeroCodeKitApi } from './client';
+
+export const randomNameApi = {
+ generate,
+};
+
+async function generate({ apiKey, body }: RandomNameCall): Promise<RandomNameOutput> {
+ const response = await zeroCodeKitApi.post<RandomNameResponse>({
+ apiKey,
+ path: '/generate/name',
+ body,
+ });
+ return {
+ first_name: response.firstName ?? null,
+ middle_name: response.middleName ?? null,
+ last_name: response.lastName ?? null,
+ full_name: response.completeName ?? null,
+ full_name_with_middle_name: response.completeNameWithMiddleName ?? null,
+ };
+}
+
+type RandomNameCall = {
+ apiKey: string;
+ body: Record<string, unknown>;
+};
+
+type RandomNameResponse = {
+ firstName?: string;
+ middleName?: string;
+ lastName?: string;
+ completeName?: string;
+ completeNameWithMiddleName?: string;
+};
+
+export type RandomNameOutput = {
+ first_name: string | null;
+ middle_name: string | null;
+ last_name: string | null;
+ full_name: string | null;
+ full_name_with_middle_name: string | null;
+};
diff --git a/packages/pieces/community/0codekit/src/lib/common/vat.ts b/packages/pieces/community/0codekit/src/lib/common/vat.ts
new file mode 100644
index 00000000000..6ab5d7c5057
--- /dev/null
+++ b/packages/pieces/community/0codekit/src/lib/common/vat.ts
@@ -0,0 +1,44 @@
+import { zeroCodeKitApi } from './client';
+
+export const vatApi = {
+ validate,
+};
+
+async function validate({ apiKey, body }: VatCall): Promise<VatValidationOutput> {
+ const response = await zeroCodeKitApi.post<VatValidationResponse>({
+ apiKey,
+ path: '/business/validate/vat',
+ body,
+ });
+ return {
+ valid: response.valid ?? null,
+ country_code: response.countryCode ?? null,
+ vat_number: response.vatNumber ?? null,
+ company_name: response.name ?? null,
+ company_address: response.address ?? null,
+ request_date: response.requestDate ?? null,
+ };
+}
+
+type VatCall = {
+ apiKey: string;
+ body: Record<string, unknown>;
+};
+
+type VatValidationResponse = {
+ countryCode?: string;
+ vatNumber?: string;
+ requestDate?: string;
+ valid?: boolean;
+ name?: string;
+ address?: string;
+};
+
+export type VatValidationOutput = {
+ valid: boolean | null;
+ country_code: string | null;
+ vat_number: string | null;
+ company_name: string | null;
+ company_address: string | null;
+ request_date: string | null;
+};
diff --git a/packages/pieces/community/0codekit/test/actions.test.ts b/packages/pieces/community/0codekit/test/actions.test.ts
new file mode 100644
index 00000000000..1be7cff61fd
--- /dev/null
+++ b/packages/pieces/community/0codekit/test/actions.test.ts
@@ -0,0 +1,449 @@
+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
+import { zeroCodeKit } from '../src';
+import { lookupVatRatesAction } from '../src/lib/actions/business/lookup-vat-rates';
+import { validateBicAction } from '../src/lib/actions/business/validate-bic';
+import { validateEmailAction } from '../src/lib/actions/business/validate-email';
+import { validateIbanAction } from '../src/lib/actions/business/validate-iban';
+import { validateVatIdAction } from '../src/lib/actions/business/validate-vat-id';
+import { validateVatWithCountryCodeAction } from '../src/lib/actions/business/validate-vat-with-country-code';
+import { verifyDomainAction } from '../src/lib/actions/business/verify-domain';
+import { calculateBmiAction } from '../src/lib/actions/calculate/calculate-bmi';
+import { calculateGeoDistanceAction } from '../src/lib/actions/calculate/calculate-geo-distance';
+import { convertCsvToJsonAction } from '../src/lib/actions/convert/convert-csv-to-json';
+import { convertCurrencyAction } from '../src/lib/actions/convert/convert-currency';
+import { convertIpToGeoAction } from '../src/lib/actions/convert/convert-ip-to-geo';
+import { convertIsoToNationAction } from '../src/lib/actions/convert/convert-iso-to-nation';
+import { convertNationToIsoAction } from '../src/lib/actions/convert/convert-nation-to-iso';
+import { convertTimezoneWithDateAction } from '../src/lib/actions/date-and-time/convert-timezone-with-date';
+import { convertTimezoneWithUnixTimestampAction } from '../src/lib/actions/date-and-time/convert-timezone-with-unix-timestamp';
+import { currentMonthAction } from '../src/lib/actions/date-and-time/current-month';
+import { currentWeekAction } from '../src/lib/actions/date-and-time/current-week';
+import { currentWeekFromDateAction } from '../src/lib/actions/date-and-time/current-week-from-date';
+import { currentWeekFromUnixTimestampAction } from '../src/lib/actions/date-and-time/current-week-from-unix-timestamp';
+import { currentWeekWithWeekNumberAction } from '../src/lib/actions/date-and-time/current-week-with-week-number';
+import { currentWeekWithWeekNumberAndYearAction } from '../src/lib/actions/date-and-time/current-week-with-week-number-and-year';
+import { getHolidaysAction } from '../src/lib/actions/date-and-time/get-holidays';
+import { isWeekendAction } from '../src/lib/actions/date-and-time/is-weekend';
+import { isWeekendWithFormatAction } from '../src/lib/actions/date-and-time/is-weekend-with-format';
+import { dateInput } from '../src/lib/common/date-input';
+import { specificMonthAndYearAction } from '../src/lib/actions/date-and-time/specific-month-and-year';
+import { getANumberAction } from '../src/lib/actions/generate/get-a-number';
+import { getRandomCityAction } from '../src/lib/actions/generate/get-random-city';
+import { getRandomNameAction } from '../src/lib/actions/generate/get-random-name';
+import { getRandomNameWithGenderAction } from '../src/lib/actions/generate/get-random-name-with-gender';
+import { detectGenderAction } from '../src/lib/actions/text/detect-gender';
+import { splitNameAction } from '../src/lib/actions/text/split-name';
+import { textContainsAction } from '../src/lib/actions/text/text-contains';
+import { runAction, TestAction } from './helpers';
+
+const sendRequest = vi.fn();
+
+vi.mock('@activepieces/pieces-common', async (importOriginal) => {
+ const actual = await importOriginal<typeof import('@activepieces/pieces-common')>();
+ return {
+ ...actual,
+ httpClient: {
+ sendRequest: (...args: unknown[]) => sendRequest(...args),
+ },
+ };
+});
+
+function respond(body: unknown) {
+ sendRequest.mockResolvedValueOnce({ status: 200, headers: {}, body });
+}
+
+function sent() {
+ return sendRequest.mock.calls[0][0];
+}
+
+beforeEach(() => {
+ sendRequest.mockReset();
+});
+
+describe('piece metadata', () => {
+ const actions = Object.values(zeroCodeKit.actions()).filter((action) => action.name !== 'custom_api_call');
+
+ it('registers all 33 actions plus Custom API Call', () => {
+ expect(Object.keys(zeroCodeKit.actions())).toHaveLength(34);
+ });
+
+ it.each(actions.map((action) => [action.name, action]))('%s carries audience, aiMetadata and classification', (_, action) => {
+ expect(action.audience).toBe('both');
+ expect(action.classification).toBeDefined();
+ expect(action.aiMetadata?.description?.length).toBeGreaterThan(20);
+ expect(typeof action.aiMetadata?.idempotent).toBe('boolean');
+ });
+
+ it('registers Custom API Call', async () => {
+ const custom = zeroCodeKit.actions()['custom_api_call'];
+ expect(custom).toBeDefined();
+ });
+});
+
+describe('Custom API Call', () => {
+ const custom: TestAction = zeroCodeKit.actions()['custom_api_call'];
+
+ beforeEach(async () => {
+ const actual = await vi.importActual<typeof import('@activepieces/pieces-common')>('@activepieces/pieces-common');
+ vi.spyOn(actual.httpClient, 'sendRequest').mockImplementation((...args: unknown[]) => sendRequest(...args));
+ });
+
+ afterEach(() => {
+ vi.restoreAllMocks();
+ });
+
+ function callWith(url: string) {
+ return runAction({
+ action: custom,
+ propsValue: { url: { url }, method: 'GET', headers: {}, queryParams: {}, failsafe: false },
+ });
+ }
+
+ it('sends the API key to a path on the 0CodeKit API', async () => {
+ respond({ ok: true });
+
+ await callWith('/1saas/auth');
+
+ expect(sent().url).toBe('https://v2.1saas.co/1saas/auth');
+ expect(sent().headers.auth).toBe('zck_test');
+ });
+
+ it('accepts a full URL on the 0CodeKit API host', async () => {
+ respond({ ok: true });
+
+ await callWith('https://v2.1saas.co/1saas/auth');
+
+ expect(sent().headers.auth).toBe('zck_test');
+ });
+
+ it.each(['https://attacker.example/collect', 'https://v2.1saas.co.attacker.example/', 'https://[email protected]/', 'http://v2.1saas.co/1saas/auth'])(
+ 'refuses to send the API key to %s',
+ async (url) => {
+ await expect(callWith(url)).rejects.toThrow(/only sends your 0CodeKit API key/);
+ expect(sendRequest).not.toHaveBeenCalled();
+ },
+ );
+});
+
+describe('request shape', () => {
+ const cases: RequestCase[] = [
+ { action: currentMonthAction, props: {}, path: '/dateandtime/month', body: {} },
+ {
+ action: currentMonthAction,
+ props: { outputFormat: 'YYYY-MM-DD', returnTimestamps: true },
+ path: '/dateandtime/month',
+ body: { outputFormat: 'YYYY-MM-DD', options: { timeStamp: true } },
+ },
+ {
+ action: specificMonthAndYearAction,
+ props: { month: 2, year: 2024 },
+ path: '/dateandtime/month',
+ body: { month: 2, year: 2024 },
+ },
+ { action: currentWeekAction, props: {}, path: '/dateandtime/calendarweek', body: {} },
+ {
+ action: currentWeekFromDateAction,
+ props: { date: '20.01.2025', dateFormat: 'DD.MM.YYYY' },
+ path: '/dateandtime/calendarweek',
+ body: { date: '20.01.2025', dateFormat: 'DD.MM.YYYY' },
+ },
+ {
+ action: currentWeekFromUnixTimestampAction,
+ props: { unixTimestamp: 1737331200, outputFormat: 'DD/MM' },
+ path: '/dateandtime/calendarweek',
+ body: { unixTimestamp: 1737331200, outputFormat: 'DD/MM' },
+ },
+ {
+ action: currentWeekWithWeekNumberAction,
+ props: { weekNumber: 5 },
+ path: '/dateandtime/calendarweek',
+ body: { date: dateInput.isoWeekMonday({ weekNumber: 5, year: new Date().getUTCFullYear() }), dateFormat: 'DD.MM.YYYY' },
+ },
+ {
+ action: currentWeekWithWeekNumberAndYearAction,
+ props: { weekNumber: 5, year: 2023 },
+ path: '/dateandtime/calendarweek',
+ body: { date: '30.01.2023', dateFormat: 'DD.MM.YYYY' },
+ },
+ {
+ action: isWeekendAction,
+ props: { date: '2025-01-18' },
+ path: '/dateandtime/isweekend',
+ body: { date: '2025-01-18' },
+ },
+ {
+ action: isWeekendWithFormatAction,
+ props: { date: '18.01.2025', dateFormat: 'DD.MM.YYYY', timeZone: 'Europe/Berlin' },
+ path: '/dateandtime/isweekend',
+ body: { date: '2025-01-18', timeZone: 'Europe/Berlin' },
+ },
+ {
+ action: getHolidaysAction,
+ props: { countryCode: ' at ', year: 2022, state: '' },
+ path: '/dateandtime/holidays',
+ body: { countryCode: 'AT', year: 2022 },
+ },
+ {
+ action: convertTimezoneWithDateAction,
+ props: { inputTime: '08-12-2024 12:00', inputTimeZone: 'Europe/Berlin', destinationTimeZone: 'America/New_York' },
+ path: '/dateandtime/switchtimezone',
+ body: { inputTime: '08-12-2024 12:00', inputTimeZone: 'Europe/Berlin', destinationTimeZone: 'America/New_York' },
+ },
+ {
+ action: convertTimezoneWithUnixTimestampAction,
+ props: { inputTime: 1737331200, destinationTimeZone: 'Asia/Tokyo', formatPattern: 'HH:mm' },
+ path: '/dateandtime/switchtimezone',
+ body: { inputTime: 1737331200, inputTimeZone: 'UTC', destinationTimeZone: 'Asia/Tokyo', formatPattern: 'HH:mm' },
+ },
+ {
+ action: convertCsvToJsonAction,
+ props: { csv: 'a,b\n1,2', delimiter: 'auto' },
+ path: '/convert/csv/json',
+ body: { csv: 'a,b\n1,2', delimiter: 'auto', noheader: false, trim: true, ignoreEmpty: false },
+ },
+ {
+ action: convertCsvToJsonAction,
+ props: { csv: 'a;b', delimiter: ';', noHeader: true, trim: false, ignoreEmpty: true },
+ path: '/convert/csv/json',
+ body: { csv: 'a;b', delimiter: [';'], noheader: true, trim: false, ignoreEmpty: true },
+ },
+ {
+ action: convertCurrencyAction,
+ props: { amount: 10, sourceCurrency: 'usd', targetCurrency: ' eur' },
+ path: '/convert/currency',
+ body: { amount: 10, sourceCurrency: 'USD', targetCurrency: 'EUR' },
+ },
+ { action: convertIpToGeoAction, props: { ip: ' 1.1.1.1 ' }, path: '/convert/iptogeo', body: { ip: '1.1.1.1' } },
+ { action: convertIsoToNationAction, props: { iso: 'DE' }, path: '/convert/nationiso', body: { iso: 'DE' } },
+ { action: convertNationToIsoAction, props: { nation: 'Germany' }, path: '/convert/nationiso', body: { nation: 'Germany' } },
+ { action: calculateBmiAction, props: { weight: 80, height: 180 }, path: '/calculate/bmi', body: { weight: 80, height: 180 } },
+ {
+ action: calculateGeoDistanceAction,
+ props: { startPoint: 'Flensburg', endPoint: 'Istanbul', mode: 'walking' },
+ path: '/calculate/geodistance-v2',
+ body: { startPoint: 'Flensburg', endPoint: 'Istanbul', mode: 'walking' },
+ },
+ { action: validateBicAction, props: { bic: 'DEUTDEFF ' }, path: '/business/validate/bic', body: { bic: 'DEUTDEFF' } },
+ { action: validateIbanAction, props: { iban: 'DE02120300000000202051' }, path: '/business/validate/iban', body: { iban: 'DE02120300000000202051' } },
+ { action: validateEmailAction, props: { email: '[email protected]' }, path: '/business/validate/email', body: { email: '[email protected]' } },
+ {
+ action: validateVatWithCountryCodeAction,
+ props: { countryCode: 'IT', id: '076 435 20567' },
+ path: '/business/validate/vat',
+ body: { countryCode: 'IT', id: '07643520567' },
+ },
+ { action: validateVatIdAction, props: { vatId: 'de 123456789' }, path: '/business/validate/vat', body: { vatId: 'DE123456789' } },
+ { action: lookupVatRatesAction, props: { countryCode: 'DE' }, path: '/business/lookupvatrates', body: { countryCode: 'DE' } },
+ { action: verifyDomainAction, props: { domain: 'https://example.com' }, path: '/business/verify/domain', body: { domain: 'https://example.com' } },
+ { action: detectGenderAction, props: { fullName: 'Jane Doe' }, path: '/operator/gender', body: { fullname: 'Jane Doe' } },
+ { action: splitNameAction, props: { name: 'Jane Doe' }, path: '/operator/splitname', body: { name: 'Jane Doe', reversed: false } },
+ {
+ action: textContainsAction,
+ props: { text: 'hello world', keywords: ['world', ' ', 'moon'], caseSensitive: true },
+ path: '/text/contains',
+ body: {
+ text: 'hello world',
+ keywordList: ['world', 'moon'],
+ options: { caseSensitive: true, onlyCompleteWords: false },
+ },
+ },
+ { action: getRandomCityAction, props: {}, path: '/generate/city', body: {} },
+ { action: getRandomNameAction, props: {}, path: '/generate/name', body: {} },
+ { action: getRandomNameWithGenderAction, props: { gender: 'male' }, path: '/generate/name', body: { gender: 'male' } },
+ {
+ action: getANumberAction,
+ props: { min: 1, max: 10, type: 'integer', round: 2 },
+ path: '/generate/number',
+ body: { range: [1, 10], type: 'integer' },
+ },
+ {
+ action: getANumberAction,
+ props: { min: 0, max: 1, type: 'decimal', round: 3 },
+ path: '/generate/number',
+ body: { range: [0, 1], type: 'decimal', round: 3 },
+ },
+ ];
+
+ it.each(cases.map((testCase) => [testCase.action.name, testCase.path, testCase]))(
+ '%s posts to %s',
+ async (_, __, testCase) => {
+ respond({});
+
+ await runAction({ action: testCase.action, propsValue: testCase.props });
+
+ expect(sendRequest).toHaveBeenCalledTimes(1);
+ expect(sent().method).toBe('POST');
+ expect(sent().url).toBe(`https://v2.1saas.co${testCase.path}`);
+ expect(sent().headers).toEqual({ auth: 'zck_test' });
+ expect(sent().body).toEqual(testCase.body);
+ },
+ );
+});
+
+describe('outputs', () => {
+ it('flattens a calendar week', async () => {
+ respond({ workingDate: '20.01.2025', weekNumber: 4, firstDayOfWeek: '20.01.2025', lastDayOfWeek: '26.01.2025' });
+
+ await expect(runAction({ action: currentWeekAction, propsValue: {} })).resolves.toEqual({
+ week_number: 4,
+ working_date: '20.01.2025',
+ first_day_of_week: '20.01.2025',
+ last_day_of_week: '26.01.2025',
+ });
+ });
+
+ it('returns month day lists with a workday count', async () => {
+ respond({
+ daysInMonth: 28,
+ firstDayOfMonth: '01.02.2025',
+ lastDayOfMonth: '28.02.2025',
+ lastWorkdayOfMonth: '28.02.2025',
+ workdays: ['03.02.2025', '04.02.2025'],
+ workdaysReversed: ['04.02.2025', '03.02.2025'],
+ saturdays: ['01.02.2025'],
+ sundays: ['02.02.2025'],
+ });
+
+ const result = await runAction({ action: specificMonthAndYearAction, propsValue: { month: 2, year: 2025 } });
+
+ expect(result).toMatchObject({ days_in_month: 28, workday_count: 2, saturdays: ['01.02.2025'] });
+ });
+
+ it('returns an empty holiday list instead of failing when none are returned', async () => {
+ respond({});
+
+ await expect(runAction({ action: getHolidaysAction, propsValue: { countryCode: 'DE', year: 2025 } })).resolves.toEqual([]);
+ });
+
+ it('returns one flat row per holiday', async () => {
+ respond({
+ holidays: [
+ { date: '2025-01-01 00:00:00', start: 's', end: 'e', name: "New Year's Day", type: 'public', rule: '01-01' },
+ ],
+ });
+
+ await expect(runAction({ action: getHolidaysAction, propsValue: { countryCode: 'DE', year: 2025 } })).resolves.toEqual([
+ { name: "New Year's Day", date: '2025-01-01 00:00:00', type: 'public', start: 's', end: 'e', rule: '01-01' },
+ ]);
+ });
+
+ it('flattens BMI nutrients', async () => {
+ respond({ bmi: 24.69, bmiClassification: 'normal', dbw: 72, kcal: 2160, nutrients: { carbohydrates: 324, protein: 81, fat: 60 } });
+
+ await expect(runAction({ action: calculateBmiAction, propsValue: { weight: 80, height: 180 } })).resolves.toEqual({
+ bmi: 24.69,
+ classification: 'normal',
+ desirable_body_weight_kg: 72,
+ daily_calories_kcal: 2160,
+ daily_carbohydrates_g: 324,
+ daily_protein_g: 81,
+ daily_fat_g: 60,
+ });
+ });
+
+ it('flattens geo distance duration', async () => {
+ respond({ distanceInKM: 584.2, duration: { hours: 5, minutes: 41 } });
+
+ await expect(
+ runAction({ action: calculateGeoDistanceAction, propsValue: { startPoint: 'a', endPoint: 'b', mode: 'driving' } }),
+ ).resolves.toEqual({ distance_km: 584.2, duration_hours: 5, duration_minutes: 41 });
+ });
+
+ it('turns "false" VAT rates into null so the column stays numeric', async () => {
+ respond({
+ country: 'Denmark',
+ vat_name: 'Merværdiafgift',
+ vat_abbr: 'moms',
+ standard_rate: 25,
+ reduced_rate: false,
+ reduced_rate_alt: false,
+ super_reduced_rate: false,
+ parking_rate: false,
+ });
+
+ const result = await runAction({ action: lookupVatRatesAction, propsValue: { countryCode: 'DK' } });
+
+ expect(result).toMatchObject({ standard_rate: 25, reduced_rate: null, parking_rate: null, vat_abbreviation: 'moms' });
+ });
+
+ it('returns the registered company for a valid VAT ID', async () => {
+ respond({ countryCode: 'DE', vatNumber: '123456789', requestDate: '2025-01-20', valid: true, name: 'ACME', address: 'Street 1' });
+
+ await expect(runAction({ action: validateVatIdAction, propsValue: { vatId: 'DE123456789' } })).resolves.toEqual({
+ valid: true,
+ country_code: 'DE',
+ vat_number: '123456789',
+ company_name: 'ACME',
+ company_address: 'Street 1',
+ request_date: '2025-01-20',
+ });
+ });
+
+ it('returns the parsed CSV rows as a list', async () => {
+ respond({ json: [{ a: '1', b: '2' }] });
+
+ await expect(runAction({ action: convertCsvToJsonAction, propsValue: { csv: 'a,b\n1,2', delimiter: 'auto' } })).resolves.toEqual([{ a: '1', b: '2' }]);
+ });
+
+ it('summarises keyword findings with flat rows', async () => {
+ respond({
+ findings: [
+ { keyword: 'world', contains: true, foundPositions: [6, 20] },
+ { keyword: 'moon', contains: false, foundPositions: [] },
+ ],
+ });
+
+ await expect(runAction({ action: textContainsAction, propsValue: { text: 't', keywords: ['world', 'moon'] } })).resolves.toEqual({
+ contains_any: true,
+ contains_all: false,
+ findings: [
+ { keyword: 'world', contains: true, match_count: 2, found_positions: '6, 20' },
+ { keyword: 'moon', contains: false, match_count: 0, found_positions: '' },
+ ],
+ });
+ });
+
+ it('maps random name fields to readable keys', async () => {
+ respond({ firstName: 'Jane', middleName: 'M', lastName: 'Doe', completeName: 'Jane Doe', completeNameWithMiddleName: 'Jane M Doe' });
+
+ await expect(runAction({ action: getRandomNameAction, propsValue: {} })).resolves.toEqual({
+ first_name: 'Jane',
+ middle_name: 'M',
+ last_name: 'Doe',
+ full_name: 'Jane Doe',
+ full_name_with_middle_name: 'Jane M Doe',
+ });
+ });
+
+ it('fills missing fields with null instead of dropping them', async () => {
+ respond({ country: 'Germany' });
+
+ const result = await runAction({ action: convertIpToGeoAction, propsValue: { ip: '1.1.1.1' } });
+
+ expect(result).toMatchObject({ country: 'Germany', city: null, latitude: null });
+ });
+});
+
+describe('input guards', () => {
+ it('Detect Gender needs a first or full name', async () => {
+ await expect(runAction({ action: detectGenderAction, propsValue: { firstName: ' ', fullName: '' } })).rejects.toThrow(/First Name or Full Name/);
+ expect(sendRequest).not.toHaveBeenCalled();
+ });
+
+ it('Text Contains needs at least one keyword', async () => {
+ await expect(runAction({ action: textContainsAction, propsValue: { text: 't', keywords: [' '] } })).rejects.toThrow(/at least one keyword/);
+ expect(sendRequest).not.toHaveBeenCalled();
+ });
+
+ it('Get a Number rejects a minimum above the maximum', async () => {
+ await expect(runAction({ action: getANumberAction, propsValue: { min: 10, max: 1, type: 'integer' } })).rejects.toThrow(/Minimum must be/);
+ expect(sendRequest).not.toHaveBeenCalled();
+ });
+});
+
+type RequestCase = {
+ action: TestAction & { name: string };
+ props: Record<string, unknown>;
+ path: string;
+ body: Record<string, unknown>;
+};
diff --git a/packages/pieces/community/0codekit/test/client.test.ts b/packages/pieces/community/0codekit/test/client.test.ts
new file mode 100644
index 00000000000..7522eba5d84
--- /dev/null
+++ b/packages/pieces/community/0codekit/test/client.test.ts
@@ -0,0 +1,102 @@
+import { HttpError } from '@activepieces/pieces-common';
+import { beforeEach, describe, expect, it, vi } from 'vitest';
+import { zeroCodeKitAuth } from '../src/lib/auth';
+import { zeroCodeKitApi } from '../src/lib/common/client';
+import { authValidationServerContext } from './helpers';
+
+const sendRequest = vi.fn();
+
+vi.mock('@activepieces/pieces-common', async (importOriginal) => {
+ const actual = await importOriginal<typeof import('@activepieces/pieces-common')>();
+ return {
+ ...actual,
+ httpClient: {
+ sendRequest: (...args: unknown[]) => sendRequest(...args),
+ },
+ };
+});
+
+function httpError({ status, body }: { status: number; body: unknown }) {
+ return new HttpError({}, { status, responseBody: body });
+}
+
+function validate(auth: string) {
+ return zeroCodeKitAuth.validate?.({ auth, server: authValidationServerContext() });
+}
+
+beforeEach(() => {
+ sendRequest.mockReset();
+});
+
+describe('client', () => {
+ it('POSTs JSON to v2.1saas.co with the key in the auth header', async () => {
+ sendRequest.mockResolvedValueOnce({ body: { ok: true } });
+
+ await zeroCodeKitApi.post({ apiKey: 'k1', path: '/generate/city', body: { a: 1 } });
+
+ const request = sendRequest.mock.calls[0][0];
+ expect(request.method).toBe('POST');
+ expect(request.url).toBe('https://v2.1saas.co/generate/city');
+ expect(request.headers).toEqual({ auth: 'k1' });
+ expect(request.body).toEqual({ a: 1 });
+ });
+
+ it('drops undefined, null and empty-string fields so API defaults apply', async () => {
+ sendRequest.mockResolvedValueOnce({ body: {} });
+
+ await zeroCodeKitApi.post({
+ apiKey: 'k1',
+ path: '/x',
+ body: { keep: 'v', zero: 0, off: false, gone: undefined, nothing: null, empty: '' },
+ });
+
+ expect(sendRequest.mock.calls[0][0].body).toEqual({ keep: 'v', zero: 0, off: false });
+ });
+
+ it('sends an empty object when no body is given', async () => {
+ sendRequest.mockResolvedValueOnce({ body: {} });
+
+ await zeroCodeKitApi.post({ apiKey: 'k1', path: '/generate/city' });
+
+ expect(sendRequest.mock.calls[0][0].body).toEqual({});
+ });
+
+ it('rewrites 0CodeKit error envelopes into a readable message', async () => {
+ sendRequest.mockRejectedValueOnce(
+ httpError({ status: 400, body: { status: 400, errorMessage: 'Error at `body.iban`: Required.', code: 'bad_request' } }),
+ );
+
+ await expect(zeroCodeKitApi.post({ apiKey: 'k1', path: '/business/validate/iban' })).rejects.toThrow(
+ '0CodeKit returned 400: Error at `body.iban`: Required. (bad_request)',
+ );
+ });
+});
+
+describe('auth', () => {
+ it('accepts a key that /1saas/auth authorizes', async () => {
+ sendRequest.mockResolvedValueOnce({ body: { message: 'You are authorized.' } });
+
+ await expect(validate('good')).resolves.toEqual({ valid: true });
+ expect(sendRequest.mock.calls[0][0].url).toBe('https://v2.1saas.co/1saas/auth');
+ expect(sendRequest.mock.calls[0][0].headers).toEqual({ auth: 'good' });
+ });
+
+ it('rejects a key 0CodeKit answers with 401', async () => {
+ sendRequest.mockRejectedValueOnce(
+ httpError({ status: 401, body: { status: 401, errorMessage: 'Invalid API key.', code: 'unauthorized' } }),
+ );
+
+ const result = await validate('bad');
+
+ expect(result).toMatchObject({ valid: false });
+ expect(result?.valid === false && result.error).toMatch(/rejected this API key/);
+ });
+
+ it('reports other failures as a reachability problem, not a bad key', async () => {
+ sendRequest.mockRejectedValueOnce(httpError({ status: 503, body: { errorMessage: 'Down for maintenance' } }));
+
+ const result = await validate('any');
+
+ expect(result?.valid === false && result.error).toMatch(/Could not reach 0CodeKit.*503.*Down for maintenance/);
+ });
+});
diff --git a/packages/pieces/community/0codekit/test/date-input.test.ts b/packages/pieces/community/0codekit/test/date-input.test.ts
new file mode 100644
index 00000000000..cab6031f06c
--- /dev/null
+++ b/packages/pieces/community/0codekit/test/date-input.test.ts
@@ -0,0 +1,51 @@
+import { describe, expect, it } from 'vitest';
+import { dateInput } from '../src/lib/common/date-input';
+
+describe('dateInput.isoWeekMonday', () => {
+ it('returns the Monday of an ISO week', () => {
+ expect(dateInput.isoWeekMonday({ weekNumber: 10, year: 2024 })).toBe('04.03.2024');
+ expect(dateInput.isoWeekMonday({ weekNumber: 1, year: 2024 })).toBe('01.01.2024');
+ expect(dateInput.isoWeekMonday({ weekNumber: 1, year: 2021 })).toBe('04.01.2021');
+ });
+
+ it('handles week 53 only in years that have it', () => {
+ expect(dateInput.isoWeekMonday({ weekNumber: 53, year: 2020 })).toBe('28.12.2020');
+ expect(() => dateInput.isoWeekMonday({ weekNumber: 53, year: 2021 })).toThrow(/1 to 52/);
+ });
+
+ it('rejects non-whole or out-of-range week numbers', () => {
+ expect(() => dateInput.isoWeekMonday({ weekNumber: 0, year: 2024 })).toThrow(/does not exist/);
+ expect(() => dateInput.isoWeekMonday({ weekNumber: 2.5, year: 2024 })).toThrow(/does not exist/);
+ });
+});
+
+describe('dateInput.toIsoDate', () => {
+ it('parses common formats and separators', () => {
+ expect(dateInput.toIsoDate({ date: '13.01.2024', format: 'DD.MM.YYYY' })).toBe('2024-01-13');
+ expect(dateInput.toIsoDate({ date: '01/13/2024', format: 'MM/DD/YYYY' })).toBe('2024-01-13');
+ expect(dateInput.toIsoDate({ date: '2024-1-3', format: 'YYYY-M-D' })).toBe('2024-01-03');
+ expect(dateInput.toIsoDate({ date: '13.01.24', format: 'DD.MM.YY' })).toBe('2024-01-13');
+ });
+
+ it('rejects a date that does not match the format', () => {
+ expect(() => dateInput.toIsoDate({ date: '2024-01-13', format: 'DD.MM.YYYY' })).toThrow(/does not match/);
+ });
+
+ it('rejects impossible dates and incomplete formats', () => {
+ expect(() => dateInput.toIsoDate({ date: '31.02.2024', format: 'DD.MM.YYYY' })).toThrow(/not a real calendar date/);
+ expect(() => dateInput.toIsoDate({ date: '01.2024', format: 'MM.YYYY' })).toThrow(/must include/);
+ });
+
+ it('rejects a format that repeats the year, month or day before matching', () => {
+ expect(() => dateInput.toIsoDate({ date: '01.01.2024', format: 'DD.D.YYYY' })).toThrow(/more than once/);
+ expect(() => dateInput.toIsoDate({ date: '2024.1.24', format: 'YYYY.M.YY' })).toThrow(/more than once/);
+ });
+
+ it('answers quickly for an adversarial format and date', () => {
+ const format = `${'MD'.repeat(20)}YYYY`;
+ const date = `${'1'.repeat(80)}x`;
+ const startedAt = Date.now();
+ expect(() => dateInput.toIsoDate({ date, format })).toThrow(/more than once/);
+ expect(Date.now() - startedAt).toBeLessThan(100);
+ });
+});
diff --git a/packages/pieces/community/0codekit/test/hardening.test.ts b/packages/pieces/community/0codekit/test/hardening.test.ts
new file mode 100644
index 00000000000..caf6068c562
--- /dev/null
+++ b/packages/pieces/community/0codekit/test/hardening.test.ts
@@ -0,0 +1,60 @@
+import { beforeEach, describe, expect, it, vi } from 'vitest';
+import { validateIbanAction } from '../src/lib/actions/business/validate-iban';
+import { zeroCodeKitApi, ZEROCODEKIT_TIMEOUT_MS } from '../src/lib/common/client';
+import { runAction } from './helpers';
+
+const sendRequest = vi.fn();
+
+vi.mock('@activepieces/pieces-common', async (importOriginal) => {
+ const actual = await importOriginal<typeof import('@activepieces/pieces-common')>();
+ return {
+ ...actual,
+ httpClient: {
+ sendRequest: (...args: unknown[]) => sendRequest(...args),
+ },
+ };
+});
+
+const STEP_LIMIT_MS = 600_000;
+const write = vi.fn();
+
+function respond(body: unknown) {
+ sendRequest.mockResolvedValueOnce({ status: 200, headers: {}, body });
+}
+
+function call(index: number) {
+ return sendRequest.mock.calls[index][0];
+}
+
+beforeEach(() => {
+ sendRequest.mockReset();
+ write.mockReset();
+ write.mockImplementation(async ({ fileName }: { fileName: string }) => `file://${fileName}`);
+});
+
+describe('request timeouts', () => {
+ it('gives simple lookups a 30 second timeout', async () => {
+ respond({ valid: true });
+ await runAction({ action: validateIbanAction, propsValue: { iban: 'DE89370400440532013000' }, write });
+ expect(call(0).timeout).toBe(30_000);
+ });
+
+ it('bounds every timeout class below the step limit', () => {
+ for (const value of Object.values(ZEROCODEKIT_TIMEOUT_MS)) {
+ expect(value).toBeGreaterThan(0);
+ expect(value).toBeLessThan(STEP_LIMIT_MS);
+ }
+ expect(zeroCodeKitApi.timeoutFor('/storage/perm/add')).toBe(120_000);
+ expect(zeroCodeKitApi.timeoutFor('/generate/qrcode/decode')).toBe(120_000);
+ expect(zeroCodeKitApi.timeoutFor('/storage/perm/list')).toBe(30_000);
+ });
+
+ it('reports a timeout in plain words', async () => {
+ const abort = new Error('This operation was aborted');
+ abort.name = 'AbortError';
+ sendRequest.mockRejectedValueOnce(abort);
+ await expect(runAction({ action: validateIbanAction, propsValue: { iban: 'DE89' }, write })).rejects.toThrow(
+ /did not answer in time/,
+ );
+ });
+});
diff --git a/packages/pieces/community/0codekit/test/helpers.ts b/packages/pieces/community/0codekit/test/helpers.ts
new file mode 100644
index 00000000000..a109f0283dd
--- /dev/null
+++ b/packages/pieces/community/0codekit/test/helpers.ts
@@ -0,0 +1,59 @@
+import {
+ ActionContext,
+ AppConnectionType,
+ AppConnectionValueForAuthProperty,
+ AuthValidationServerContext,
+ createMockActionContext,
+ FilesService,
+ InputPropertyMap,
+ PropertyContext,
+ SecretTextProperty,
+ StaticPropsValue,
+} from '@activepieces/pieces-framework';
+
+export const TEST_AUTH: SecretTextConnection = { type: AppConnectionType.SECRET_TEXT, secret_text: 'zck_test' };
+
+export function runAction({ action, propsValue, write }: RunActionParams): Promise<unknown> {
+ const base = createMockActionContext<InputPropertyMap>({ propsValue });
+ const context: ZeroCodeKitActionContext = {
+ ...base,
+ auth: TEST_AUTH,
+ files: write ? { ...base.files, write } : base.files,
+ };
+ return action.run(context);
+}
+
+export function loadDropdownOptions({ dropdown, auth }: LoadDropdownOptionsParams): Promise<unknown> {
+ return dropdown.options({ auth }, propertyContext());
+}
+
+export function authValidationServerContext(): AuthValidationServerContext {
+ const { apiUrl, publicUrl } = createMockActionContext<InputPropertyMap>({ propsValue: {} }).server;
+ return { apiUrl, publicUrl, mintOidcToken: async () => 'test-oidc-token' };
+}
+
+function propertyContext(): PropertyContext {
+ const { server, project, flows, connections } = createMockActionContext<InputPropertyMap>({ propsValue: {} });
+ return { server, project, flows, connections };
+}
+
+type SecretTextConnection = AppConnectionValueForAuthProperty<SecretTextProperty<true>>;
+
+type ZeroCodeKitActionContext = ActionContext<SecretTextProperty<true>, InputPropertyMap>;
+
+export type TestAction = {
+ run(context: ZeroCodeKitActionContext): Promise<unknown>;
+};
+
+type RunActionParams = {
+ action: TestAction;
+ propsValue: StaticPropsValue<InputPropertyMap>;
+ write?: FilesService['write'];
+};
+
+type LoadDropdownOptionsParams = {
+ dropdown: {
+ options(propsValue: { auth?: SecretTextConnection }, ctx: PropertyContext): Promise<unknown>;
+ };
+ auth: SecretTextConnection | undefined;
+};
diff --git a/packages/pieces/community/0codekit/test/output-schemas-business-ai.test.ts b/packages/pieces/community/0codekit/test/output-schemas-business-ai.test.ts
new file mode 100644
index 00000000000..803a52116e2
--- /dev/null
+++ b/packages/pieces/community/0codekit/test/output-schemas-business-ai.test.ts
@@ -0,0 +1,112 @@
+import { OutputSchema } from '@activepieces/pieces-framework';
+import { beforeEach, describe, expect, it, vi } from 'vitest';
+import { lookupVatRatesAction } from '../src/lib/actions/business/lookup-vat-rates';
+import { validateBicAction } from '../src/lib/actions/business/validate-bic';
+import { validateEmailAction } from '../src/lib/actions/business/validate-email';
+import { validateIbanAction } from '../src/lib/actions/business/validate-iban';
+import { validateVatIdAction } from '../src/lib/actions/business/validate-vat-id';
+import { validateVatWithCountryCodeAction } from '../src/lib/actions/business/validate-vat-with-country-code';
+import { verifyDomainAction } from '../src/lib/actions/business/verify-domain';
+import { detectGenderAction } from '../src/lib/actions/text/detect-gender';
+import { splitNameAction } from '../src/lib/actions/text/split-name';
+import { textContainsAction } from '../src/lib/actions/text/text-contains';
+import { runAction, TestAction } from './helpers';
+
+const sendRequest = vi.fn();
+
+vi.mock('@activepieces/pieces-common', async (importOriginal) => {
+ const actual = await importOriginal<typeof import('@activepieces/pieces-common')>();
+ return {
+ ...actual,
+ httpClient: {
+ sendRequest: (...args: unknown[]) => sendRequest(...args),
+ },
+ };
+});
+
+const VAT_RESPONSE = {
+ countryCode: 'DE',
+ vatNumber: '123456789',
+ requestDate: '2025-01-20',
+ valid: true,
+ name: 'ACME',
+ address: 'Street 1',
+};
+
+const CASES: SchemaCase[] = [
+ { action: validateBicAction, props: { bic: 'DEUTDEFF' }, response: { valid: true } },
+ { action: validateIbanAction, props: { iban: 'DE02120300000000202051' }, response: { valid: true } },
+ { action: validateEmailAction, props: { email: '[email protected]' }, response: { valid: true, emailCorrected: '[email protected]' } },
+ { action: validateVatIdAction, props: { vatId: 'DE123456789' }, response: VAT_RESPONSE },
+ { action: validateVatWithCountryCodeAction, props: { countryCode: 'DE', id: '123456789' }, response: VAT_RESPONSE },
+ {
+ action: lookupVatRatesAction,
+ props: { countryCode: 'DE' },
+ response: {
+ country: 'Germany',
+ vat_name: 'Umsatzsteuer',
+ vat_abbr: 'USt',
+ standard_rate: 19,
+ reduced_rate: 7,
+ reduced_rate_alt: false,
+ super_reduced_rate: false,
+ parking_rate: false,
+ },
+ },
+ { action: verifyDomainAction, props: { domain: 'https://www.example.com' }, response: { isValid: true, mainDomain: 'example.com' } },
+ { action: detectGenderAction, props: { fullName: 'Jane Doe' }, response: { firstname: 'Jane', lastname: 'Doe', detectedGender: 'female' } },
+ { action: splitNameAction, props: { name: 'Jane Doe' }, response: { firstName: 'Jane', lastName: 'Doe' } },
+ {
+ action: textContainsAction,
+ props: { text: 'the cat sat', keywords: ['cat'] },
+ response: { findings: [{ keyword: 'cat', contains: true, foundPositions: [4] }] },
+ },
+];
+
+beforeEach(() => {
+ sendRequest.mockReset();
+});
+
+describe('business and text output schemas', () => {
+ it.each(CASES.map((testCase) => [testCase.action.name, testCase]))('%s schema matches its run() output', async (_, testCase) => {
+ sendRequest.mockResolvedValueOnce({ status: 200, headers: {}, body: testCase.response });
+
+ const output = await runAction({ action: testCase.action, propsValue: testCase.props });
+
+ expect(testCase.action.outputSchema).toBeDefined();
+ expectFieldsMatch({ fields: testCase.action.outputSchema?.fields ?? [], value: output });
+ });
+});
+
+function expectFieldsMatch({ fields, value }: { fields: OutputSchema['fields']; value: unknown }): void {
+ expect(isRecord(value)).toBe(true);
+ if (!isRecord(value)) {
+ return;
+ }
+ expect(fields.map((field) => field.value ?? field.key).sort()).toEqual(Object.keys(value).sort());
+ for (const field of fields) {
+ const nested = value[field.value ?? field.key];
+ if (field.listItems) {
+ expect(Array.isArray(nested) && nested.length > 0).toBe(true);
+ if (Array.isArray(nested)) {
+ nested.forEach((item) => expectFieldsMatch({ fields: field.listItems ?? [], value: item }));
+ }
+ }
+ if (field.children) {
+ expectFieldsMatch({ fields: field.children, value: nested });
+ }
+ }
+}
+
+function isRecord(value: unknown): value is Record<string, unknown> {
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
+}
+
+type SchemaCase = {
+ action: TestAction & {
+ name: string;
+ outputSchema?: OutputSchema;
+ };
+ props: Record<string, unknown>;
+ response: unknown;
+};
diff --git a/packages/pieces/community/0codekit/test/output-schemas-date-convert.test.ts b/packages/pieces/community/0codekit/test/output-schemas-date-convert.test.ts
new file mode 100644
index 00000000000..453f890756c
--- /dev/null
+++ b/packages/pieces/community/0codekit/test/output-schemas-date-convert.test.ts
@@ -0,0 +1,210 @@
+import { OutputSchema } from '@activepieces/pieces-framework';
+import { beforeEach, describe, expect, it, vi } from 'vitest';
+import { calculateBmiAction } from '../src/lib/actions/calculate/calculate-bmi';
+import { calculateGeoDistanceAction } from '../src/lib/actions/calculate/calculate-geo-distance';
+import { convertCsvToJsonAction } from '../src/lib/actions/convert/convert-csv-to-json';
+import { convertCurrencyAction } from '../src/lib/actions/convert/convert-currency';
+import { convertIpToGeoAction } from '../src/lib/actions/convert/convert-ip-to-geo';
+import { convertIsoToNationAction } from '../src/lib/actions/convert/convert-iso-to-nation';
+import { convertNationToIsoAction } from '../src/lib/actions/convert/convert-nation-to-iso';
+import { convertTimezoneWithDateAction } from '../src/lib/actions/date-and-time/convert-timezone-with-date';
+import { convertTimezoneWithUnixTimestampAction } from '../src/lib/actions/date-and-time/convert-timezone-with-unix-timestamp';
+import { currentMonthAction } from '../src/lib/actions/date-and-time/current-month';
+import { currentWeekAction } from '../src/lib/actions/date-and-time/current-week';
+import { currentWeekFromDateAction } from '../src/lib/actions/date-and-time/current-week-from-date';
+import { currentWeekFromUnixTimestampAction } from '../src/lib/actions/date-and-time/current-week-from-unix-timestamp';
+import { currentWeekWithWeekNumberAction } from '../src/lib/actions/date-and-time/current-week-with-week-number';
+import { currentWeekWithWeekNumberAndYearAction } from '../src/lib/actions/date-and-time/current-week-with-week-number-and-year';
+import { getHolidaysAction } from '../src/lib/actions/date-and-time/get-holidays';
+import { isWeekendAction } from '../src/lib/actions/date-and-time/is-weekend';
+import { isWeekendWithFormatAction } from '../src/lib/actions/date-and-time/is-weekend-with-format';
+import { specificMonthAndYearAction } from '../src/lib/actions/date-and-time/specific-month-and-year';
+import { getANumberAction } from '../src/lib/actions/generate/get-a-number';
+import { getRandomCityAction } from '../src/lib/actions/generate/get-random-city';
+import { getRandomNameAction } from '../src/lib/actions/generate/get-random-name';
+import { getRandomNameWithGenderAction } from '../src/lib/actions/generate/get-random-name-with-gender';
+import { runAction, TestAction } from './helpers';
+
+const sendRequest = vi.fn();
+
+vi.mock('@activepieces/pieces-common', async (importOriginal) => {
+ const actual = await importOriginal<typeof import('@activepieces/pieces-common')>();
+ return {
+ ...actual,
+ httpClient: {
+ sendRequest: (...args: unknown[]) => sendRequest(...args),
+ },
+ };
+});
+
+beforeEach(() => {
+ sendRequest.mockReset();
+});
+
+const calendarWeekResponse = { workingDate: '20.01.2025', weekNumber: 4, firstDayOfWeek: '20.01.2025', lastDayOfWeek: '26.01.2025' };
+const monthResponse = {
+ daysInMonth: 28,
+ firstDayOfMonth: '01.02.2025',
+ lastDayOfMonth: '28.02.2025',
+ lastWorkdayOfMonth: '28.02.2025',
+ workdays: ['03.02.2025'],
+ workdaysReversed: ['03.02.2025'],
+ saturdays: ['01.02.2025'],
+ sundays: ['02.02.2025'],
+};
+const isWeekendResponse = { isWeekend: false, weekDay: 'Monday', dayNumber: 1 };
+const switchTimeZoneResponse = { convertedTime: '20.01.2025 15:30', timeZone: 'Europe/Berlin' };
+const nameResponse = {
+ firstName: 'Ada',
+ middleName: 'Byron',
+ lastName: 'Lovelace',
+ completeName: 'Ada Lovelace',
+ completeNameWithMiddleName: 'Ada Byron Lovelace',
+};
+
+const objectCases: ObjectCase[] = [
+ { action: currentWeekAction, props: {}, response: calendarWeekResponse },
+ { action: currentWeekFromDateAction, props: { date: '20.01.2025', dateFormat: 'DD.MM.YYYY' }, response: calendarWeekResponse },
+ { action: currentWeekFromUnixTimestampAction, props: { unixTimestamp: 1737331200 }, response: calendarWeekResponse },
+ { action: currentWeekWithWeekNumberAction, props: { weekNumber: 4 }, response: calendarWeekResponse },
+ { action: currentWeekWithWeekNumberAndYearAction, props: { weekNumber: 4, year: 2025 }, response: calendarWeekResponse },
+ { action: currentMonthAction, props: {}, response: monthResponse },
+ { action: specificMonthAndYearAction, props: { month: 2, year: 2025 }, response: monthResponse },
+ { action: isWeekendAction, props: { date: '2025-01-20' }, response: isWeekendResponse },
+ { action: isWeekendWithFormatAction, props: { date: '20.01.2025', dateFormat: 'DD.MM.YYYY' }, response: isWeekendResponse },
+ {
+ action: convertTimezoneWithDateAction,
+ props: { inputTime: '2025-01-20 14:30', inputTimeZone: 'UTC', destinationTimeZone: 'Europe/Berlin' },
+ response: switchTimeZoneResponse,
+ },
+ {
+ action: convertTimezoneWithUnixTimestampAction,
+ props: { inputTime: 1737331200, destinationTimeZone: 'Europe/Berlin' },
+ response: switchTimeZoneResponse,
+ },
+ {
+ action: calculateBmiAction,
+ props: { weight: 80, height: 180 },
+ response: { bmi: 24.69, bmiClassification: 'normal', dbw: 72, kcal: 2160, nutrients: { carbohydrates: 324, protein: 81, fat: 60 } },
+ },
+ {
+ action: calculateGeoDistanceAction,
+ props: { startPoint: 'Berlin', endPoint: 'Munich', mode: 'driving' },
+ response: { distanceInKM: 584, duration: { hours: 5, minutes: 40 } },
+ },
+ {
+ action: convertCurrencyAction,
+ props: { amount: 10, sourceCurrency: 'usd', targetCurrency: 'eur' },
+ response: { oldAmount: 10, oldCurrency: 'USD', convertedAmount: 9.2, currency: 'EUR', dataDate: '20.01.2025' },
+ },
+ {
+ action: convertIpToGeoAction,
+ props: { ip: '87.155.190.147' },
+ response: {
+ status: 'success',
+ country: 'Germany',
+ countryCode: 'DE',
+ region: 'BE',
+ regionName: 'Berlin',
+ city: 'Berlin',
+ zip: '10115',
+ lat: 52.52,
+ lon: 13.4,
+ timezone: 'Europe/Berlin',
+ isp: 'Deutsche Telekom AG',
+ org: 'Deutsche Telekom AG',
+ as: 'AS3320 Deutsche Telekom AG',
+ query: '87.155.190.147',
+ },
+ },
+ { action: convertIsoToNationAction, props: { iso: 'DE' }, response: { iso: 'DE', nation: 'Germany' } },
+ { action: convertNationToIsoAction, props: { nation: 'Germany' }, response: { iso: 'DE', nation: 'Germany' } },
+ { action: getANumberAction, props: { min: 1, max: 10, type: 'integer' }, response: { randomNumber: 7 } },
+ { action: getRandomCityAction, props: {}, response: { city: 'Springfield', country: 'Freedonia' } },
+ { action: getRandomNameAction, props: {}, response: nameResponse },
+ { action: getRandomNameWithGenderAction, props: { gender: 'female' }, response: nameResponse },
+];
+
+describe('date, calculate, convert and generate output schemas', () => {
+ it.each(objectCases.map((testCase) => [testCase.action.name, testCase]))(
+ '%s schema keys match the run() output keys',
+ async (_, testCase) => {
+ sendRequest.mockResolvedValueOnce({ status: 200, headers: {}, body: testCase.response });
+
+ const result = await runAction({ action: testCase.action, propsValue: testCase.props });
+
+ expect(testCase.action.outputSchema).toBeDefined();
+ expect(fieldKeys(testCase.action.outputSchema?.fields)).toEqual(Object.keys(objectOf(result)).sort());
+ },
+ );
+
+ it('get_holidays wraps the top-level list and its item keys match each holiday row', async () => {
+ sendRequest.mockResolvedValueOnce({
+ status: 200,
+ headers: {},
+ body: {
+ holidays: [
+ {
+ date: '2025-01-01 00:00:00',
+ start: '2024-12-31T23:00:00.000Z',
+ end: '2025-01-01T23:00:00.000Z',
+ name: "New Year's Day",
+ type: 'public',
+ rule: '01-01',
+ },
+ ],
+ },
+ });
+
+ const result = await runAction({ action: getHolidaysAction, propsValue: { countryCode: 'DE', year: 2025 } });
+ const schema = getHolidaysAction.outputSchema;
+ const wrapper = schema?.fields[0];
+
+ expect(schema?.fields).toHaveLength(1);
+ expect(wrapper?.value).toBe('');
+ expect(schema?.itemLabel).toBe('{name}');
+ expect(Array.isArray(result)).toBe(true);
+ expect(fieldKeys(wrapper?.listItems)).toEqual(Object.keys(objectOf(firstOf(result))).sort());
+ });
+
+ it('convert_csv_to_json wraps the top-level list without fixed item fields', async () => {
+ sendRequest.mockResolvedValueOnce({ status: 200, headers: {}, body: { json: [{ name: 'Ada' }] } });
+
+ const result = await runAction({ action: convertCsvToJsonAction, propsValue: { csv: 'name\nAda', delimiter: 'auto' } });
+ const schema = convertCsvToJsonAction.outputSchema;
+
+ expect(Array.isArray(result)).toBe(true);
+ expect(schema?.fields).toHaveLength(1);
+ expect(schema?.fields[0].value).toBe('');
+ expect(schema?.fields[0].listItems).toBeUndefined();
+ });
+});
+
+function fieldKeys(fields: OutputSchema['fields'] | undefined): string[] {
+ return (fields ?? []).map((field) => field.value ?? field.key).sort();
+}
+
+function objectOf(value: unknown): Record<string, unknown> {
+ if (typeof value !== 'object' || value === null || Array.isArray(value)) {
+ throw new Error('Expected an object output');
+ }
+ return Object.fromEntries(Object.entries(value));
+}
+
+function firstOf(value: unknown): unknown {
+ if (!Array.isArray(value)) {
+ throw new Error('Expected an array output');
+ }
+ return value[0];
+}
+
+type SchemaAction = TestAction & {
+ name: string;
+ outputSchema?: OutputSchema;
+};
+
+type ObjectCase = {
+ action: SchemaAction;
+ props: Record<string, unknown>;
+ response: Record<string, unknown>;
+};
diff --git a/packages/pieces/community/0codekit/tsconfig.json b/packages/pieces/community/0codekit/tsconfig.json
new file mode 100644
index 00000000000..71bc5814f5d
--- /dev/null
+++ b/packages/pieces/community/0codekit/tsconfig.json
@@ -0,0 +1,15 @@
+{
+ "extends": "../../../../tsconfig.base.json",
+ "compilerOptions": {
+ "module": "commonjs",
+ "forceConsistentCasingInFileNames": true,
+ "strict": true,
+ "noImplicitOverride": true,
+ "noPropertyAccessFromIndexSignature": true,
+ "noImplicitReturns": true,
+ "noFallthroughCasesInSwitch": true
+ },
+ "files": [],
+ "include": [],
+ "references": [{ "path": "./tsconfig.lib.json" }]
+}
diff --git a/packages/pieces/community/0codekit/tsconfig.lib.json b/packages/pieces/community/0codekit/tsconfig.lib.json
new file mode 100644
index 00000000000..a648eb45d7f
--- /dev/null
+++ b/packages/pieces/community/0codekit/tsconfig.lib.json
@@ -0,0 +1,13 @@
+{
+ "extends": "./tsconfig.json",
+ "compilerOptions": {
+ "rootDir": ".",
+ "baseUrl": ".",
+ "paths": {},
+ "outDir": "./dist",
+ "declaration": true,
+ "types": ["node"]
+ },
+ "include": ["src/**/*.ts"],
+ "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"]
+}
diff --git a/packages/pieces/community/0codekit/vitest.config.ts b/packages/pieces/community/0codekit/vitest.config.ts
new file mode 100644
index 00000000000..79c97261904
--- /dev/null
+++ b/packages/pieces/community/0codekit/vitest.config.ts
@@ -0,0 +1,19 @@
+import path from 'path'
+import { defineConfig } from 'vitest/config'
+
+const repoRoot = path.resolve(__dirname, '../../../..')
+
+export default defineConfig({
+ root: __dirname,
+ test: {
+ globals: true,
+ environment: 'node',
+ include: ['test/**/*.test.ts'],
+ },
+ resolve: {
+ alias: {
+ '@activepieces/pieces-framework': path.resolve(repoRoot, 'packages/pieces/framework/src/index.ts'),
+ '@activepieces/pieces-common': path.resolve(repoRoot, 'packages/pieces/common/src/index.ts'),
+ },
+ },
+})
diff --git a/tsconfig.base.json b/tsconfig.base.json
index 7cdc39fbcee..15bdabf294b 100644
--- a/tsconfig.base.json
+++ b/tsconfig.base.json
@@ -24,6 +24,9 @@
"@activepieces/ee-auth": ["packages/ee/auth/src/index.ts"],
"@activepieces/ee/billing/ui": ["packages/ee/billing/ui/src/index.ts"],
"@activepieces/engine": ["packages/server/engine/src/main.ts"],
+ "@activepieces/piece-0codekit": [
+ "packages/pieces/community/0codekit/src/index.ts"
+ ],
"@activepieces/piece-activecampaign": [
"packages/pieces/community/activecampaign/src/index.ts"
],